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>
(cherry picked from qtbase/9c63ad562bf0a44807f41ce49e4fe1b5ff181a63)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Change-Id: I6e05b9ad3350bd0da5b8a6dc1389ae05315a33df
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
(cherry picked from qtbase/27de4ea4d672d9f1b3a733f803f8605f81311d0a)
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
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>
(cherry picked from qtbase/69ab28031549ff1c9ceecdcb29197900e9bc4328)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
(or trivially marked const) ... by replacing them
with C++11 range-for loops.
Change-Id: I1522e220a57ecb1c5ee0d4281233b3c3931a2ff8
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
(cherry picked from qtbase/d9229d849f44cf94e4ee19fac390811b474127d2)
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
... 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>
(cherry picked from qtbase/8d7e913248aa1cad23447668d98911bba01faf4b)
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
... 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>
(cherry picked from qtbase/c9cb20c01a0f3fa93ff9f79fd7ea3f53939497c4)
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
sync up with qmake - this doesn't actually do anything in qtc.
Change-Id: I5e5df9f6d136601f0f36a8d645f90a1cab9995ad
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from qtbase/f8ef7e1d2619e6d394c57561bb275767f0517b24)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
when the file name is empty, the path will be returned verbatim. this
must be considered when constructing the return value.
Task-number: QTBUG-54550
Change-Id: Ie108ed52275e66a154ef63bd6f7193f55b3e0454
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/3c8134958c66f40bb86588aa91b83bf58b5de0c9)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
that can make sense if a function which determines the availability of
a dependency fails to do so for unexpected reasons.
Change-Id: If6cd113df25aee66830c120a2fab067c822a4543
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/1b4ea11332f74984a62a4cc4597ad49f5b5269dc)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
it didn't, which is rather unexpected.
Change-Id: I8cdb7b1490a8c2207809812b93cc65fbe23a1b98
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/339b9706ccbed4063a92337c9994731793558b0a)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
if() would simply "downgrade" a fatal error to a false condition, which
is certainly not expected.
Change-Id: Ie9c54f2bddf588856498bf795007b341b7c9363a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/b27d4835c2ae0d8767ca914acb72a4bdcea6fc85)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Sync up with qmake - this doesn't actually do anything in qtc.
Change-Id: I792599a4cd7822f109fa921f02207fb1b144b1d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/23bce6b169ca14ff72b672965ed5f89424c2d8fe)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
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>
(cherry picked from qtbase/1fd0d57ce3da83631423d17faadf97133f5c7835)
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
For unknown reasons tab order in listed UI files was set incorrectly and
behave unexpectedly. Now tab order behave naturally.
Changes made for next objects:
Core::Internal::ExternalToolConfig (externaltoolconfig.ui),
In QtCreator: Tools -> Options -> Environment -> External Tools tab.
Core::Internal::GeneralSettings (generalsettings.ui),
In QtCreator: Tools -> Options -> Environment -> Interface tab
Core::Internal::MimeTypeMagicDialog (mimetypemagicdialog.ui),
In QtCreator: Tools -> Options -> Environment -> MIME Types tab, choose
any MIME type in "MIME Type" column,
Core::Internal::MimeTypeSettingsPage (mimetypesettingspage.ui), In
QtCreator: Tools -> Options -> Environment -> MIME Types tab
Core::Internal::SystemSettings (systemsettings.ui),
In QtCreator: Tools -> Options -> Environment -> System tab
Change-Id: I04aefcb5ad75ef8b23fa1de324d986b45d5347bd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
On Windows disabling the crashhandler results in re-enabling the
Windows internal error reporting which causes trouble as well, so
limit disabling of crashhandler to Linux/OSX.
This patch more or less amends 80352d703c.
Change-Id: I0588cd22c2ff894e07378524baf03794963c92a1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Running SynchronousProcess (for adb) on the GUI thread is dangerous as
it might process unrelated events without returning, breaking
assumptions in other parts of Qt Creator. Rather run those things on a
worker thread, with a separate event loop, like we already do it when
starting processes.
Furthermore, returning, from start() or stop() while a thread is
running that accesses internals of AndroidRunner is also dangerous,
because most methods of AndroidRunner are not protected by relevant
mutexes and especially the destructor might get invoked while the
worker thread is still runnig. Thus, wait for the worker threads to
finish, in start() and stop().
This is a crutch, of course, as with proper locking we could keep the
GUI thread responsive while the adb commands are running, but just
serializing the execution reduces the risk of further breakage for now.
Change-Id: Ife92dc19aa8111374413590c3156027ba759746f
Task-number: QTCREATORBUG-16667
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
If ps is run from a different thread than the GUI thread, then we are
obviously not dealing with the "checkPID" function that's running every
second. We don't need to be overly prudent about starting another
process then. On the other hand, the blocking queued connection relies
on the ps shell not getting closed from a different thread in between
and it is generally a risk for creating dead locks.
Change-Id: Ief49fb18cc3199dc345c4d9ca0ee24b66d33343c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Use ' = delete' instead like everywhere else.
Change-Id: I63d0fd1adbc336f4b390b7c68d3f945e4045052c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If parsing the project is not finished we get an empty list of
files to be scanned.
Just trigger another full scan for such a case.
Change-Id: I84b275f76bc98c8f0ef544fc27d30ebd6f8b43d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
One step towards the removal of the TreeItem::m_flags member
that's unused in most instances.
Instead of introducing another conversion, use a QByteArray
to store the variable name.
Change-Id: Icbe591988178faaf77db558d968843d8eb2b0160
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
One step towards the removal of the TreeItem::m_flags member
that's unused in most instances.
Change-Id: I0cdc3d1e8a47c3925fb54c129b724ded8721577b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Use a Utils::TreeModel as base for the model. Avoid excessive
expansion of items during incremental search.
Change-Id: Ic2f51c7e467ea127ccf69ef7d122cec4a63be2f5
Task-number: QTCREATORBUG-15834
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is required to output the expression in the DebugView.
Change-Id: I3ce0bf4a916e30e8c86c224e305fa1c4af337489
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We have to use a non capturing group for the optional 'Id'.
Change-Id: I59431d78908a16f571febdf14c57bfe079ca6817
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The m_parserFuture.cancel() in ~BuiltinEditorDocumentProcessor() did not
cancel anything. Thus, closing a document while the parser was running
led to a blocking UI thread.
Now it cancels at the next include directive it encounters.
Change-Id: I092fddbbd747e0bc95265b6e9b4fcc26b3f76cb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
For unknown reasons tab order in projectwizardpage.ui was set
incorrectly and behave unexpectedly. Now tab order behave naturally.
Change-Id: I56dd70234b6ebd734b5893f50d4f7255c23639d8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
For unknown reasons tab order in customparserconfigdialog.ui
was set incorrectly and behave unexpectedly. Now tab order
behave naturally.
Change-Id: Ife117dd0dfd8c583e4bfe6b1191bdcae65bad05b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The source column can have contain real code so disable the
validator and trimm the expression because it is compared
with the already trimmed source in the rewriter.
Change-Id: I0cc684f8446799e3bd4ee77a8a9bb8077164f3b9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Also this is necessary to be at the right middle
position of QtCreator.
Change-Id: I691002b7ed5a29a1ea2094f62aba121b2a2e458e
Task-number: QTCREATORBUG-16673
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>