summaryrefslogtreecommitdiffstats
path: root/qmake
Commit message (Collapse)AuthorAgeFilesLines
* Set WindowsTargetPlatform[Min]Version if WindowsSDKVersion is setJoerg Bornemann2018-04-061-5/+19
| | | | | | | | | | | This fixes qmake-generated project files for Visual Studio 2017 for setups where the Windows 8.1 SDK is not installed. Task-number: QTBUG-66265 Change-Id: I67712019f7142e40262f171eb23f9f1e6ab3a251 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: minor fixups to ioutils for building in qt creator contextOswald Buddenhagen2018-03-292-5/+8
| | | | | Change-Id: If82a5387a03f400cde04d582dd7e8567a2b661a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: updates to the parsing code of external propertiesOswald Buddenhagen2018-03-292-20/+38
| | | | | | | | | | | | | | sync-up with qt-creator; no effect on qmake. Change-Id: I7555de5c72a9250b31e20fc60e39680d19882fcb (cherry picked from qtcreator/2cb7c81e620d224d386860a637dc889acb15435e) (cherry picked from qtcreator/89868ee2b9093ecf40602ae302b991d6a60014b0) (cherry picked from qtcreator/03e699ce2985eedcd33d247aa47d04b14bc4bc04) (cherry picked from qtcreator/61419e7bf0f3bff6dcf63876b05b72c56e60c2a8) (cherry picked from qtcreator/19eaf87ef95a510351557119a955223a4aeea7b3) (cherry picked from qtcreator/3080bda0661989e88dfa62101b4c3f5d5e6754a1) (cherry picked from qtcreator/99714239b616e628ff4e0afe3db7eb7511ccf569) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: remove unnecessary QMakeGlobals::setProperties() overloadOswald Buddenhagen2018-03-292-8/+0
| | | | | | | | sync-up with qt-creator; no effect on qmake. Change-Id: I926bc97fe6fa510ac5a8fe77b64014333a69bd04 (cherry picked from qtcreator/8a69c254757eab7852443b5e4bd5eafb68908d3d) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: add text codec support to VFSAlessandro Portale2018-03-292-1/+30
| | | | | | | | sync-up with qt-creator; no effect on qmake. Change-Id: I34b42bd19e0de973deb2291e91f306d1ca7c630e (cherry picked from qtcreator/15148d8e4454ff3277131ea52a4204c5fa0b7ab0) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: make VFS aware of exact vs. cumulative evaluationOswald Buddenhagen2018-03-298-99/+228
| | | | | | | | | | | | | sync-up with qt-creator; no effect on qmake. comment on cherry-pick: this is actually a lot more than a cherry-pick, because the dual VFS needs to deal with the file ids which were concurrently introduced on the qmake side. Change-Id: I2c1eb16c97526fa275a1c6a2eae9266d385859ac (cherry picked from qtcreator/424639ecac9d2e404d2bfaff7f46b45ed98664b8) (cherry picked from qtcreator/a8010b0fff47d903d4a1f80e3adb1a2ef41beb33) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: make IoUtils::fileType() return more expressive resultOswald Buddenhagen2018-03-292-2/+2
| | | | | | | | | | it now does not see anything except regular files and directories any more. that's not expected to be a problem, given the function's scope. Change-Id: I53063ad8cacb3afe5cc1baf6d6d5feba3465e74f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> (cherry picked from qtcreator/cf82f210804151452fce3cddb3cb2793dab976eb) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: let QMakeVfs::readFile() report ENOFILE explicitlyOswald Buddenhagen2018-03-293-13/+21
| | | | | | | | | | | | | | | when the QFile object is already constructed, querying whether the file exists is actually cheap, so do it right away instead of later on demand. that makes the calling code a bit cleaner. fwiw, that we need to explicitly query the file's existence at all is a result of QFile's completely useless error "codes" (which merely say which function failed, as if the caller would not know). Change-Id: Ifec39d05b1713d8128046f679287e510f10e45dc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> (cherry picked from qtcreator/5ba32e3484ead2e35cc7732dcd59a97e7459dbfd) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: make message about not found mkspec less confusingOswald Buddenhagen2018-03-291-1/+1
| | | | | | | Change-Id: I9cfa2c9476d3d7fdb68b0a23e175eea4b3b11ad9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> (cherry picked from qtcreator/c0ddf0a34407f9d3ad9f575176550ba33d536d12) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: prevent .prf files from postponing work to build passesOswald Buddenhagen2018-03-291-14/+25
| | | | | | | | | | just a sync-up from lupdate; no effect on qmake itself. alternative source: qt-creator/7e86b98836342035684cc1c1aa49292224faed07. Change-Id: I5e10b44637d527799f55c578a99076eb4750f131 (cherry picked from qttools/8e7e60dbdea04c943bc6d50290db12d3fefd39f2) Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make sure $$relative_path() uses an absolute path as its first argEdward Welbourne2018-03-223-7/+18
| | | | | | | | | | | | | | | | Thanks to QTBUG-61373, this qmake function was called with /usr/local/5.10.1 as baseDir, which isn't absolute, leading to an assertion failure. We could raise the error within qmake but it proved easier to simply resolve any non-absolute baseDir using PWD, before trying to use it as an absolute path. Did the same for $$absolute_path(). Documented both. Adjusted the assert that caught this to report any non-absolute path that upsets it. Added simple tests, fixed an existing test. Task-number: QTBUG-66156 Change-Id: Icfef2e2f5b236e071177c9beffa38d71bf404292 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* XCode: Fix the output paths for extra compilers with fileFixify()Andy Shaw2018-03-171-1/+2
| | | | | | | | | This ensures that the generated XCode project can correctly find any files that are referenced via a path containing "..". Task-number: QTBUG-35131 Change-Id: I049bc2279b4c515a82acd61142d25b8c240e8f6e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-145-22/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Document what the QT qmake variable does in more detailMitch Curtis2018-01-241-0/+3
| | | | | | | | | | | | | | | | | | Make it clearer what the variable actually does by mentioning that it makes its headers available for inclusion and causes it to be linked to the binary. Change-Id: I72821d4bceea7a92e91175ba6c5acc4c3377d7b7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Use a proper test for absolute path for qmake's locationEdward Welbourne2018-01-181-1/+4
| | | | | | | | | | | | | | | | | | QFileInfo.isRelative() deems any path starting with a slash to be absolute; on MS-Win, such paths need a drive specifier (unless they're UNC), so use IoUtils's more robust test for absolute paths. Change-Id: I7d0872a87833cbf1cc1a6ef107941adc4c529624 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * qmake: require a drive in a DOS path for it to be absoluteEdward Welbourne2018-01-183-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Q_OS_WIN, a path is only truly absolute if it includes a drive letter; merely starting with a slash is not enough. (We can't support UNC paths, so don't even try: qmake runs various commands in the source directory using CMD.exe, which doesn't support UNC as PWD.) This requires, when resolving a path relative to a root, transcribing the root's drive to such not-quite-absolute paths. Changed QMakeGlobals, $$absolute_path() and $$relative_path() to now use IoUtils::resolvePath() rather than delegating to QDir's absolute path method, since that doesn't correctly recognize the need for a drive letter (and qmake did run into problems with some paths, from splitPathList and a failing test, as a result). Moved existing ioUtils tests for handling of relative / absolute paths out into separate functions and expanded significantly. Fixed some existing tests to use an absolute path where one is needed; added two tests involving driveless (but rooted) paths; and fixed the test init to set a value for QT_HOST_DATA/src property (the lack of which lead to an assertion failure with this fix). Task-number: QTBUG-50839 Change-Id: I2bfc13c1bfbe1ae09997274622ea55cb3de31b43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Doc: Fix typos in qmake function referenceAaron Linville2018-02-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed duplicate "for the". Function list was sorted except for sprintf; so sorted it. Also, minor grammatical improvement. Task-number: QTBUG-64362 Task-number: QTBUG-64363 Change-Id: Ia47c5195011a0e578e916897b3a5ddb1d78170ad Reviewed-by: Frederik Schwarzer <schwarzerf@gmail.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Create corelib/serialization and move existing file formats into itThiago Macieira2018-01-263-33/+29
| | | | | | | | | | | | | | | | | | This is in preparation to adding CBOR support. We don't need yet another dir for CBOR and placing it in src/corelib/json is just wrong. Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-12/+0
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
| * | Doc: QMake: Remove dependencies to non-existent documentation modulesTopi Reinio2018-01-121-12/+0
| | | | | | | | | | | | | | | | | | | | | These are no longer part of Qt 5 and produce documentation warnings. Change-Id: I82242b7b03d7ece1b82e2ff75dc6673f471e2df2 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | doc: Remove inappropriate qdoc comment markersMartin Smith2018-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the '!' from two comments because the functions being documented are static functions declared and defined in the .cpp file. They are not public. Change-Id: Ie3b2c32c64102634b6b2a4c438da191536a426d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-116-33/+126
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| * | qmake: Introduce precompile_header_c for MSVCOrgad Shaneh2018-01-083-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC requires that the C PCH file is compiled (as an object) and linked if any C file is found, and the same for C++. Most qmake projects are C++. If a C++ project has a precompiled header, it is typically of C++ type, and cannot be compiled as C (for example, it contains or includes classes). Since there is no easy way to conditionally build the C PCH file only if C files are found in the project (as done for g++), we need a setting that is disabled by default. This amends 30331afda118. [ChangeLog][Tools][qmake] Introduced precompile_header_c CONFIG option for MSVC to enable precompiled header for C sources. Task-number: QTBUG-65103 Change-Id: Id9688a35ee7d9b5e4f5a846b81986cb674bc5f4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-073-4/+17
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp Change-Id: Ib6dd965a7eb6f59103e276b3407739147ecd37b2
| | * qmake: set COPY_PHASE_STRIP to NO in Xcode generatorJake Petroules2018-01-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Xcode 6.3, this must be set to NO because stripping on copy is no longer fully supported due to the potential of input binaries being code signed. In this case Xcode will simply ignore the strip step and issue a warning since stripping would invalidate the code signature. This change silences that annoying warning for release builds. Also, the setting assignment is moved from being hardcoded in the generator, to a QMAKE_MAC_XCODE_SETTINGS value. Change-Id: If25511edddc12b7b0407e2992d80884b7d6437dc Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| | * qmake: replace invalid characters in generated bundle identifiersJake Petroules2018-01-051-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | This problem does not affect the Xcode generator. Task-number: QTBUG-65477 Change-Id: I6194edc5b679edad9ae1a25e35b71e5df9bd4c95 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * qmake: Handle QMAKE_LINK_OBJECT_MAX being unset for static librariesMartin Storsjö2018-01-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This was missed in 8bebded9. Task-number: QTBUG-63637 Change-Id: I6be472430a9aa8f533def4fd6c14c8dbfe8b6f70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Rewrite the Info.plist variable replacement handlingJake Petroules2018-01-062-16/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that the same set of variables can be successfully replaced in both the Makefile and Xcode generators. It also switches the default templates to use the Xcode-style ${var} syntax instead of the @var@ syntax for better Info.plist compatibility across generators. Change-Id: Iff330bafd152773aafac9143c4a34e34f92f0ce6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-023-7/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-302-4/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * fix "make clean" of qmake in a builddir with spaces on mingwOswald Buddenhagen2017-12-141-1/+1
| | | | | | | | | | | | | | | Change-Id: Ice61a11250694afa66f263fa79a74ff9642ef285 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Stop blocking the ability to generate dSYM debug symbols with XcodeJake Petroules2017-12-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Xcode, the default value for GCC_GENERATE_DEBUGGING_SYMBOLS is YES, which causes Xcode to emit debug symbol bundles (.dSYM) on macOS and iOS *if* DEBUG_INFORMATION_FORMAT is also set to dwarf-with-dsym. Since that setting is already set to an appropriate value with debug vs release builds, the default Xcode value for GCC_GENERATE_DEBUGGING_SYMBOLS is already correct and in effect the only thing qmake was doing was always setting GCC_GENERATE_DEBUGGING_SYMBOLS to a wrong value for release builds - it should be YES in all cases, to allow the .dSYM bundles to be generated in release mode, which is in fact the only case where they're really needed in the first place. Task-number: QTBUG-41246 Task-number: QTBUG-50896 Change-Id: I07639a3c4ff9f62d591cde3ad66748767d475e3b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Move a QRegExp out of a deeply nested loopJake Petroules2017-11-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This helps alleviate a performance issues where by building iOS based projects takes a significantly longer amount of time than it should. Task-number: QTBUG-59136 Change-Id: I77ae12f507725ceb11106b484d73bb7d46e0845c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | doc: fix signatures and missing module headersMartin Smith2017-12-141-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | The update adds the moduleheader variable to the qdocconf file for qttestlib.qdocconf and qmake.qdocconf. The problem with qmake is that it doesn't have a module header file, but it does have qmake_pch.h, which is used here. This update also corrects several \fn commands in the qttestlib docs. Change-Id: I2202b9db96390bac1ee491ca8a99ca9010057ce3 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-161-7/+1
|\| | | | | | | Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
| * qmake: Actually resolve QMAKE_SHELL_NULL_DEVICE when writing to MakefileOrgad Shaneh2017-10-161-1/+1
| | | | | | | | | | | | | | This is C++, not qmake code. Amends 5fa6438633. Change-Id: Ie5b88c3a06dbe089948488ea3b4b297a08164113 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Qmake: Introduce and use QMAKE_{SYSTEM,SHELL}_NULL_DEVICE variable, take 2Orgad Shaneh2017-10-131-7/+1
| | | | | | | | | | | | | | | | | | | | SYSTEM is used for system() calls, while SHELL is used in the target Makefiles. Task-number: QTBUG-62985 Change-Id: Ia75d3939c59c98699359421166433e8b4a6ee35e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-041-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| * Fix docs about QMAKESPEC in INCLUDEPATHMichal Klocek2017-09-251-2/+2
| | | | | | | | | | | | | | | | QMAKESPEC is added in makefile generator, it is not in INCLUDEPATH. Change-Id: I2451b3c7b30bc237157e68e5ce9de67f55e784b2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-201-4/+19
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| * Win: Handle installation of read-only target files correctlyAndy Shaw2017-09-131-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | When the source file is read-only then it would copy the file with that attribute set when it is installed. However this will cause a problem if it is installed a second time. Therefore the read-only attribute needs to be manually reset before installing and again before touching the file. Once the process is done then it is set back to be read-only to preserve the state of the original. Change-Id: I1c01f418ef3c9bd434acd2c2b8ee695544d7bb35 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-319-66/+97
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * qmake: fix hypothetical raw data leak in $$replace()Oswald Buddenhagen2017-08-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the replacement value may well constitute the whole output string - this is in fact common, given this rather typical usage pattern: BAR = $$replace(FOO, -flag, -otherflag) this must be considered when constructing the return value. compare 3c8134958c6. as of now, this is irrelevant, as QString::replace(QRegExp, QString) will always memcpy the replacement into a detached copy of the target, but one never knows. Change-Id: Ia1f271f45023746040fc28ce6d88a6609e05e5c2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qmake: fix hypothetical raw data leaks relating to qt i/o classesOswald Buddenhagen2017-08-261-5/+9
| | | | | | | | | | | | | | | | technically, we should not rely on the i/o classes not storing the strings beyond the instantiated object's life time. Change-Id: I0990769b3cf86860184869036c096c531160e9be Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qmake: remove pointless use of raw data in $$[QMAKEFEATURES] accessOswald Buddenhagen2017-08-262-2/+1
| | | | | | | | | | | | | | | | | | property values are de-facto guaranteed to be backed by full QStrings, so there is nothing to be gained from using the raw data optimization, while doing so risks raw data leaks. Change-Id: I3d43da9aaadd4d5811c4b1a9d7ac734049da423c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qmake: remove seemingly pointless QString::detach() callsOswald Buddenhagen2017-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | it's not clear why detaching would be necessary; there is no danger of a raw data leak here. concatenating a QStringRef with a non-empty QLatin1String (the only expected use of this overload) will yield a detached QString anyway, so this makes little difference in practice. amends f137957e08. Change-Id: I521c0e89a8b0c1ae62b1450e81b0ae91a931bcfa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qmake: prune obsolete QString::detach() callOswald Buddenhagen2017-08-261-3/+1
| | | | | | | | | | | | | | | | | | no m_tmp is involved any more in this code path; it uses QStringRef. amends 11d957d04381. Change-Id: Ib272d61edfb150a549c5e6a9a60d53502702e802 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qmake: make more use of ProString built-insOswald Buddenhagen2017-08-263-19/+15
| | | | | | | | | | | | | | saves some noisy toQString() uses. Change-Id: I62a9e2725c4baabac311124d19c7d8b40f54c8f7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qmake: fix raw data detach avoidanceOswald Buddenhagen2017-08-263-12/+6
| | | | | | | | | | | | | | | | | | the m_tmp array is a member, so the index toggle for accessing it also needs to be one - otherwise, odd iteration counts will defeat the mechanism. Change-Id: If7a800ed5a4b4168625daf1ebbd5d2d164569d8e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qmake: fix excessive detaching of raw dataOswald Buddenhagen2017-08-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | ... in $$basename(), $$dirname(), and contains(). the latter case is marginal, as it only applies to mutuals which are regexes, which i don't remember ever seeing used. QRegExp saves a copy of the matched string, so it's necessary to alternate between two temporaries to avoid detaching. we already did that in most places. Change-Id: I97b8294585c17c76d1756f83971f42cb88353af0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>