while implementing stacks and queues was possible before with the help
of $$member(), these functions make it much more straight-forward.
[ChangeLog][qmake] Added $$take_first() and $$take_last() functions.
Change-Id: I4922a5331780e468a42c663c9ad3c6456a95a6bf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
we have perfectly good overloads which work with ProString itself, or
at least with QStringRef.
Change-Id: I45f39b8c2f83216f20849dd58eb3b8d78726083d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this also saves some of the cheap but ugly toQString() calls.
Change-Id: Iebe644986501db3878306521c76e4ba2c2fb97b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
the only place where this actually saves a deep copy is the evaluation
of if(), but as a side effect the parser is now able to deal with not
null-terminated strings, which is kinda nice as well.
Change-Id: Ib6d08617aa79d2f9eaecd4906d4d548f34bf377d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
saves some more cheap but pointless conversions to QString.
this makes the introduction of the ProStringList::contains(QStringRef)
overload necessary.
Change-Id: Ic61993bd9a4b28fbba1b8e346345fd5f5636c6f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this introduces an ambiguity, so some char* arguments need explicit
QString construction now.
Change-Id: Ic3919a1fa9419bbb3b57dd1aa7eb95643ee59e53
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this is done by recognizing the -- option and putting everything that
follows it into the QMAKE_EXTRA_ARGS variable.
the purpose of this is being able to pass "alien" arguments (for example
configure options) without having to marshal them into a qmake variable
assignment manually. this is expected to greatly enhance the convenience
when no wrapper script (i.e., configure itself) is used (which will be
the case outside qtbase).
Change-Id: I47735bdab2811d17d7d394fbf638ebd14332ea73
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define
and undef in src/corelib/tools/qsimd_p.h.
This change is also squashed with "Fall back to c++11 standard
compiler flag for host builds" which is done by Peter Seiderer.
Conflicts:
mkspecs/features/default_post.prf
src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch
src/3rdparty/sqlite/sqlite3.c
src/corelib/tools/qsimd_p.h
src/gui/kernel/qevent.cpp
src/gui/kernel/qwindowsysteminterface.cpp
src/gui/kernel/qwindowsysteminterface_p.h
src/plugins/bearer/blackberry/blackberry.pro
src/plugins/platforms/cocoa/qcocoasystemsettings.mm
src/plugins/platformthemes/gtk2/gtk2.pro
src/plugins/styles/bb10style/bb10style.pro
src/sql/drivers/sqlite2/qsql_sqlite2.cpp
tools/configure/configureapp.cpp
Task-number: QTBUG-51644
Done-with: Peter Seiderer <ps.report@gmx.net>
Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
Found by UBSan:
qmake/library/qmakeparser.cpp:278:33: runtime error: null pointer passed as argument 2, which is declared to never be null
Guard the call.
Change-Id: I99341ab439a511f366dae9344ddcc8727c33b9b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The user-defined copy assignment, copy constructor
and dtor inhibit the move special member functions.
Implement them manually.
Change-Id: I0d38d7cf6c9611e13b5b081d734d01d6fe4d5276
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Iterate only once over QJsonObject, create key list by
existing loop instead of create by QJsonObject::keys(),
which contains internal loop.
In common case if loop's statement is lightweight,
then effect of optimization is significant, and vice versa.
Also make addJsonArray() and addJsonObject() functions
more homogeneous.
Use reserve to optimize memory allocation.
Change-Id: Id122cd1becfd34bb06640876b1c79e1d396d2a6b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(or trivially marked const) ... by replacing them
with C++11 range-for loops.
Change-Id: I1522e220a57ecb1c5ee0d4281233b3c3931a2ff8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
To avoid detaches of these mutable Qt containers,
wrap the container in qAsConst().
Change-Id: If086bea06fe26232a7bb99fad8b09fce4dc74c27
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... by replacing them with C++11 range-for loops.
This is the simplest of the patch series: Q_FOREACH took a
copy, so we do, too. Except we don't, since we're just
catching the return value that comes out of the function
(RVO). We can't feed the rvalues into range-for, because
they are non-const and would thus detach.
Change-Id: I5834620bf82f3442da7b2838363d351a0fb960a0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
... iterate over the container itself instead. Avoids
temporary QList creation as well as the lookup cost
when actually calling value(key).
Change-Id: Icac867c30e63863cfa44a382eedd4d6df2070a59
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
while we evaluate the features themselves in precise mode (which is the
reason why they can error out), we do not want them to terminate
cumulative project evaluation.
Change-Id: I70f3e1bcb2ca04a70c74ff484749ca92c1cf6372
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/90ee4094161b427c32581bca2f5286edb4fffdb1)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
After 90e7cc172a, QStringList no longer
includes QDataStream.
This also reverts commit c1be0fbe7d, which
did the same in a worse way.
Change-Id: Ib10622b0da3b3450d29fc65dc5356fde75444a8f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from qttools/376501ae5a86859821c0e89b2e8fbc9906d11e07)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Use indexOf() to match individual characters, which is a lot faster than
QRegExp. As a side effect, don't try to expand what we just inserted.
Change-Id: I964fbd92055f2f2649e7d8ed5739cf1fc7cae927
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/2cc17a61eb6d0fee80fd388fcc5be03a59e4f2b5)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Qt 5.3 is the minimum requirement these days. Remove all fallback code
from sources and project files.
Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
(cherry picked from qtcreator/847f10e9ccc8c3541782a790e04c85c6b4c701da)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
(cherry picked from qtcreator/6431ab2c799553623ec3fe6a79f1e85484558dd6)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
this fixes an assertion failure with qt4 mingw specs when PATH contains
a "." element.
Task-number: QTCREATORBUG-12528
Change-Id: I2b6b7e02cf38881d40bd78bb0d705f7d58d0736c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
(cherry picked from qtcreator/d0428a05220ed0550dd84cdb8299a1fb37b0fe72)
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
assigning a relative path to QMAKESPEC or QMAKESPEC_ORIGINAL (in the qt4
windows legacy code) would lead to an assert further down the line.
just ignore such attempts silently.
Task-number: QTCREATORBUG-8477
Change-Id: Ie53d0ef004c743284b85de4e89f112e0161ff4b7
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/e017a1dc8b2030e509d6198315e9f6a9869667e7)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
just syncing up with qtcreator.
Change-Id: I2bda6961f6f1164bdc58acd78fa3d2221977f0cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/765ad6c3d28813d4baa0aeafd03076ba76557d3d)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
it could be only triggered by abusing the function (no expansion
actually done), and nobody is using this to start with, but still ...
Change-Id: I3d4a23ae4d1eea07955572d8213094e0dc218f6d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtcreator/cdc2a0f72334268684e0407e9b04b3188e00d4bf)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This prevents an access to free'd memory when opening qtcreator.pro.
Looks like qml2puppet.pro gets added to that cache in QMakeVfs::writeFile
with part of the including pro-file's filename in it. That part gets
cleaned when that containing ProFile goes out of scope, leaving a key in
QMakeVfs::m_files free'd but accessible.
Change-Id: I80b43d2fbb66c214647497ea97e6e3a587e274d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/336c3159617cdb3edd35021b5fb312d4d43f9a84)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
QProcessEnvironment caches keys, so we must not pass it QStrings created with
fromRawData()
Task-number: QTCREATORBUG-9142
Change-Id: I29fade02f3bc4110fafb1b04d44f2e653951a2ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qtcreator/99f15f1706868c4b2f84bc4164451bd69b3b8188)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
we execute foreach loops now. this is (mostly) safe nowadays, because
a previous change added precautions against exponential value list
growth, so it's unlikely that two nested loops would keep the cpu busy
for a day as before.
we continue to exclude forever loops and loops with excessive integer
counts.
Task-number: QTBUG-8550
Change-Id: Iaa116086986cc7fd5023834753f791dd205102e5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/dd4d594c787a62fa8aa12695c5d115c71b59bacd)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
ProFileCacheManager::discardFile(s) may remove an entry from
the ProfileCache only when it is unused (which is the case iff
ent->locker is zero).
Change-Id: I9df2079087af6bd0d35dd121db6222e8a6ec9389
Task-number: QTCREATORBUG-14730
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtcreator/dedcd25924743e494055c1e0195aeef0f3983a1d)
(cherry picked from qtcreator/b335b2a083e456e2b44b1e9454a0f4cd41e2a397)
(cherry picked from qtcreator/a027cbcd7051c634a51b6029dcb8a5b4bfe8b046)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
They are already held in QVector.
Change-Id: Ib1266956c860ecd4671501ab12ab932a8ce9b7d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>