diff options
Diffstat (limited to 'qmake/generators')
31 files changed, 524 insertions, 710 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index ef9aa9a2e6..35df36cb55 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -103,19 +98,6 @@ struct ProjectBuilderSubDirs { bool ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) { - if(project->isActiveConfig("generate_pbxbuild_makefile")) { - QString mkwrap = fileFixify(pbx_dir + Option::dir_sep + ".." + Option::dir_sep + project->first("MAKEFILE"), - FileFixifyToIndir); - QFile mkwrapf(mkwrap); - if(mkwrapf.open(QIODevice::WriteOnly | QIODevice::Text)) { - debug_msg(1, "pbuilder: Creating file: %s", mkwrap.toLatin1().constData()); - QTextStream mkwrapt(&mkwrapf); - writingUnixMakefileGenerator = true; - UnixMakefileGenerator::writeSubDirs(mkwrapt); - writingUnixMakefileGenerator = false; - } - } - //HEADER const int pbVersion = pbuilderVersion(); t << "// !$*UTF8*$!\n" @@ -479,17 +461,17 @@ ProjectBuilderSources::files(QMakeProject *project) const static QString xcodeFiletypeForFilename(const QString &filename) { - foreach (const QString &ext, Option::cpp_ext) { + for (const QString &ext : qAsConst(Option::cpp_ext)) { if (filename.endsWith(ext)) return QStringLiteral("sourcecode.cpp.cpp"); } - foreach (const QString &ext, Option::c_ext) { + for (const QString &ext : qAsConst(Option::c_ext)) { if (filename.endsWith(ext)) return QStringLiteral("sourcecode.c.c"); } - foreach (const QString &ext, Option::h_ext) { + for (const QString &ext : qAsConst(Option::h_ext)) { if (filename.endsWith(ext)) return "sourcecode.c.h"; } @@ -1009,7 +991,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) ProStringList outputPaths; const ProStringList &archs = project->values("QMAKE_XCODE_ARCHS"); if (!archs.isEmpty()) { - for (int i = 0; i < archs.size(); ++i) { + const int size = archs.size(); + inputPaths.reserve(size); + outputPaths.reserve(size); + for (int i = 0; i < size; ++i) { const ProString &arch = archs.at(i); inputPaths << "$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/" + arch + "/"; outputPaths << "$(LINK_FILE_LIST_$(CURRENT_VARIANT)_" + arch + ")"; @@ -1134,7 +1119,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) if (copyBundleResources && ((ios && path.isEmpty()) || (!ios && path == QLatin1String("Contents/Resources")))) { - foreach (const ProString &s, bundle_files) + for (const ProString &s : qAsConst(bundle_files)) bundle_resources_files << s; } else { QString phase_key = keyFor("QMAKE_PBX_BUNDLE_COPY." + bundle_data[i]); @@ -1494,21 +1479,21 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) if (plist_in_file.open(QIODevice::ReadOnly)) { QTextStream plist_in(&plist_in_file); QString plist_in_text = plist_in.readAll(); - plist_in_text.replace("@ICON@", + plist_in_text.replace(QLatin1String("@ICON@"), (project->isEmpty("ICON") ? QString("") : project->first("ICON").toQString().section(Option::dir_sep, -1))); if (project->first("TEMPLATE") == "app") { - plist_in_text.replace("@EXECUTABLE@", project->first("QMAKE_ORIG_TARGET").toQString()); + plist_in_text.replace(QLatin1String("@EXECUTABLE@"), project->first("QMAKE_ORIG_TARGET").toQString()); } else { - plist_in_text.replace("@LIBRARY@", project->first("QMAKE_ORIG_TARGET").toQString()); + plist_in_text.replace(QLatin1String("@LIBRARY@"), project->first("QMAKE_ORIG_TARGET").toQString()); } QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString(); if (bundlePrefix.isEmpty()) bundlePrefix = "com.yourcompany"; - plist_in_text.replace("@BUNDLEIDENTIFIER@", bundlePrefix + '.' + QLatin1String("${PRODUCT_NAME:rfc1034identifier}")); + plist_in_text.replace(QLatin1String("@BUNDLEIDENTIFIER@"), bundlePrefix + '.' + QLatin1String("${PRODUCT_NAME:rfc1034identifier}")); if (!project->values("VERSION").isEmpty()) { - plist_in_text.replace("@SHORT_VERSION@", project->first("VER_MAJ") + "." + project->first("VER_MIN")); + plist_in_text.replace(QLatin1String("@SHORT_VERSION@"), project->first("VER_MAJ") + "." + project->first("VER_MIN")); } - plist_in_text.replace("@TYPEINFO@", + plist_in_text.replace(QLatin1String("@TYPEINFO@"), (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4).toQString())); QFile plist_out_file(Option::output_dir + "/Info.plist"); @@ -1646,12 +1631,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("targets", project->values("QMAKE_PBX_TARGETS"), SettingsAsList, 4) << ";\n" << "\t\t\t" << "attributes = {\n" << "\t\t\t\tTargetAttributes = {\n"; - foreach (const ProString &target, project->values("QMAKE_PBX_TARGETS")) { + for (const ProString &target : project->values("QMAKE_PBX_TARGETS")) { const ProStringList &attributes = project->values(ProKey("QMAKE_PBX_TARGET_ATTRIBUTES_" + target)); if (attributes.isEmpty()) continue; t << "\t\t\t\t\t" << target << " = {\n"; - foreach (const ProString &attribute, attributes) + for (const ProString &attribute : attributes) t << "\t\t\t\t\t\t" << writeSettings(attribute.toQString(), project->first(ProKey("QMAKE_PBX_TARGET_ATTRIBUTES_" + target + "_" + attribute))) << ";\n"; t << "\t\t\t\t\t};\n"; } @@ -1666,32 +1651,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t" << writeSettings("rootObject", keyFor("QMAKE_PBX_ROOT")) << ";\n" << "}\n"; - if(project->isActiveConfig("generate_pbxbuild_makefile")) { - QString mkwrap = Option::output_dir + project->first("/MAKEFILE"); - QFile mkwrapf(mkwrap); - if(mkwrapf.open(QIODevice::WriteOnly | QIODevice::Text)) { - writingUnixMakefileGenerator = true; - debug_msg(1, "pbuilder: Creating file: %s", mkwrap.toLatin1().constData()); - QTextStream mkwrapt(&mkwrapf); - writeHeader(mkwrapt); - const char cleans[] = "preprocess_clean "; - const QString cmd = escapeFilePath(project->first("QMAKE_ORIG_TARGET") + projectSuffix() + "/") + " && " + pbxbuild(); - mkwrapt << "#This is a makefile wrapper for PROJECT BUILDER\n" - << "all:\n\t" - << "cd " << cmd << "\n" - << "install: all\n\t" - << "cd " << cmd << " install\n" - << "distclean clean: preprocess_clean\n\t" - << "cd " << cmd << " clean\n" - << (!did_preprocess ? cleans : "") << ":\n"; - if(did_preprocess) - mkwrapt << cleans << ":\n\t" - << "make -f " - << pbx_dir << Option::dir_sep << "qt_preprocess.mak $@\n"; - writingUnixMakefileGenerator = false; - } - } - // Scheme { QString xcodeSpecDir = project->first("QMAKE_XCODE_SPECDIR").toQString(); @@ -1711,9 +1670,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QTextStream defaultSchemeStream(&defaultSchemeFile); QString schemeData = defaultSchemeStream.readAll(); - schemeData.replace("@QMAKE_ORIG_TARGET@", target); - schemeData.replace("@TARGET_PBX_KEY@", keyFor(pbx_dir + "QMAKE_PBX_TARGET")); - schemeData.replace("@TEST_BUNDLE_PBX_KEY@", keyFor("QMAKE_TEST_BUNDLE_REFERENCE")); + schemeData.replace(QLatin1String("@QMAKE_ORIG_TARGET@"), target); + schemeData.replace(QLatin1String("@TARGET_PBX_KEY@"), keyFor(pbx_dir + "QMAKE_PBX_TARGET")); + schemeData.replace(QLatin1String("@TEST_BUNDLE_PBX_KEY@"), keyFor("QMAKE_TEST_BUNDLE_REFERENCE")); QTextStream outputSchemeStream(&outputSchemeFile); outputSchemeStream << schemeData; diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h index f517ce4bbd..1d5cbc538d 100644 --- a/qmake/generators/mac/pbuilder_pbx.h +++ b/qmake/generators/mac/pbuilder_pbx.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 4dfe69fbde..dffc3d6acb 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -59,6 +54,8 @@ #include <sys/types.h> #include <sys/stat.h> +#include <algorithm> + QT_BEGIN_NAMESPACE using namespace QMakeInternal; @@ -779,6 +776,7 @@ MakefileGenerator::init() if(project->isActiveConfig("depend_includepath")) incDirs += v["INCLUDEPATH"]; QList<QMakeLocalFileName> deplist; + deplist.reserve(incDirs.size()); for (ProStringList::Iterator it = incDirs.begin(); it != incDirs.end(); ++it) deplist.append(QMakeLocalFileName((*it).toQString())); QMakeSourceFileInfo::setDependencyPaths(deplist); @@ -907,7 +905,7 @@ MakefileGenerator::processPrlFile(QString &file) project->values("QMAKE_CURRENT_PRL_LIBS") = libinfo.values("QMAKE_PRL_LIBS"); ProStringList &defs = project->values("DEFINES"); const ProStringList &prl_defs = project->values("PRL_EXPORT_DEFINES"); - foreach (const ProString &def, libinfo.values("QMAKE_PRL_DEFINES")) + for (const ProString &def : libinfo.values("QMAKE_PRL_DEFINES")) if (!defs.contains(def) && prl_defs.contains(def)) defs.append(def); if (try_replace_file) { @@ -939,12 +937,12 @@ void MakefileGenerator::filterIncludedFiles(const char *var) { ProStringList &inputs = project->values(var); - for (ProStringList::Iterator input = inputs.begin(); input != inputs.end(); ) { - if (QMakeSourceFileInfo::included((*input).toQString()) > 0) - input = inputs.erase(input); - else - ++input; - } + auto isIncluded = [this](const ProString &input) { + return QMakeSourceFileInfo::included(input.toQString()) > 0; + }; + inputs.erase(std::remove_if(inputs.begin(), inputs.end(), + isIncluded), + inputs.end()); } static QString @@ -957,7 +955,7 @@ static QString qv(const ProStringList &val) { QString ret; - foreach (const ProString &v, val) + for (const ProString &v : val) ret += qv(v); return ret; } @@ -1013,6 +1011,7 @@ MakefileGenerator::writeProjectMakefile() QList<SubTarget*> targets; { ProStringList builds = project->values("BUILDS"); + targets.reserve(builds.size()); for (ProStringList::Iterator it = builds.begin(); it != builds.end(); ++it) { SubTarget *st = new SubTarget; targets.append(st); @@ -1132,8 +1131,8 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src) ProStringList::ConstIterator oit = objl.begin(); ProStringList::ConstIterator sit = srcl.begin(); - QString stringSrc("$src"); - QString stringObj("$obj"); + QLatin1String stringSrc("$src"); + QLatin1String stringObj("$obj"); for(;sit != srcl.end() && oit != objl.end(); ++oit, ++sit) { if((*sit).isEmpty()) continue; @@ -1144,7 +1143,7 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src) << " " << escapeDependencyPaths(findDependencies(srcf)).join(" \\\n\t\t"); ProKey comp; - foreach (const ProString &compiler, project->values("QMAKE_BUILTIN_COMPILERS")) { + for (const ProString &compiler : project->values("QMAKE_BUILTIN_COMPILERS")) { // Unfortunately we were not consistent about the C++ naming ProString extensionSuffix = compiler; if (extensionSuffix == "CXX") @@ -1155,7 +1154,7 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src) if (compilerSuffix == "C") compilerSuffix = ProString("CC"); - foreach (const ProString &extension, project->values(ProKey("QMAKE_EXT_" + extensionSuffix))) { + for (const ProString &extension : project->values(ProKey("QMAKE_EXT_" + extensionSuffix))) { if ((*sit).endsWith(extension)) { comp = ProKey("QMAKE_RUN_" + compilerSuffix); break; @@ -1453,7 +1452,9 @@ QString MakefileGenerator::fixFileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const { ProStringList varList; - foreach (const ProString &val, project->values(var)) + const auto values = project->values(var); + varList.reserve(values.size()); + for (const ProString &val : values) varList << escapeFilePath(Option::fixPathToTargetOS(val.toQString())); return valGlue(varList, before, glue, after); } @@ -1867,7 +1868,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if (raw_clean.isEmpty()) raw_clean << tmp_out; QString tmp_clean; - foreach (const QString &rc, raw_clean) + for (const QString &rc : qAsConst(raw_clean)) tmp_clean += ' ' + escapeFilePath(Option::fixPathToTargetOS(rc)); QString tmp_clean_cmds = project->values(ProKey(*it + ".clean_commands")).join(' '); if(!tmp_inputs.isEmpty()) @@ -1892,7 +1893,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { QString tinp = (*input).toQString(); QString out = replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell); - foreach (const QString &rc, raw_clean) { + for (const QString &rc : qAsConst(raw_clean)) { dels << ' ' + escapeFilePath(Option::fixPathToTargetOS( replaceExtraCompilerVariables(rc, tinp, out, NoShell), false)); } @@ -1902,7 +1903,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } else { QString files; const int commandlineLimit = 2047; // NT limit, expanded - foreach (const QString &file, dels) { + for (const QString &file : qAsConst(dels)) { if(del_statement.length() + files.length() + qMax(fixEnvVariables(file).length(), file.length()) > commandlineLimit) { cleans.append(files); @@ -2248,7 +2249,7 @@ QString MakefileGenerator::buildArgs() { QString ret; - foreach (const QString &arg, Option::globals->qmake_args) + for (const QString &arg : qAsConst(Option::globals->qmake_args)) ret += " " + shellQuote(arg); return ret; } @@ -2282,7 +2283,7 @@ MakefileGenerator::writeHeader(QTextStream &t) t << "# Project: " << fileFixify(project->projectFile()) << endl; t << "# Template: " << var("TEMPLATE") << endl; if(!project->isActiveConfig("build_pass")) - t << "# Command: " << build_args().replace("$(QMAKE)", var("QMAKE_QMAKE")) << endl; + t << "# Command: " << build_args().replace(QLatin1String("$(QMAKE)"), var("QMAKE_QMAKE")) << endl; t << "#############################################################################\n"; t << endl; QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); @@ -2772,11 +2773,11 @@ MakefileGenerator::parseLibFlag(const ProString &flag, ProString *arg) ProStringList MakefileGenerator::fixLibFlags(const ProKey &var) { - ProStringList in = project->values(var); + const ProStringList &in = project->values(var); ProStringList ret; ret.reserve(in.length()); - foreach (const ProString &v, in) + for (const ProString &v : in) ret << fixLibFlag(v); return ret; } @@ -2806,7 +2807,9 @@ ProStringList MakefileGenerator::escapeFilePaths(const ProStringList &paths) const { ProStringList ret; - for (int i = 0; i < paths.size(); ++i) + const int size = paths.size(); + ret.reserve(size); + for (int i = 0; i < size; ++i) ret.append(escapeFilePath(paths.at(i))); return ret; } @@ -2821,7 +2824,9 @@ QStringList MakefileGenerator::escapeDependencyPaths(const QStringList &paths) const { QStringList ret; - for(int i = 0; i < paths.size(); ++i) + const int size = paths.size(); + ret.reserve(size); + for (int i = 0; i < size; ++i) ret.append(escapeDependencyPath(paths.at(i))); return ret; } @@ -2830,7 +2835,9 @@ ProStringList MakefileGenerator::escapeDependencyPaths(const ProStringList &paths) const { ProStringList ret; - for (int i = 0; i < paths.size(); ++i) + const int size = paths.size(); + ret.reserve(size); + for (int i = 0; i < size; ++i) ret.append(escapeDependencyPath(paths.at(i).toQString())); return ret; } @@ -3177,7 +3184,7 @@ MakefileGenerator::pkgConfigFixPath(QString path) const { QString prefix = pkgConfigPrefix(); if(path.startsWith(prefix)) - path.replace(prefix, "${prefix}"); + path.replace(prefix, QLatin1String("${prefix}")); return path; } @@ -3329,7 +3336,7 @@ static QString windowsifyPath(const QString &str) { // The paths are escaped in prl files, so every slash needs to turn into two backslashes. // Then each backslash needs to be escaped for sed. And another level for C quoting here. - return QString(str).replace('/', "\\\\\\\\"); + return QString(str).replace('/', QLatin1String("\\\\\\\\")); } QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QString &src, const QString &dst) @@ -3358,8 +3365,7 @@ QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QSt QString MakefileGenerator::shellQuote(const QString &str) { - return isWindowsShell() ? QMakeInternal::IoUtils::shellQuoteWin(str) - : QMakeInternal::IoUtils::shellQuoteUnix(str); + return isWindowsShell() ? IoUtils::shellQuoteWin(str) : IoUtils::shellQuoteUnix(str); } QT_END_NAMESPACE diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 19ff5d57a3..41b90eb500 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index 047d17f18a..82110f24cf 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -1,31 +1,27 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2016 Intel Corporation. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/makefiledeps.h b/qmake/generators/makefiledeps.h index 91fdaf0eee..3b0c6ce803 100644 --- a/qmake/generators/makefiledeps.h +++ b/qmake/generators/makefiledeps.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 01e6fa4c6b..b816fc21f8 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h index 1457a7aa7b..706bca3363 100644 --- a/qmake/generators/metamakefile.h +++ b/qmake/generators/metamakefile.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index 7d042ce66c..e45217cb45 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/projectgenerator.h b/qmake/generators/projectgenerator.h index 0744fa620e..587c415055 100644 --- a/qmake/generators/projectgenerator.h +++ b/qmake/generators/projectgenerator.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 12b9f09edd..f062605dd4 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -65,7 +60,7 @@ UnixMakefileGenerator::init() project->values("VER_PAT").append(l[2]); QString sroot = project->sourceRoot(); - foreach (const ProString &iif, project->values("QMAKE_INTERNAL_INCLUDED_FILES")) { + for (const ProString &iif : project->values("QMAKE_INTERNAL_INCLUDED_FILES")) { if (iif == project->cacheFile()) continue; if (iif.startsWith(sroot) && iif.at(sroot.length()) == QLatin1Char('/')) @@ -161,7 +156,7 @@ UnixMakefileGenerator::init() if (project->isActiveConfig("objective_c")) project->values("QMAKE_BUILTIN_COMPILERS") << "OBJC" << "OBJCXX"; - foreach (const ProString &compiler, project->values("QMAKE_BUILTIN_COMPILERS")) { + for (const ProString &compiler : project->values("QMAKE_BUILTIN_COMPILERS")) { QString compile_flag = var("QMAKE_COMPILE_FLAG"); if(compile_flag.isEmpty()) compile_flag = "-c"; @@ -178,12 +173,12 @@ UnixMakefileGenerator::init() pchBaseName += project->first("QMAKE_ORIG_TARGET").toQString(); // replace place holders - pchFlags.replace("${QMAKE_PCH_INPUT}", + pchFlags.replace(QLatin1String("${QMAKE_PCH_INPUT}"), escapeFilePath(project->first("PRECOMPILED_HEADER").toQString())); - pchFlags.replace("${QMAKE_PCH_OUTPUT_BASE}", escapeFilePath(pchBaseName)); + pchFlags.replace(QLatin1String("${QMAKE_PCH_OUTPUT_BASE}"), escapeFilePath(pchBaseName)); if (project->isActiveConfig("icc_pch_style")) { // icc style - pchFlags.replace("${QMAKE_PCH_OUTPUT}", + pchFlags.replace(QLatin1String("${QMAKE_PCH_OUTPUT}"), escapeFilePath(pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT"))); } else { // gcc style (including clang_pch_style) @@ -197,7 +192,7 @@ UnixMakefileGenerator::init() ProString language = project->first(ProKey("QMAKE_LANGUAGE_" + compiler)); if (!language.isEmpty()) { - pchFlags.replace("${QMAKE_PCH_OUTPUT}", + pchFlags.replace(QLatin1String("${QMAKE_PCH_OUTPUT}"), escapeFilePath(pchBaseName + language + headerSuffix)); } } @@ -339,7 +334,7 @@ QStringList ? project->first("QMAKE_PCH_OUTPUT_EXT").toQString() : ""; header_prefix += Option::dir_sep + project->first("QMAKE_PRECOMP_PREFIX"); - foreach (const ProString &compiler, project->values("QMAKE_BUILTIN_COMPILERS")) { + for (const ProString &compiler : project->values("QMAKE_BUILTIN_COMPILERS")) { if (project->isEmpty(ProKey("QMAKE_" + compiler + "FLAGS_PRECOMPILE"))) continue; @@ -352,7 +347,7 @@ QStringList if (extensionSuffix == "CXX") extensionSuffix = ProString("CPP"); - foreach (const ProString &extension, project->values(ProKey("QMAKE_EXT_" + extensionSuffix))) { + for (const ProString &extension : project->values(ProKey("QMAKE_EXT_" + extensionSuffix))) { if (!file.endsWith(extension.toQString())) continue; @@ -381,7 +376,7 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) { QList<QMakeLocalFileName> libdirs, frameworkdirs; int libidx = 0, fwidx = 0; - foreach (const ProString &dlib, project->values("QMAKE_DEFAULT_LIBDIRS")) + for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS")) libdirs.append(QMakeLocalFileName(dlib.toQString())); frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks")); frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks")); @@ -426,7 +421,7 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags) opt = (*++it).toQString(); else opt = opt.mid(10).trimmed(); - foreach (const QMakeLocalFileName &dir, frameworkdirs) { + for (const QMakeLocalFileName &dir : qAsConst(frameworkdirs)) { QString prl = dir.local() + "/" + opt + ".framework/" + opt + Option::prl_ext; if (processPrlFile(prl)) break; @@ -653,7 +648,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) uninst.append("-$(DEL_FILE) " + dst_targ); if (bundle == SlicedBundle) { int dstlen = project->first("DESTDIR").length(); - foreach (const ProString &src, project->values("QMAKE_BUNDLED_FILES")) { + for (const ProString &src : project->values("QMAKE_BUNDLED_FILES")) { ProString file = src.mid(dstlen); QString dst = escapeFilePath( filePrefixRoot(root, fileFixify(targetdir + file, FileFixifyAbsolute))); diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h index 17270ffce9..da5cdb320c 100644 --- a/qmake/generators/unix/unixmake.h +++ b/qmake/generators/unix/unixmake.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 9db64bebee..9312f19418 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1,31 +1,27 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2016 Intel Corporation. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -536,7 +532,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "ld -r -o " << incr_target_dir_f << ' ' << link_deps << endl; //communicated below ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD"); - cmd[0] = cmd.at(0).toQString().replace("$(OBJECTS) ", "$(INCREMENTAL_OBJECTS)"); //ick + cmd[0] = cmd.at(0).toQString().replace(QLatin1String("$(OBJECTS) "), QLatin1String("$(INCREMENTAL_OBJECTS)")); //ick cmd.append(incr_target_dir_f); deps.prepend(incr_target_dir_d + ' '); incr_deps = "$(INCREMENTAL_OBJECTS)"; @@ -704,7 +700,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << destdir_d << "$(TARGET): " << depVar("PRE_TARGETDEPS") << ' ' << depVar("POST_TARGETDEPS") << valList(escapeDependencyPaths(build)) << "\n\t"; ar = project->first("QMAKE_AR_CMD").toQString(); - ar.replace("$(OBJECTS)", escapeFilePaths(build).join(' ')); + ar.replace(QLatin1String("$(OBJECTS)"), escapeFilePaths(build).join(' ')); } else { t << destdir_d << escapeDependencyPath(*libit) << ": " << valList(escapeDependencyPaths(build)) << "\n\t"; @@ -820,7 +816,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString icon = fileFixify(var("ICON")); t << "@$(DEL_FILE) " << info_plist_out << "\n\t" << "@sed "; - foreach (const ProString &arg, commonSedArgs) + for (const ProString &arg : qAsConst(commonSedArgs)) t << arg; t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" " << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" " @@ -844,7 +840,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) symlinks[bundle_dir + "Resources"] = "Versions/Current/Resources"; t << "@$(DEL_FILE) " << info_plist_out << "\n\t" << "@sed "; - foreach (const ProString &arg, commonSedArgs) + for (const ProString &arg : qAsConst(commonSedArgs)) t << arg; t << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" " << "-e \"s,@TYPEINFO@," @@ -992,7 +988,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) ProString header_suffix = project->isActiveConfig("clang_pch_style") ? project->first("QMAKE_PCH_OUTPUT_EXT") : ""; - foreach (const ProString &compiler, project->values("QMAKE_BUILTIN_COMPILERS")) { + for (const ProString &compiler : project->values("QMAKE_BUILTIN_COMPILERS")) { if (project->isEmpty(ProKey("QMAKE_" + compiler + "FLAGS_PRECOMPILE"))) continue; ProString language = project->first(ProKey("QMAKE_LANGUAGE_" + compiler)); @@ -1054,7 +1050,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) { QString pchInput = project->first("PRECOMPILED_HEADER").toQString(); t << "###### Precompiled headers\n"; - foreach (const ProString &compiler, project->values("QMAKE_BUILTIN_COMPILERS")) { + for (const ProString &compiler : project->values("QMAKE_BUILTIN_COMPILERS")) { QString pchFlags = var(ProKey("QMAKE_" + compiler + "FLAGS_PRECOMPILE")); if(pchFlags.isEmpty()) continue; @@ -1083,8 +1079,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "\n\techo \"// Automatically generated, do not modify\" > " << sourceFile_f << "\n\trm -f " << escapeFilePath(pchOutput); - pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile_f) - .replace("${QMAKE_PCH_TEMP_OBJECT}", escapeFilePath(objectFile)); + pchFlags.replace(QLatin1String("${QMAKE_PCH_TEMP_SOURCE}"), sourceFile_f) + .replace(QLatin1String("${QMAKE_PCH_TEMP_OBJECT}"), escapeFilePath(objectFile)); } else { // gcc style (including clang_pch_style) ProString header_prefix = project->first("QMAKE_PRECOMP_PREFIX"); @@ -1103,9 +1099,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << escapeDependencyPaths(findDependencies(pchInput)).join(" \\\n\t\t") << "\n\t" << mkdir_p_asstring(pchOutputDir); } - pchFlags.replace("${QMAKE_PCH_INPUT}", escapeFilePath(pchInput)) - .replace("${QMAKE_PCH_OUTPUT_BASE}", escapeFilePath(pchBaseName.toQString())) - .replace("${QMAKE_PCH_OUTPUT}", escapeFilePath(pchOutput.toQString())); + pchFlags.replace(QLatin1String("${QMAKE_PCH_INPUT}"), escapeFilePath(pchInput)) + .replace(QLatin1String("${QMAKE_PCH_OUTPUT_BASE}"), escapeFilePath(pchBaseName.toQString())) + .replace(QLatin1String("${QMAKE_PCH_OUTPUT}"), escapeFilePath(pchOutput.toQString())); QString compilerExecutable; if (compiler == "C" || compiler == "OBJC") @@ -1151,7 +1147,7 @@ void UnixMakefileGenerator::init2() ProStringList &ar_cmd = project->values("QMAKE_AR_CMD"); if (!ar_cmd.isEmpty()) - ar_cmd[0] = ar_cmd.at(0).toQString().replace("(TARGET)","(TARGETA)"); + ar_cmd[0] = ar_cmd.at(0).toQString().replace(QLatin1String("(TARGET)"), QLatin1String("(TARGETA)")); else ar_cmd.append("$(AR) $(TARGETA) $(OBJECTS)"); if (!project->isEmpty("QMAKE_BUNDLE")) { diff --git a/qmake/generators/win32/cesdkhandler.cpp b/qmake/generators/win32/cesdkhandler.cpp index 4550cc8aed..f45cbf74a9 100644 --- a/qmake/generators/win32/cesdkhandler.cpp +++ b/qmake/generators/win32/cesdkhandler.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -147,7 +142,7 @@ bool CeSdkHandler::parseMsBuildFile(QFile *file, CeSdkInfo *info) QSettings sdkRootPathRegistry(regString, QSettings::NativeFormat); const QString erg = sdkRootPathRegistry.value(QStringLiteral(".")).toString(); const QString fullSdkRootPath = erg + sdkRootPath.mid(endIndex + 1); - const QString rootString = QStringLiteral("$(SdkRootPath)"); + const QLatin1String rootString("$(SdkRootPath)"); includePath = includePath.replace(rootString, fullSdkRootPath); libraryPath = libraryPath.replace(rootString, fullSdkRootPath); @@ -178,7 +173,7 @@ QStringList CeSdkHandler::getMsBuildToolPaths() const QStringList CeSdkHandler::filterMsBuildToolPaths(const QStringList &paths) const { QStringList result; - foreach (const QString &path, paths) { + for (const QString &path : paths) { QDir dirVC110(path); if (path.endsWith(QLatin1String("bin"))) dirVC110.cdUp(); @@ -196,9 +191,9 @@ bool CeSdkHandler::retrieveEnvironment(const QStringList &relativePaths, CeSdkInfo *info) { bool result = false; - foreach (const QString &path, toolPaths) { + for (const QString &path : toolPaths) { const QDir dir(path); - foreach (const QString &filePath, relativePaths) { + for (const QString &filePath : relativePaths) { QFile file(dir.absoluteFilePath(filePath)); if (file.exists()) result = parseMsBuildFile(&file, info) || result; @@ -214,7 +209,7 @@ void CeSdkHandler::retrieveWEC2013SDKs() const QStringList filteredToolPaths = filterMsBuildToolPaths(toolPaths); QSettings settings("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows CE Tools\\SDKs", QSettings::NativeFormat); const QStringList keys = settings.allKeys(); - foreach (const QString &key, keys) { + for (const QString &key : keys) { if (key.contains(QLatin1String("SDKInformation")) || key.contains(QLatin1Char('.'))) { QFile sdkPropertyFile(settings.value(key).toString()); if (!sdkPropertyFile.exists()) diff --git a/qmake/generators/win32/cesdkhandler.h b/qmake/generators/win32/cesdkhandler.h index b90c3c6dce..3bb8d2adcb 100644 --- a/qmake/generators/win32/cesdkhandler.h +++ b/qmake/generators/win32/cesdkhandler.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 1837c6c0cf..382b10c37b 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -51,7 +46,7 @@ QString MingwMakefileGenerator::escapeDependencyPath(const QString &path) const { QString ret = path; ret.replace('\\', "/"); // ### this shouldn't be here - ret.replace(' ', "\\ "); + ret.replace(' ', QLatin1String("\\ ")); return ret; } diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h index 1525f04955..ab9e5a9961 100644 --- a/qmake/generators/win32/mingw_make.h +++ b/qmake/generators/win32/mingw_make.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index bcfab80ccf..4539058cbf 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -328,7 +323,7 @@ static QString vcxCommandSeparator() static QString unquote(const QString &value) { QString result = value; - result.replace(QStringLiteral("\\\""), QStringLiteral("\"")); + result.replace(QLatin1String("\\\""), QLatin1String("\"")); return result; } @@ -861,7 +856,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) << tag("AppxManifest") << attrTag("Include", manifest) << closetag(); - foreach (const QString &icon, icons) { + for (const QString &icon : qAsConst(icons)) { xml << tag("Image") << attrTag("Include", icon) << closetag(); diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h index 1b7ce2d716..d594fbaca8 100644 --- a/qmake/generators/win32/msbuild_objectmodel.h +++ b/qmake/generators/win32/msbuild_objectmodel.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 27427db68b..25a2765a01 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -49,11 +44,12 @@ QT_BEGIN_NAMESPACE static QString nmakePathList(const QStringList &list) { QStringList pathList; - foreach (const QString &path, list) + pathList.reserve(list.size()); + for (const QString &path : list) pathList.append(QDir::cleanPath(path)); return QDir::toNativeSeparators(pathList.join(QLatin1Char(';'))) - .replace('#', QStringLiteral("^#")).replace('$', QStringLiteral("$$")); + .replace('#', QLatin1String("^#")).replace('$', QLatin1String("$$")); } NmakeMakefileGenerator::NmakeMakefileGenerator() : Win32MakefileGenerator(), usePCH(false) @@ -84,7 +80,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) + " (" + variables["CE_ARCH"].join(' ') + ")"; const QList<CeSdkInfo> sdkList = sdkhandler.listAll(); CeSdkInfo sdk; - foreach (const CeSdkInfo &info, sdkList) { + for (const CeSdkInfo &info : sdkList) { if (info.name().compare(sdkName, Qt::CaseInsensitive ) == 0) { sdk = info; break; @@ -96,7 +92,8 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) t << "\nPATH = " << sdk.binPath() << "\n"; } else { QStringList sdkStringList; - foreach (const CeSdkInfo &info, sdkList) + sdkStringList.reserve(sdkList.size()); + for (const CeSdkInfo &info : sdkList) sdkStringList << info.name(); fprintf(stderr, "Failed to find Windows CE SDK matching %s, found: %s\n" @@ -330,7 +327,7 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const QString precompRule = QString("-c -FI%1 -Yu%2 -Fp%3") .arg(precompH_f, precompH_f, escapeFilePath(precompPch)); QString p = MakefileGenerator::var(value); - p.replace("-c", precompRule); + p.replace(QLatin1String("-c"), precompRule); // Cannot use -Gm with -FI & -Yu, as this gives an // internal compiler error, on the newer compilers // ### work-around for a VS 2003 bug. Move to some prf file or remove completely. @@ -432,9 +429,9 @@ QStringList NmakeMakefileGenerator::sourceFilesForImplicitRulesFilter() { QStringList filter; const QChar wildcard = QLatin1Char('*'); - foreach (const QString &ext, Option::c_ext) + for (const QString &ext : qAsConst(Option::c_ext)) filter << wildcard + ext; - foreach (const QString &ext, Option::cpp_ext) + for (const QString &ext : qAsConst(Option::cpp_ext)) filter << wildcard + ext; return filter; } @@ -482,7 +479,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t) const QStringList sourceFilesFilter = sourceFilesForImplicitRulesFilter(); QStringList fixifiedSourceDirs = fileFixify(source_directories.toList(), FileFixifyAbsolute); fixifiedSourceDirs.removeDuplicates(); - foreach (const QString &sourceDir, fixifiedSourceDirs) { + for (const QString &sourceDir : qAsConst(fixifiedSourceDirs)) { QDirIterator dit(sourceDir, sourceFilesFilter, QDir::Files | QDir::NoDotAndDotDot); while (dit.hasNext()) { dit.next(); @@ -507,7 +504,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t) project->variables().remove("QMAKE_RUN_CXX"); project->variables().remove("QMAKE_RUN_CC"); - foreach (const QString &sourceDir, source_directories) { + for (const QString &sourceDir : qAsConst(source_directories)) { if (sourceDir.isEmpty()) continue; QString objDir = var("OBJECTS_DIR"); diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h index df72ef394c..9c88934e36 100644 --- a/qmake/generators/win32/msvc_nmake.h +++ b/qmake/generators/win32/msvc_nmake.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index f26dbbc40b..5e655464b7 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -1763,10 +1758,6 @@ VCManifestTool::VCManifestTool() { } -VCManifestTool::~VCManifestTool() -{ -} - bool VCManifestTool::parseOption(const char *option) { Q_UNUSED(option); @@ -2229,7 +2220,7 @@ void VCFilter::modifyPCHstage(QString str) lines << "* WARNING: All changes made in this file will be lost."; lines << "--------------------------------------------------------------------*/"; lines << "#include \"" + Project->precompHFilename + "\""; - foreach(QString line, lines) + for (const QString &line : qAsConst(lines)) CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile; } return; @@ -2420,9 +2411,8 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) // Ensure that none of the output files are also dependencies. Or else, the custom buildstep // will be rebuild every time, even if nothing has changed. - foreach(QString output, CustomBuildTool.Outputs) { + for (const QString &output : qAsConst(CustomBuildTool.Outputs)) CustomBuildTool.AdditionalDependencies.removeAll(output); - } useCustomBuildTool = !CustomBuildTool.CommandLine.isEmpty(); return useCustomBuildTool; diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 7092da3e59..dfbfaacfa8 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -482,7 +477,7 @@ class VCCLCompilerTool : public VCToolBase public: // Functions VCCLCompilerTool(); - virtual ~VCCLCompilerTool(){} + bool parseOption(const char* option); // Variables @@ -579,7 +574,7 @@ class VCLinkerTool : public VCToolBase public: // Functions VCLinkerTool(); - virtual ~VCLinkerTool(){} + bool parseOption(const char* option); // Variables @@ -673,7 +668,7 @@ class VCManifestTool : public VCToolBase { public: VCManifestTool(); - ~VCManifestTool(); + bool parseOption(const char* option); triState EmbedManifest; @@ -684,7 +679,7 @@ class VCMIDLTool : public VCToolBase public: // Functions VCMIDLTool(); - virtual ~VCMIDLTool(){} + bool parseOption(const char* option); // Variables @@ -738,7 +733,7 @@ class VCLibrarianTool : public VCToolBase public: // Functions VCLibrarianTool(); - virtual ~VCLibrarianTool(){} + bool parseOption(const char*){ return false; } // Variables @@ -759,7 +754,7 @@ class VCCustomBuildTool : public VCToolBase public: // Functions VCCustomBuildTool(); - virtual ~VCCustomBuildTool(){} + bool parseOption(const char*){ return false; } // Variables @@ -778,7 +773,7 @@ class VCResourceCompilerTool : public VCToolBase public: // Functions VCResourceCompilerTool(); - virtual ~VCResourceCompilerTool(){} + bool parseOption(const char*){ return false; } // Variables @@ -799,7 +794,6 @@ class VCDeploymentTool public: // Functions VCDeploymentTool(); - virtual ~VCDeploymentTool() {} // Variables QString DeploymentTag; @@ -813,7 +807,7 @@ class VCEventTool : public VCToolBase protected: // Functions VCEventTool(const QString &eventName); - virtual ~VCEventTool(){} + bool parseOption(const char*){ return false; } public: @@ -830,28 +824,24 @@ class VCPostBuildEventTool : public VCEventTool { public: VCPostBuildEventTool(); - ~VCPostBuildEventTool(){} }; class VCPreBuildEventTool : public VCEventTool { public: VCPreBuildEventTool(); - ~VCPreBuildEventTool(){} }; class VCPreLinkEventTool : public VCEventTool { public: VCPreLinkEventTool(); - ~VCPreLinkEventTool(){} }; class VCWinDeployQtTool : public VCToolBase { public: VCWinDeployQtTool() {} - ~VCWinDeployQtTool() {} protected: bool parseOption(const char *) { return false; } diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index a1a8407a11..1b3b328243 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -129,7 +124,7 @@ DotNET which_dotnet_version(const QByteArray &preferredVersion = QByteArray()) // More than one version installed, search directory path QString paths = qgetenv("PATH"); const QStringList pathlist = paths.split(QLatin1Char(';')); - foreach (const QString &path, pathlist) { + for (const QString &path : pathlist) { for (i = 0; dotNetCombo[i].version; ++i) { const QString productPath = installPaths.value(dotNetCombo[i].version); if (productPath.isEmpty()) @@ -414,7 +409,7 @@ bool VcprojGenerator::isStandardSuffix(const QString &suffix) const ProString VcprojGenerator::firstInputFileName(const ProString &extraCompilerName) const { - foreach (const ProString &var, project->values(ProKey(extraCompilerName + ".input"))) { + for (const ProString &var : project->values(ProKey(extraCompilerName + ".input"))) { const ProStringList &files = project->values(var.toKey()); if (!files.isEmpty()) return files.first(); @@ -439,10 +434,12 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt QHash<QString, ProStringList> &subdirProjectLookup, const ProStringList &allDependencies) { - QLinkedList<QPair<QString, ProStringList> > collectedSubdirs; + QVector<QPair<QString, ProStringList> > collectedSubdirs; ProStringList tmp_proj_subdirs = proj->values("SUBDIRS"); ProStringList projectsInProject; - for(int x = 0; x < tmp_proj_subdirs.size(); ++x) { + const int numSubdirs = tmp_proj_subdirs.size(); + collectedSubdirs.reserve(numSubdirs); + for (int x = 0; x < numSubdirs; ++x) { ProString tmpdir = tmp_proj_subdirs.at(x); const ProKey tmpdirConfig(tmpdir + ".CONFIG"); if (!proj->isEmpty(tmpdirConfig)) { @@ -464,9 +461,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt collectedSubdirs.append(qMakePair(tmpdir.toQString(), proj->values(ProKey(tmp_proj_subdirs.at(x) + ".depends")))); projLookup.insert(tmp_proj_subdirs.at(x).toQString(), tmpdir.toQString()); } - QLinkedListIterator<QPair<QString, ProStringList> > collectedIt(collectedSubdirs); - while (collectedIt.hasNext()) { - QPair<QString, ProStringList> subdir = collectedIt.next(); + for (const auto &subdir : qAsConst(collectedSubdirs)) { QString profile = subdir.first; QFileInfo fi(fileInfo(Option::normalizePath(profile))); if (fi.exists()) { @@ -538,13 +533,13 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt if (tmpList.size()) { const ProStringList depends = tmpList; - foreach (const ProString &dep, depends) { + for (const ProString &dep : depends) { QString depend = dep.toQString(); if (!projGuids[depend].isEmpty()) { newDep->dependencies << projGuids[depend]; } else if (subdirProjectLookup[projLookup[depend]].size() > 0) { - ProStringList tmpLst = subdirProjectLookup[projLookup[depend]]; - foreach (const ProString &tDep, tmpLst) { + const ProStringList tmpLst = subdirProjectLookup[projLookup[depend]]; + for (const ProString &tDep : tmpLst) { QString tmpDep = tDep.toQString(); newDep->dependencies << projGuids[projLookup[tmpDep]]; } @@ -690,10 +685,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) t << _slnGlobalBeg; - QHashIterator<VcsolutionDepend *, QStringList> extraIt(extraSubdirs); - while (extraIt.hasNext()) { - extraIt.next(); - foreach (const QString &depend, extraIt.value()) { + for (auto extraIt = extraSubdirs.cbegin(), end = extraSubdirs.cend(); extraIt != end; ++extraIt) { + for (const QString &depend : extraIt.value()) { if (!projGuids[depend].isEmpty()) { extraIt.key()->dependencies << projGuids[depend]; } else if (!profileLookup[depend].isEmpty()) { @@ -704,12 +697,12 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) } QString slnConf = _slnSolutionConf; if (!project->isEmpty("VCPROJ_ARCH")) { - slnConf.replace(QString("|Win32"), "|" + project->first("VCPROJ_ARCH")); + slnConf.replace(QLatin1String("|Win32"), "|" + project->first("VCPROJ_ARCH")); } else if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) { QString slnPlatform = QString("|") + project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")"; - slnConf.replace(QString("|Win32"), slnPlatform); + slnConf.replace(QLatin1String("|Win32"), slnPlatform); } else if (is64Bit) { - slnConf.replace(QString("|Win32"), "|x64"); + slnConf.replace(QLatin1String("|Win32"), QLatin1String("|x64")); } t << slnConf; @@ -872,7 +865,7 @@ void VcprojGenerator::init() // Add all input files for a custom compiler into a map for uniqueness, // unless the compiler is configure as a combined stage, then use the first one - foreach (const ProString &quc, project->values("QMAKE_EXTRA_COMPILERS")) { + for (const ProString &quc : project->values("QMAKE_EXTRA_COMPILERS")) { const ProStringList &invar = project->values(ProKey(quc + ".input")); const QString compiler_out = project->first(ProKey(quc + ".output")).toQString(); for (ProStringList::ConstIterator iit = invar.constBegin(); iit != invar.constEnd(); ++iit) { @@ -898,12 +891,10 @@ void VcprojGenerator::init() } #if 0 // Debugging - Q_FOREACH(QString aKey, extraCompilerSources.keys()) { - qDebug("Extracompilers for %s are (%s)", aKey.toLatin1().constData(), extraCompilerSources.value(aKey).join(", ").toLatin1().constData()); - } - Q_FOREACH(QString aKey, extraCompilerOutputs.keys()) { - qDebug("Object mapping for %s is (%s)", aKey.toLatin1().constData(), extraCompilerOutputs.value(aKey).join(", ").toLatin1().constData()); - } + for (auto it = extraCompilerSources.cbegin(), end = extraCompilerSources.cend(); it != end; ++it) + qDebug("Extracompilers for %s are (%s)", it.key().toLatin1().constData(), it.value().join(", ").toLatin1().constData()); + for (auto it = extraCompilerOutputs.cbegin(), end = extraCompilerOutputs.cend(); it != end; ++it) + qDebug("Object mapping for %s is (%s)", it.key().toLatin1().constData(), it.value().join(", ").toLatin1().constData()); qDebug(""); #endif } @@ -1174,7 +1165,8 @@ void VcprojGenerator::initLinkerTool() static const char * const lflags[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 }; for (int i = 0; lflags[i]; i++) { - foreach (const ProString &lib, fixLibFlags(lflags[i])) { + const auto libs = fixLibFlags(lflags[i]); + for (const ProString &lib : libs) { if (lib.startsWith("/LIBPATH:")) conf.linker.AdditionalLibraryDirectories << lib.mid(9).toQString(); else @@ -1196,7 +1188,7 @@ void VcprojGenerator::initResourceTool() else conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions; - foreach (const ProString &path, project->values("RC_INCLUDEPATH")) { + for (const ProString &path : project->values("RC_INCLUDEPATH")) { QString fixedPath = fileFixify(path.toQString()); if (fileInfo(fixedPath).isRelative()) { if (fixedPath == QLatin1String(".")) @@ -1270,7 +1262,7 @@ void VcprojGenerator::initDeploymentTool() if (targetPath.endsWith("/") || targetPath.endsWith("\\")) targetPath.chop(1); } - ProStringList dllPaths = project->values("QMAKE_DLL_PATHS"); + const ProStringList dllPaths = project->values("QMAKE_DLL_PATHS"); // Only deploy Qt libs for shared build if (!dllPaths.isEmpty() && !(conf.WinRT && project->first("MSVC_VER").toQString() == "14.0")) { @@ -1288,7 +1280,7 @@ void VcprojGenerator::initDeploymentTool() // Use only the file name and check in Qt's install path and LIBPATHs to check for existence dllName.remove(0, dllName.lastIndexOf(QLatin1Char('/')) + 1); QFileInfo info; - foreach (const ProString &dllPath, dllPaths) { + for (const ProString &dllPath : dllPaths) { QString absoluteDllFilePath = dllPath.toQString(); if (!absoluteDllFilePath.endsWith(QLatin1Char('/'))) absoluteDllFilePath += QLatin1Char('/'); @@ -1351,7 +1343,7 @@ void VcprojGenerator::initDeploymentTool() } } - foreach (const ProString &item, project->values("INSTALLS")) { + for (const ProString &item : project->values("INSTALLS")) { // get item.path QString devicePath = project->first(ProKey(item + ".path")).toQString(); if (!conf.WinRT) { @@ -1366,7 +1358,7 @@ void VcprojGenerator::initDeploymentTool() } } // foreach d in item.files - foreach (const ProString &src, project->values(ProKey(item + ".files"))) { + for (const ProString &src : project->values(ProKey(item + ".files"))) { QString itemDevicePath = devicePath; QString source = Option::normalizePath(src.toQString()); QString nameFilter; @@ -1670,7 +1662,7 @@ void VcprojGenerator::initExtraCompilerOutputs() // provided that the input file variable is not handled already (those in otherFilters // are handled, so we avoid them). const ProStringList &inputVars = project->values(ProKey(*it + ".input")); - foreach (const ProString &inputVar, inputVars) { + for (const ProString &inputVar : inputVars) { if (!otherFilters.contains(inputVar)) { const ProStringList &tmp_in = project->values(inputVar.toKey()); for (int i = 0; i < tmp_in.count(); ++i) { @@ -1706,12 +1698,12 @@ QString VcprojGenerator::replaceExtraCompilerVariables( if(defines.isEmpty()) defines.append(varGlue("PRL_EXPORT_DEFINES"," -D"," -D","") + varGlue("DEFINES"," -D"," -D","")); - ret.replace("$(DEFINES)", defines.first().toQString()); + ret.replace(QLatin1String("$(DEFINES)"), defines.first().toQString()); ProStringList &incpath = project->values("VCPROJ_MAKEFILE_INCPATH"); if(incpath.isEmpty() && !this->var("MSVCPROJ_INCPATH").isEmpty()) incpath.append(this->var("MSVCPROJ_INCPATH")); - ret.replace("$(INCPATH)", incpath.join(' ')); + ret.replace(QLatin1String("$(INCPATH)"), incpath.join(' ')); return ret; } diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 50125a30a6..9ccd8c2552 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp index 5282989369..ccbbf8cbac 100644 --- a/qmake/generators/win32/msvc_vcxproj.cpp +++ b/qmake/generators/win32/msvc_vcxproj.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/win32/msvc_vcxproj.h b/qmake/generators/win32/msvc_vcxproj.h index 0ffe5f3aff..8f68348693 100644 --- a/qmake/generators/win32/msvc_vcxproj.h +++ b/qmake/generators/win32/msvc_vcxproj.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index a042cb0d4b..0846cb2d8f 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -268,7 +263,9 @@ void Win32MakefileGenerator::processRcFileVar() QString versionString = vers.join('.'); QStringList rcIcons; - foreach (const ProString &icon, project->values("RC_ICONS")) + const auto icons = project->values("RC_ICONS"); + rcIcons.reserve(icons.size()); + for (const ProString &icon : icons) rcIcons.append(fileFixify(icon.toQString(), FileFixifyAbsolute)); QString companyName; @@ -401,7 +398,7 @@ void Win32MakefileGenerator::processRcFileVar() project->values("RC_FILE").first() = fi.absoluteFilePath(); } - resFile.replace(".rc", Option::res_ext); + resFile.replace(QLatin1String(".rc"), Option::res_ext); project->values("RES_FILE").prepend(fileInfo(resFile).fileName()); QString resDestDir; if (project->isActiveConfig("staticlib")) @@ -771,8 +768,8 @@ QString Win32MakefileGenerator::escapeFilePath(const QString &path) const QString Win32MakefileGenerator::cQuoted(const QString &str) { QString ret = str; - ret.replace(QLatin1Char('\\'), QStringLiteral("\\\\")); - ret.replace(QLatin1Char('"'), QStringLiteral("\\\"")); + ret.replace(QLatin1Char('\\'), QLatin1String("\\\\")); + ret.replace(QLatin1Char('"'), QLatin1String("\\\"")); ret.prepend(QLatin1Char('"')); ret.append(QLatin1Char('"')); return ret; diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h index 54c4d3be53..4d5ee9812b 100644 --- a/qmake/generators/win32/winmakefile.h +++ b/qmake/generators/win32/winmakefile.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp index 4f2e7fee69..e92749a126 100644 --- a/qmake/generators/xmloutput.cpp +++ b/qmake/generators/xmloutput.cpp @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** @@ -86,6 +81,7 @@ XmlOutput::XMLState XmlOutput::state() void XmlOutput::updateIndent() { currentIndent.clear(); + currentIndent.reserve(currentLevel); for (int i = 0; i < currentLevel; ++i) currentIndent.append(indent); } @@ -140,11 +136,11 @@ QString XmlOutput::doConversion(const QString &text) } if (conversion == XMLConversion) { - output.replace('\"', """); - output.replace('\'', "'"); + output.replace('\"', QLatin1String(""")); + output.replace('\'', QLatin1String("'")); } else if (conversion == EscapeConversion) { - output.replace('\"', "\\\""); - output.replace('\'', "\\\'"); + output.replace('\"', QLatin1String("\\\"")); + output.replace('\'', QLatin1String("\\\'")); } return output; } diff --git a/qmake/generators/xmloutput.h b/qmake/generators/xmloutput.h index 2adb0e2d2e..d16634ee3b 100644 --- a/qmake/generators/xmloutput.h +++ b/qmake/generators/xmloutput.h @@ -1,31 +1,26 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the qmake application of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** |