diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-06 16:19:14 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-06 16:50:03 +0200 |
commit | 1326cd15f7ba985551f0fddc717e3bfc01ddda85 (patch) | |
tree | 024eb871ed5f4e8c02e21412475e6e9929a2b030 /qmake | |
parent | fe70367fe06984d1ac84cc276ca3fd3edc4193c7 (diff) | |
parent | beb7258a56b6ec76531b73cc07ee30132a3f548f (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
mkspecs/qnx-x86-qcc/qplatformdefs.h
src/corelib/global/qglobal.h
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
src/opengl/qgl.cpp
src/opengl/qglpixelbuffer.cpp
src/opengl/qglshaderprogram.cpp
tests/auto/opengl/qglthreads/tst_qglthreads.cpp
Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 17 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 28 | ||||
-rw-r--r-- | qmake/generators/projectgenerator.cpp | 27 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 70 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 4 | ||||
-rw-r--r-- | qmake/library/qmakebuiltins.cpp | 12 | ||||
-rw-r--r-- | qmake/option.cpp | 2 |
8 files changed, 106 insertions, 58 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 91629ec9dd..2f43c8ad1f 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -2133,6 +2133,16 @@ linked with an application so that they are available as built-in resources. + qmake automatically adds the plugins that are typically needed + by the used Qt modules (see \c QT). + The defaults are tuned towards an optimal out-of-the-box experience. + See \l{Static Plugins} for a list of available plugins, and ways + to override the automatic linking. + + This variable currently has no effect when linking against a + shared/dynamic build of Qt, or when linking libraries. + It may be used for deployment of dynamic plugins at a later time. + \target QT_VERSION_variable \section1 QT_VERSION @@ -2412,6 +2422,9 @@ \li Specifies device capabilities to add to the capability list (location, webcam, and so on). This option is not available on Windows Phone. \row + \li default_language + \li The default language code of the application. Defaults to "en". + \row \li dependencies \li Specifies dependencies required by the package. \row @@ -2438,6 +2451,10 @@ \li The unique ID of the app. Defaults to reusing the existing generated manifest's UUID, or generates a new UUID if none is present. \row + \li languages + \li A list of additional language codes supported by the application. This list + is empty by default. + \row \li logo_large \li Large logo image file. Default provided by the mkspec. \row diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index bad4eb5456..0e3e058c7b 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -370,7 +370,8 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString regex.remove(0, dir.length()); } if(real_dir.isEmpty() || exists(real_dir)) { - QStringList files = QDir(real_dir).entryList(QStringList(regex)); + QStringList files = QDir(real_dir).entryList(QStringList(regex), + QDir::NoDotAndDotDot | QDir::AllEntries); if(files.isEmpty()) { debug_msg(1, "%s:%d Failure to find %s in vpath (%s)", __FILE__, __LINE__, @@ -383,8 +384,6 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString l.removeAt(val_it); QString a; for(int i = (int)files.count()-1; i >= 0; i--) { - if(files[i] == "." || files[i] == "..") - continue; a = real_dir + files[i]; if(!(flags & VPATH_NoFixify)) a = fileFixify(a); @@ -1324,7 +1323,8 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) continue; } QString local_dirstr = Option::fixPathToLocalOS(dirstr, true); - QStringList files = QDir(local_dirstr).entryList(QStringList(filestr)); + QStringList files = QDir(local_dirstr).entryList(QStringList(filestr), + QDir::NoDotAndDotDot | QDir::AllEntries); if (installConfigValues.contains("no_check_exist") && files.isEmpty()) { QString dst_file = filePrefixRoot(root, dst_dir); QString cmd; @@ -1346,8 +1346,6 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild) } for(int x = 0; x < files.count(); x++) { QString file = files[x]; - if(file == "." || file == "..") //blah - continue; uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + file, FileFixifyAbsolute, false)))); QFileInfo fi(fileInfo(dirstr + file)); QString dst_file = filePrefixRoot(root, fileFixify(dst_dir, FileFixifyAbsolute, false)); @@ -3217,7 +3215,7 @@ MakefileGenerator::writePkgConfigFile() QString prefix = pkgConfigPrefix(); QString libDir = project->first("QMAKE_PKGCONFIG_LIBDIR").toQString(); if(libDir.isEmpty()) - libDir = prefix + Option::dir_sep + "lib" + Option::dir_sep; + libDir = prefix + "/lib"; QString includeDir = project->first("QMAKE_PKGCONFIG_INCDIR").toQString(); if(includeDir.isEmpty()) includeDir = prefix + "/include"; @@ -3284,10 +3282,12 @@ MakefileGenerator::writePkgConfigFile() // libs t << "Libs: "; - QString pkgConfiglibDir; QString pkgConfiglibName; if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")) { - pkgConfiglibDir = "-F${libdir}"; + if (libDir != QLatin1String("/System/Library/Frameworks") + && libDir != QLatin1String("/Library/Frameworks")) { + t << "-F${libdir} "; + } ProString bundle; if (!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME")) bundle = unescapeFilePath(project->first("QMAKE_FRAMEWORK_BUNDLE_NAME")); @@ -3298,12 +3298,13 @@ MakefileGenerator::writePkgConfigFile() bundle = bundle.left(suffix); pkgConfiglibName = "-framework " + bundle + " "; } else { - pkgConfiglibDir = "-L${libdir}"; + if (!project->values("QMAKE_DEFAULT_LIBDIRS").contains(libDir)) + t << "-L${libdir} "; pkgConfiglibName = "-l" + unescapeFilePath(project->first("QMAKE_ORIG_TARGET")); if (project->isActiveConfig("shared")) pkgConfiglibName += project->first("TARGET_VERSION_EXT").toQString(); } - t << pkgConfiglibDir << " " << pkgConfiglibName << " \n"; + t << pkgConfiglibName << " \n"; ProStringList libs; if(!project->isEmpty("QMAKE_INTERNAL_PRL_LIBS")) { @@ -3327,7 +3328,10 @@ MakefileGenerator::writePkgConfigFile() << varGlue("PRL_EXPORT_CXXFLAGS", "", " ", " ") << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") // << varGlue("DEFINES","-D"," -D"," ") - << "-I${includedir}\n"; + ; + if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir)) + t << "-I${includedir}"; + t << endl; // requires const QString requires = project->values("QMAKE_PKGCONFIG_REQUIRES").join(' '); diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index 3cd5a22a33..05fdcb320d 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -111,10 +111,8 @@ ProjectGenerator::init() dir += Option::dir_sep; if (Option::recursive) { QStringList files = QDir(dir).entryList(QDir::Files); - for(int i = 0; i < (int)files.count(); i++) { - if(files[i] != "." && files[i] != "..") - dirs.append(dir + files[i] + QDir::separator() + builtin_regex); - } + for (int i = 0; i < files.count(); i++) + dirs.append(dir + files[i] + QDir::separator() + builtin_regex); } regex = builtin_regex; } else { @@ -137,12 +135,9 @@ ProjectGenerator::init() regex = regex.right(regex.length() - (s+1)); } if (Option::recursive) { - QStringList entries = QDir(dir).entryList(QDir::Dirs); - for(int i = 0; i < (int)entries.count(); i++) { - if(entries[i] != "." && entries[i] != "..") { - dirs.append(dir + entries[i] + QDir::separator() + regex); - } - } + QStringList entries = QDir(dir).entryList(QDir::Dirs | QDir::NoDotAndDotDot); + for (int i = 0; i < entries.count(); i++) + dirs.append(dir + entries[i] + QDir::separator() + regex); } QStringList files = QDir(dir).entryList(QDir::nameFiltersFromString(regex)); for(int i = 0; i < (int)files.count(); i++) { @@ -186,16 +181,15 @@ ProjectGenerator::init() nd += QDir::separator(); nd += profiles[i]; fileFixify(nd); - if(profiles[i] != "." && profiles[i] != ".." && - !subdirs.contains(nd, Qt::CaseInsensitive) && !out_file.endsWith(nd)) + if (!subdirs.contains(nd, Qt::CaseInsensitive) && !out_file.endsWith(nd)) subdirs.append(nd); } } if (Option::recursive) { - QStringList dirs = QDir(newdir).entryList(QDir::Dirs); + QStringList dirs = QDir(newdir).entryList(QDir::Dirs | QDir::NoDotAndDotDot); for(int i = 0; i < (int)dirs.count(); i++) { QString nd = fileFixify(newdir + QDir::separator() + dirs[i]); - if(dirs[i] != "." && dirs[i] != ".." && !knownDirs.contains(nd, Qt::CaseInsensitive)) + if (!knownDirs.contains(nd, Qt::CaseInsensitive)) knownDirs.append(nd); } } @@ -207,12 +201,13 @@ ProjectGenerator::init() dir = regx.left(s+1); regx = regx.right(regx.length() - (s+1)); } - QStringList files = QDir(dir).entryList(QDir::nameFiltersFromString(regx), QDir::Dirs); + QStringList files = QDir(dir).entryList(QDir::nameFiltersFromString(regx), + QDir::Dirs | QDir::NoDotAndDotDot); ProStringList &subdirs = v["SUBDIRS"]; for(int i = 0; i < (int)files.count(); i++) { QString newdir(dir + files[i]); QFileInfo fi(fileInfo(newdir)); - if(fi.fileName() != "." && fi.fileName() != "..") { + { newdir = fileFixify(newdir); if(exists(fi.filePath() + QDir::separator() + fi.fileName() + Option::pro_ext) && !subdirs.contains(newdir)) { diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 4c3df4efe8..5ea47cc867 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -749,7 +749,9 @@ UnixMakefileGenerator::defaultInstall(const QString &t) target = "$(QMAKE_TARGET)"; } else if(project->first("TEMPLATE") == "lib") { if(project->isEmpty("QMAKE_CYGWIN_SHLIB")) { - if(!project->isActiveConfig("staticlib") && !project->isActiveConfig("plugin")) { + if (!project->isActiveConfig("staticlib") + && !project->isActiveConfig("plugin") + && !project->isActiveConfig("unversioned_libname")) { if(project->isEmpty("QMAKE_HPUX_SHLIB")) { links << "$(TARGET0)" << "$(TARGET1)" << "$(TARGET2)"; } else { diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 6e08c138ed..a28760015e 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -234,14 +234,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("QMAKE_BUNDLE")) { t << "TARGETD = " << escapeFilePath(var("TARGET_x.y")) << endl; t << "TARGET0 = " << escapeFilePath(var("TARGET_")) << endl; - } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) { - t << "TARGETD = " << escapeFilePath(var("TARGET_x.y.z")) << endl; - t << "TARGET0 = " << escapeFilePath(var("TARGET_")) << endl; - t << "TARGET1 = " << escapeFilePath(var("TARGET_x")) << endl; - t << "TARGET2 = " << escapeFilePath(var("TARGET_x.y")) << endl; - } else { - t << "TARGETD = " << escapeFilePath(var("TARGET_x")) << endl; + } else if (!project->isActiveConfig("unversioned_libname")) { t << "TARGET0 = " << escapeFilePath(var("TARGET_")) << endl; + if (project->isEmpty("QMAKE_HPUX_SHLIB")) { + t << "TARGETD = " << escapeFilePath(var("TARGET_x.y.z")) << endl; + t << "TARGET1 = " << escapeFilePath(var("TARGET_x")) << endl; + t << "TARGET2 = " << escapeFilePath(var("TARGET_x.y")) << endl; + } else { + t << "TARGETD = " << escapeFilePath(var("TARGET_x")) << endl; + } } } writeExtraCompilerVariables(t); @@ -574,22 +575,36 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\n\t" << var("QMAKE_POST_LINK"); t << endl << endl; } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) { - t << "\n\t" - << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)\n\t" - << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"; - t << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << "\n\t" - << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << "\n\t" - << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET2)"); - if(!destdir.isEmpty()) + t << "\n\t"; + + if (!project->isActiveConfig("unversioned_libname")) + t << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)"; + else + t << "-$(DEL_FILE) $(TARGET)"; + + t << "\n\t" << var("QMAKE_LINK_SHLIB_CMD"); + + if (!project->isActiveConfig("unversioned_libname")) { + t << "\n\t" + << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << "\n\t" + << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << "\n\t" + << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET2)"); + } + if (!destdir.isEmpty()) { t << "\n\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t" - << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t" - << "-$(DEL_FILE) " << destdir << "$(TARGET1)\n\t" - << "-$(DEL_FILE) " << destdir << "$(TARGET2)\n\t" - << "-$(MOVE) $(TARGET) " << destdir << " \n\t" - << "-$(MOVE) $(TARGET0) " << destdir << " \n\t" - << "-$(MOVE) $(TARGET1) " << destdir << " \n\t" - << "-$(MOVE) $(TARGET2) " << destdir << " \n\t"; + << "-$(MOVE) $(TARGET) " << destdir << " "; + + if (!project->isActiveConfig("unversioned_libname")) { + t << "\n\t" + << "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t" + << "-$(DEL_FILE) " << destdir << "$(TARGET1)\n\t" + << "-$(DEL_FILE) " << destdir << "$(TARGET2)\n\t" + << "-$(MOVE) $(TARGET0) " << destdir << " \n\t" + << "-$(MOVE) $(TARGET1) " << destdir << " \n\t" + << "-$(MOVE) $(TARGET2) " << destdir << " "; + } + } if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); t << endl << endl; @@ -924,8 +939,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty() && !project->isActiveConfig("plugin")) { t << "\t-$(DEL_FILE) " << destdir << "$(TARGET) \n"; - t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) " - << destdir << "$(TARGET2) $(TARGETA)\n"; + if (!project->isActiveConfig("unversioned_libname")) { + t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) " + << destdir << "$(TARGET2) $(TARGETA)\n"; + } else { + t << "\t-$(DEL_FILE) $(TARGETA)\n"; + } } else { t << "\t-$(DEL_FILE) " << destdir << "$(TARGET) \n"; } @@ -1165,7 +1184,10 @@ void UnixMakefileGenerator::init2() project->first("VER_MIN") + "." + project->first("VER_PAT")); } - project->values("TARGET") = project->values("TARGET_x.y.z"); + if (project->isActiveConfig("unversioned_libname")) + project->values("TARGET") = project->values("TARGET_"); + else + project->values("TARGET") = project->values("TARGET_x.y.z"); } if(project->isEmpty("QMAKE_LN_SHLIB")) project->values("QMAKE_LN_SHLIB").append("ln -s"); diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index ac258e2841..2bd3301e16 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -397,8 +397,8 @@ QString VcprojGenerator::retrievePlatformToolSet() const return envVar; QString suffix; - if (vcProject.Configuration.WinPhone) - suffix = "_wp80"; + if (project->isActiveConfig("winphone")) + suffix = '_' + project->first("WINTARGET_VER").toQString().toLower(); else if (project->first("QMAKE_TARGET_OS") == "xp") suffix = "_xp"; diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp index 5ae99bab92..7896688e54 100644 --- a/qmake/library/qmakebuiltins.cpp +++ b/qmake/library/qmakebuiltins.cpp @@ -1064,10 +1064,18 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand( evalError(fL1S("shell_path(path) requires one argument.")); } else { QString rstr = args.at(0).toQString(m_tmp1); - if (m_dirSep.startsWith(QLatin1Char('\\'))) + if (m_dirSep.startsWith(QLatin1Char('\\'))) { rstr.replace(QLatin1Char('/'), QLatin1Char('\\')); - else + } else { rstr.replace(QLatin1Char('\\'), QLatin1Char('/')); +#ifdef Q_OS_WIN + // Convert d:/foo/bar to msys-style /d/foo/bar. + if (rstr.length() > 2 && rstr.at(1) == QLatin1Char(':') && rstr.at(2) == QLatin1Char('/')) { + rstr[1] = rstr.at(0); + rstr[0] = QLatin1Char('/'); + } +#endif + } ret << (rstr.isSharedWith(m_tmp1) ? args.at(0) : ProString(rstr).setSource(args.at(0))); } break; diff --git a/qmake/option.cpp b/qmake/option.cpp index a2bd938666..677899950c 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -488,7 +488,7 @@ bool Option::postProcessProject(QMakeProject *project) Option::dir_sep = project->dirSep().toQString(); - if (Option::output_dir.startsWith(project->buildRoot())) + if (!project->buildRoot().isEmpty() && Option::output_dir.startsWith(project->buildRoot())) Option::mkfile::cachefile_depth = Option::output_dir.mid(project->buildRoot().length()).count('/'); |