summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-10-31 20:09:14 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-01 06:02:55 +0100
commita732576a66ff2bbd9c0b41cd5f3505a4d2fbf043 (patch)
treed09875c3543ad837fbfaaf10bd4eef1d3de42941 /qmake
parentcd9de59177ccbeb7fdfacf8716af7bb20112c880 (diff)
parent8e20daae9fee5f3b999daffce0d7156015ee974b (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
Diffstat (limited to 'qmake')
-rw-r--r--qmake/doc/src/qmake-manual.qdoc6
-rw-r--r--qmake/generators/makefiledeps.cpp5
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp15
3 files changed, 21 insertions, 5 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index c1979c4bec..1cfe4c9979 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -1813,6 +1813,12 @@
which qmake will replace with the actual executable name. Other variables
include @ICON@, @TYPEINFO@, @LIBRARY@, and @SHORT_VERSION@.
+ If building for iOS, and the \c{.plist} file contains the key
+ \c NSPhotoLibraryUsageDescription, qmake will include an additional plugin
+ to the build that adds photo access support (to, e.g.,
+ \l{QFileDialog::setDirectory()}{QFile/QFileDialog}). See Info.plist
+ documentation from Apple for more information regarding this key.
+
\note Most of the time, the default \c{Info.plist} is good enough.
\section1 QMAKE_LFLAGS
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp
index 67c8219d4b..3140b045a1 100644
--- a/qmake/generators/makefiledeps.cpp
+++ b/qmake/generators/makefiledeps.cpp
@@ -46,6 +46,7 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <limits.h>
#if defined(_MSC_VER) && _MSC_VER >= 1400
#include <share.h>
#endif
@@ -986,9 +987,11 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
continue;
int matchlen = 0, extralines = 0;
+ size_t needle_len = strlen(interesting[interest]);
+ Q_ASSERT(needle_len <= INT_MAX);
if (matchWhileUnsplitting(buffer, buffer_len, y,
interesting[interest],
- strlen(interesting[interest]),
+ static_cast<int>(needle_len),
&matchlen, &extralines)
&& y + matchlen < buffer_len
&& !isCWordChar(buffer[y + matchlen])) {
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 029092fdaa..1739f66453 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -374,14 +374,21 @@ void NmakeMakefileGenerator::init()
project->values("QMAKE_DISTCLEAN").append(tgt + ".lib");
}
if (project->isActiveConfig("debug_info")) {
- // Add the compiler's PDB file.
- QString pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ QString pdbfile;
+ QString distPdbFile = tgt + ".pdb";
+ if (project->isActiveConfig("staticlib")) {
+ // For static libraries, the compiler's pdb file and the dist pdb file are the same.
+ pdbfile = distPdbFile;
+ } else {
+ // Use $${TARGET}.vc.pdb in the OBJECTS_DIR for the compiler and
+ // $${TARGET}.pdb (the default) for the linker.
+ pdbfile = var("OBJECTS_DIR") + project->first("TARGET") + ".vc.pdb";
+ }
QString escapedPdbFile = escapeFilePath(pdbfile);
project->values("QMAKE_CFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CXXFLAGS").append("/Fd" + escapedPdbFile);
project->values("QMAKE_CLEAN").append(pdbfile);
- // Add the linker's PDB file to the distclean target.
- project->values("QMAKE_DISTCLEAN").append(tgt + ".pdb");
+ project->values("QMAKE_DISTCLEAN").append(distPdbFile);
}
if (project->isActiveConfig("debug")) {
project->values("QMAKE_CLEAN").append(tgt + ".ilk");