summaryrefslogtreecommitdiffstats
path: root/qmake/library
Commit message (Collapse)AuthorAgeFilesLines
* qmake: fix move semanticsGiuseppe D'Angelo2019-07-181-2/+3
| | | | | | | | | | | ProFunctionDef is move-enabled, meaning its `m_pro` field can become nullptr. Its usage in the assignment operator and the dtor must therefore be protected with a check. Amends 9c63ad562bf0a44807f41ce49e4fe1b5ff181a63. Change-Id: I0c77b07dc83969565480bbb9d9fc80751d4246b1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Revert "Fix determination of source and build roots"Jörg Bornemann2019-07-041-26/+13
| | | | | | | | | | | | | This reverts commit 224a60989ed95e8b91ac88a12666af6e5a66e619. Turns out that we cannot just untangle the determination of source root and build root, because this breaks the assumption that every .qmake.conf results in a separate .qmake.cache in the build tree. QTBUG-76140 must be fixed differently. Fixes: QTBUG-76907 Change-Id: I5c0a3719d5e00a0f1cacad51651b47c1f284d22d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QDebug streaming operator for ProStringJoerg Bornemann2019-06-242-0/+8
| | | | | | | | | This saves us lots of .toQString() and .toQStringList() typing when qDebug()'ing qmake code. Change-Id: I037e5e1816f2dcb6a20dec4c275f3d886f155ad5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix determination of source and build rootsJoerg Bornemann2019-06-041-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | QMake searches a .qmake.conf file to determine the source root of the project, and a .qmake.cache to determine the build root. If a .qmake.conf exists but no .qmake.cache in the build directory is found, a build root would be set that is only valid if the build directory is at the same depth as the source directory. The invalid build root resulted in the creation of .qmake.cache files at "interesting" locations (e.g. high up in the directory tree), a potential cause for even more interesting build failures in the future. Fix this by splitting up the loop that determined build and source root. Both are now determined independently of each other. Fixes: QTBUG-76140 Change-Id: Ib5c922b87879fcf2f076298a69abcdbc4e8587b3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Recognize UNC paths as absolute (i.e. not relative)Edward Welbourne2019-02-131-1/+6
| | | | | | | | | | | | IoUtils::isRelativePath() didn't attempt to consider UNC paths, due to a belief that qmake fails on them so badly that it wasn't worth the extra code. However, it turns out Qt Creator's copy of this code does need to take this into account, so start the change off in qmake's version so as to keep in sync. Task-number: QTCREATORBUG-21881 Change-Id: I3084b87c1d3ca6508255e94e04ac8db3ceaebb7e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: add $$read_registry() functionOswald Buddenhagen2019-01-053-1/+270
| | | | | Change-Id: I7f9f17e0f44c273e4754d1decc92a8594cad8658 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash in qmake parsingAllan Sandfeld Jensen2018-11-291-2/+2
| | | | | | | | | | | | | The read from a QHash needs to be protected too if other threads are writing. sync-up with qtc, no actual effect on qmake itself. Fixes: QTCREATORBUG-21416 Change-Id: I75e5634e11b10056d6dbb6fdceef482ca2222ca1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from qtcreator/5f79b5d2e5e33321cdcd00362f0d6d9442a73ec2) Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* qmake: fix return type of toLongLong()Oswald Buddenhagen2018-11-211-1/+1
| | | | | | Fixes: QTBUG-71886 Change-Id: I62880e7ad8a1707c9094b07cf89d5c0c7841d235 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-092-7/+7
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| * Modernize the "textcodec" featureLiang Qi2018-11-072-7/+7
| | | | | | | | | | | | | | | | | | Also clean up QTextCodec usage in qmake build and some includes of qtextcodec.h. Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | qmake: fix file id mapping lifetime managementOswald Buddenhagen2018-08-244-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | turns out that flushing the ids together with the ProFile cache was an abysmal idea, as the latter expires after a few seconds after loading the project, while references to the ProFiles (and thus the underlying file ids) are kept for as long as the project stays loaded. the early flush would cause re-use of the file ids, which would wreak all kinds of havoc when re-loading projects. but just ref-counting the vfs class is insufficient as well, as then the ProFile cache (which expires after a timeout) could outlive all VFS instances and thus refer to ids which were discarded and later re-used. so we ref-count, and additionally let the cache instance hold a reference to the vfs class. this is sync-up with qt creator; no actual effect on qmake itself. amends 190aa94be. Change-Id: Idd4478ffc1c2405b3b83df32fba45b1f687f6a18 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> (cherry picked from qtcreator/d03fb350672d311dccc06f0bcb4da744a3c99745) (cherry picked from qtcreator/1ddfb443b686ef04cc0e28363308ce70d01f0d73) Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | qmake: Apply modernize-use-nullptrAlessandro Portale2018-08-087-25/+25
| | | | | | | | | | | | | | Use nullptr instead of 0. Change-Id: Ib3120b9c424a274a2d4dd4c42ec5d7cd5bdead65 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge branch '5.11' into devEdward Welbourne2018-07-312-163/+172
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| * qmake: break out testFunc_cache() from evaluateBuiltinConditional()Edward Welbourne2018-07-202-163/+172
| | | | | | | | | | | | | | | | | | | | It's 160ish lines and adequately isolated. Still, it *might* be contributing to compilers being slow (unlikely though that seems) so seemed worth tidying up anyway. Task-number: QTQAINFRA-2117 Change-Id: I9e55e677552c273fdf3480ccefc229fd6fd2b66a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | qmake: make access to raw data temporaries safeOswald Buddenhagen2018-06-273-76/+160
| | | | | | | | | | | | | | make sure the access is properly scoped and does not recurse. Change-Id: Iaa345cd2771811281b9ed6f634c70235a78c3c33 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | qmake: centralize resolution of file name arguments to qmake functionsOswald Buddenhagen2018-06-272-17/+23
| | | | | | | | | | Change-Id: Id867e4653b0ec506332174ae67c9ee21e722c1e3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | qmake: make argument validation of built-ins data drivenOswald Buddenhagen2018-06-274-777/+618
| | | | | | | | | | | | | | | | | | | | | | | | | | at the time this patch was conceived, it was meant as an exercise in getting rid of usages of ProString::toQString(m_tmp). however, this was meanwhile superseded by use of toQStringView(). but the change itself should have been done a long time ago already, and there is no harm in going through with it. on the way, this also unifies and fixes some of the error messages. Change-Id: I337aff994c508df783df4794c3fa0762d83a691b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-073-6/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * qmake: skip empty parts when splitting strings in some more placesOswald Buddenhagen2018-06-013-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and make it explicit where we can't do that for semantical or backwards compat reasons. most urgently, this fixes an assertion failure when $QMAKEFEATURES contains empty paths (e.g., due to a trailing semicolon). notable observation: QByteArray::split() has no argument for the split behavior (it always keeps empty parts). Task-number: QTBUG-47325 Change-Id: I72d4b2e154a2ed1802cfa98fb4a5211a68e43231 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | qmake: make even more use QStringRef and QStringView overloadsOswald Buddenhagen2018-05-071-5/+4
|/ | | | | Change-Id: If067368529f89347a4618a24e2737e04b4fc0ce3 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-297-98/+227
| | | | | | | | | | | | | 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-222-3/+7
| | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-143-21/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-316-58/+60
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-262-18/+14
| | | | | | | | | | | | | | 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>
| * qmake: make yet more use of ProString::toQStringRef()Oswald Buddenhagen2017-08-265-15/+22
| | | | | | | | | | | | | | | | | | in most cases, the main advantage is not using toQString(m_tmp), which reduces the possibility of raw data leaks. in cases where we used toQString() without temporary, this is a slight optimization. Change-Id: Ib343acffd383aa2c4fefab75fb52762fb534dfc6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-157-28/+53
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * Change source identifier type in ProStringOswald Buddenhagen2017-08-157-28/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strings remember in which file they were created/assigned. However, this used a non-counting reference to a ProFile, which could become dangling. If a subsequent ProFile re-used the exact same address, a string's source would be mis-identified, which would be fatal in conjunction with discard_from(). Since we actually need only a unique id for comparison, let's use an integer for that. Task-number: QTBUG-62434 Started-by: Simon Hausmann <simon.hausmann@qt.io> Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-072-0/+38
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * Preserve last modification timestamps of installed directoriesSimon Hausmann2017-05-022-0/+38
| | | | | | | | | | | | | | | | | | Similar to the two parent commits, this patchs preserves the time stamps of files we install as a result of recursive directory copying. Change-Id: Id5931a467196d5cd67acfa0deffc2488af8a3669 Task-number: QTBUG-59004 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-203-57/+76
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Preserve last modification timestamps of installed filesSimon Hausmann2017-04-123-57/+76
| | | | | | | | | | | | | | | | | | | | | | On non-windows platforms, we use the "-p" parameter of install(1) to preserve the last modification timestamps of files. On Windows the use of copy does not preserve them. As a cross-platform solution, this patch introduces a simple built-in install command in qmake to copy files. Task-number: QTBUG-59004 Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QVersionNumber: add fromString(QStringView/QLatin1String) overloadsMarc Mutz2017-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parsing code anyway operated on a QByteArray created from toLatin1(), so expose this to the user by providing a QLatin1String overload. Also provide a QStringView overload, since we can. Port one user (in qmake) to the new overload. [ChangeLog][QtCore][QVersionNumber] Added QStringView and QLatin1String overloads of fromString(). Change-Id: Idbff44c3997f5cfa86ea1bce8b3da4b700a3d9cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | qmake: use new QString::arg(QStringView) overloadMarc Mutz2017-04-073-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | Add ProString::toQStringView() to avoid creating QStrings just to pass them to QString::arg() (single-arg; multiArg() does not, yet, accept QStringViews). I could have used the existing toQStringRef() function, but QStringRef is a tad more complex to copy and quite a bit less future-proof. Change-Id: I344c46f301768e844c487d36ce3e6cb276de8843 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>