... 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>
... and remove all instances that became redundant now.
this excludes everything that comes from outside qtc, or looks like it
could "leave" it.
Change-Id: Idc8baad17cd1ffdc5e160ec48ea3292d633a2562
Reviewed-by: Christian Stenger <christian.stenger@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>
...by giving the Quick app more time to finish.
Change-Id: I788715bcfa0949ee1873295eb869fb4e04fd00b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Together with [metaObject] and [connectionLists]. This also
saves a few cycles in the main code path.
Change-Id: I8460267f04a0c1d63ab0f991450863669cc760e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
While the properties were dumped properly, only the number of
static properties was shown.
Change-Id: I3ccd98478e62d99849f5012121d2ff2bda500319
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This seems to have side-effects on memory contents. Right now it is
unclear what happens exactly, so revert for 4.1rc.
Change-Id: I7b1b8e376ac84b6656b1abdae720d7bead1c0b89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Derived classes might have a real 'd' member. '[d]' on the other hand
is not a valid identifier and also fits into the '[children]',
'[parent]' etc scheme.
Change-Id: I60650a032c49caef1bf5553ebaae8d6b7d219d44
Reviewed-by: Christian Stenger <christian.stenger@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>
It is unclear why this was added, the qmake build does not have it
either, and it breaks linking on some versions of macOS.
Change-Id: I878273e072808416a12cf5c973f2ceacde549f74
Reviewed-by: Jake Petroules <jake.petroules@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>
"Error: A state cannot have the specified child item"
Change-Id: I83b4916126e0abe6b3b5ab5c6ccfc171e82fde4e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
rowCount() must return 0 when the parent is valid: this indicates that
the list's items has no children and thus it is no tree model. The
list's size has to be returned for an invalid parent (== the invisible
root node).
Change-Id: Ieaa884958ea0094aca2232160b6f769bf90514c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Selected items in the navigator tree are hard to read. This patch turns
the highlight slightly darker, which makes the light gray navigator item
text easier to read.
Change-Id: Ibe1de477f44ad8dfd7b53c3d7bd92b39ad0ed1a6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Set the selection color back to the previous one.
Task-number: QTCREATORBUG-16682
Change-Id: I13a00bde7fcceda5d911802e65afd3593b1630f5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Selected preprocessor code was unreadble: unsaturated red on turquese.
The selection color now defines a foreground color (the same as the
line number color).
Task-number: QTCREATORBUG-16682
Change-Id: Ibb213010557da5bd68fb5a22822cad467fd03092
Reviewed-by: Alessandro Portale <alessandro.portale@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>