Commit Graph

46994 Commits

Author SHA1 Message Date
Marc Mutz
ccdcbc55ca qmake: don't iterate over .keys()
... 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>
2016-08-02 07:55:26 +00:00
Marc Mutz
5c812f77e2 qmake: replace a Q_FOREACH loop with QList::op+=
Change-Id: Ibaa49f0d6ea5cbcb5d4d305ec9c55286eac5046e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
(cherry picked from qtbase/dce2612a7c511e85c5a1b46d1e76b88b56be4c99)
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:55:20 +00:00
David Schulz
69088860eb QMake: Add option to set qt.conf file
Change-Id: Ie5db11892ccf2d357773a4db6a0464bf27be9a26
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/dbf1c2eb9f4e1feb24a58699b7b550016802e386)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:55:13 +00:00
Oswald Buddenhagen
fb9e43ba44 terminate when command called by system() got SIGINT or SIGQUIT
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>
2016-08-02 07:55:06 +00:00
Oswald Buddenhagen
e1cee308a9 fix raw data leak in $$absolute_path()
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>
2016-08-02 07:54:55 +00:00
Oswald Buddenhagen
bb1ce1cd56 fix calculations of worst-case size requirements for token buffer
Task-nubmer: QTCREATORBUG-16508
Change-Id: I3aa4c736acec44f95a0a33c7baae9276568f684f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/d459a6b0e0d4f128caceaafe981ecf374bb3e420)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:54:51 +00:00
Oswald Buddenhagen
1a58cd361a fix custom functions inheriting other functions' arguments
Task-number: QTBUG-41830
Change-Id: Iba3eee4975a1ee671b7190e52c0efc9a18147c62
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/dacf3994ba29106132c3a377dba303acdb74daca)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:54:46 +00:00
Oswald Buddenhagen
32f3eccade make error() propagate from requires() and REQUIRES=
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>
2016-08-02 07:54:41 +00:00
Oswald Buddenhagen
3fe303ebfe make error() propagate from custom replace functions
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>
2016-08-02 07:54:36 +00:00
Oswald Buddenhagen
b4ac7f6d2c fix error() not propagating through if()
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>
2016-08-02 07:54:30 +00:00
Oswald Buddenhagen
fcbaf24181 nuke dead expandVariableReferences() overload prototype
Change-Id: I0c6fceac0b984e4613932b8507a632dd83d0e79b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/d0055e9fd7825f9033b26f9aa421e218e44dadde)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:54:23 +00:00
Mat Sutcliffe
27853f8234 qmake: Fix missing newlines in generated vcxproj files
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>
2016-08-02 07:54:18 +00:00
Marc Mutz
bbb353b113 qmake: fix UB in QMakeParser::putHashStr()
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>
2016-08-02 07:54:13 +00:00
Anton Kudryavtsev
73fead33dc QMake: replace QStringLiteral with QLatin1String
... in string comparisons. It's more efficient.

Change-Id: I5d54ab7777a0838455eaaac671e735eb37bfe243
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/f384c3097911c523e67620b77b1086e4788cd209)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
2016-08-02 07:54:05 +00:00
Oswald Buddenhagen
c9a7a79970 make write_file() capable of making files (not) executable
Change-Id: I9ca96bc3408160261781697a3471c1f446c86c3a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
(cherry picked from qtbase/57ca8d2698f1eaf30f1110ba47445c04d2bcd0f7)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:54:01 +00:00
Oswald Buddenhagen
45b854dbd5 enable c++11 really globally
... 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>
2016-08-02 07:52:38 +00:00
Nazar Gerasymchuk
9611294dd2 Core: Fix tab order in several UI forms
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>
2016-08-01 17:05:24 +00:00
Robert Loehning
81bae84411 Squish: Stabilize tst_simple_analyze
...by giving the Quick app more time to finish.

Change-Id: I788715bcfa0949ee1873295eb869fb4e04fd00b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 16:21:39 +00:00
Leena Miettinen
13da2bcc57 Doc: Add Nim code snippets to list of editable snippets
Change-Id: I77234d5b79cbd7c4a7c96548ac3ef1c23bed66c9
Reviewed-by: hjk <hjk@qt.io>
2016-08-01 15:07:00 +00:00
David Schulz
f6f3e02e4a CppEditor: Adjust completer tests to latest changes
Change-Id: I79cefaab88340e37161a31b1f356901dde947a0c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 13:29:57 +00:00
hjk
36875ad4f3 Debugger: Move rarely interesting [extraData] out of sight
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>
2016-08-01 13:21:42 +00:00
Tim Jenssen
bb55a510cf QmlDesigner: make gotoCodeClicked more safer
Change-Id: I2861cf0e1f1c173b548e586a4fa43e8bc9f9c4da
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-01 13:10:50 +00:00
hjk
d5d449e421 Debugger: Fix display of dynamic properties
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>
2016-08-01 11:46:44 +00:00
hjk
ceb883e56f Debugger: Add new build path do automatic source mappings
Change-Id: Ibdd67b91b9b99eb8188b562692afe7855931d6f6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-01 11:42:39 +00:00
hjk
d1109c50e0 Debugger: Deactivate metaObject extraction by inferior call
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>
2016-08-01 10:45:47 +00:00
hjk
33b73c5cc4 Debugger: Remove unused DebuggerKitConfigWidget::indexOf()
Change-Id: I8614aa692affa17c5fac754b1c4b247105dc5540
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:45:40 +00:00
hjk
4c4698917e Debugger: Robustify QObject detection
Change-Id: I24aa26134e674725c84f511ac610dc06a76a775d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-08-01 10:45:33 +00:00
hjk
7b1a1305db Debugger: Use '[d]' for artificial QObjectPrivate member
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>
2016-08-01 10:18:12 +00:00
Christian Stenger
89ede98904 Tests: Only disable crashhandler on UNIX
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>
2016-08-01 08:36:31 +00:00
Ulf Hermann
6c2036d900 Android: Run stop() asynchronously
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>
2016-08-01 08:09:26 +00:00
Ulf Hermann
cbd738ab90 Android: Don't use blocking queued connections for running ps
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>
2016-08-01 08:09:21 +00:00
Christian Kandeler
5d34676fdc qbs build: Remove "-s" from linker flags
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>
2016-08-01 07:27:01 +00:00
Christian Kandeler
f634141010 Update qbs submodule
To HEAD of 1.6 branch.

Change-Id: Ia7c21675bbdde16e4d1131b98d02b05d8f5b2340
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-01 07:22:54 +00:00
Christian Stenger
18ac6b8be1 AutoTest: Minor fix for initial test scan
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>
2016-08-01 07:21:48 +00:00
Leena Miettinen
d1a5d164b1 Doc: Add QML JS static analysis message M128
"Error: A state cannot have the specified child item"

Change-Id: I83b4916126e0abe6b3b5ab5c6ccfc171e82fde4e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-01 07:17:45 +00:00
Lorenz Haas
69143bc3a9 Wizards: Fix list model wizard's rowCount()
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>
2016-07-31 09:23:38 +00:00
Alessandro Portale
f41e1d3a31 QmlDesigner: Fix Flat Dark QmlDesigner_HighlightColor
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>
2016-07-30 12:12:28 +00:00
Alessandro Portale
5e93c5efa9 creator-dark scheme: Make selection behave with the other colors #2
Set the selection color back to the previous one.

Task-number: QTCREATORBUG-16682
Change-Id: I13a00bde7fcceda5d911802e65afd3593b1630f5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-30 11:59:20 +00:00
Alessandro Portale
39ddd353e4 creator-dark scheme: Make selection behave with the other colors
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>
2016-07-30 11:52:04 +00:00
hjk
80b402403a CppEditor: Rework CppIncludeHierarchy model
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>
2016-07-29 13:13:02 +00:00
Thomas Hartmann
5c5197d19d QmlDesigner: Adding debugging operator to BindingProperty
This is required to output the expression in the DebugView.

Change-Id: I3ce0bf4a916e30e8c86c224e305fa1c4af337489
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-29 12:11:47 +00:00
Thomas Hartmann
7c3f61f819 QmlDesigner: Fix regular expression
We have to use a non capturing group for the optional 'Id'.

Change-Id: I59431d78908a16f571febdf14c57bfe079ca6817
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-29 12:11:38 +00:00
Leena Miettinen
ecbd1fa408 Doc: Update creating components and screens with Qt Quick Designer
Add dependency to the Qt Quick Controls 2 docs

Change-Id: Idcbb856cf38d8867dc781ade572cf18f87983912
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-29 12:10:13 +00:00
Leena Miettinen
dfd3568a70 Doc: Update screenshots of Qt Quick Designer Connections pane
Change-Id: Icb85ac30145b2897b4a9c9e83e476337bae3f8f2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-29 12:10:02 +00:00
Thomas Hartmann
3bd9dbf5b2 QmlDesigner: Adding testproject for directory imports
Change-Id: Ib9f4feb745722dc1e43c6651ed1cfc4a017818e7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-07-29 12:04:17 +00:00
Nikolai Kosjar
ad49e64ff0 CppTools: Cancel parsing if editor is closed
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>
2016-07-29 12:03:07 +00:00
Nazar Gerasymchuk
c8020af997 ProjectExplorer: Fix tab order in projectwizardpage.ui
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>
2016-07-29 12:01:34 +00:00
Nazar Gerasymchuk
09cbe5621d ProjectExplorer: Fix tab order in CustomParserConfigDialog
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>
2016-07-29 12:01:25 +00:00
Tim Jenssen
a13875daf5 QmlDesigner: disable validator for source property column
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>
2016-07-29 09:52:14 +00:00
Tim Jenssen
1d61239bb9 QmlDesigner: readd the flag to fix a crash
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>
2016-07-29 08:25:11 +00:00