Commit Graph

47012 Commits

Author SHA1 Message Date
Oswald Buddenhagen
f174dfee6a add $$str_member() function
just like $$member(), but operates on a string value rather than a list
variable. it is the swiss army knife of cutting, providing equivalents
of left(), right(), mid() and reverse() all in one.

[ChangeLog][qmake] Added $$str_member() function.

Change-Id: I7c7c6c971db402fff41b428d32a4451f45400728
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>
(cherry picked from qtbase/e70330f99e53bd34a518879a0a4c68bc7cb03949)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:58:14 +00:00
Oswald Buddenhagen
8f7928e616 add $$str_size() function
this is strlen(), but the name is matched to $$size(), just namespaced
to reflect that it operates on a string value rather than a list
variable.

[ChangeLog][qmake] Added $$str_size() function.

Change-Id: I56c8b863da244e66bd283257a66b197aa73b0e57
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>
(cherry picked from qtbase/22f3800cac47b1b3d10474e8489ddb83cffd4b1e)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:58:10 +00:00
Oswald Buddenhagen
455cc5a9f8 add $$num_add() (numeric addition) function
amazing how we managed to do without it for so long. ^^

the name is intentionally somewhat obscure to avoid clashes, and some
namespacing is good anyway.

[ChangeLog][qmake] Added $$num_add() function.

Change-Id: Ib7648b1f425ef096a87b51f158d0f1409e5c4daa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/d3cc25ef52d0b2b7ba1cb06609f7c205ee19c2d6)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:58:01 +00:00
Oswald Buddenhagen
5237499742 add $$take_first() and $$take_last() functions
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>
(cherry picked from qtbase/3d21634fb693634b7d41a152287d29afb80ac5e2)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:57:53 +00:00
Oswald Buddenhagen
1d8ae55a57 make split_value_list() take a QStringRef as input
this also saves some of the cheap but ugly toQString() calls.

Change-Id: Iebe644986501db3878306521c76e4ba2c2fb97b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/981f8ad2e4bc46d9a06dab0cbc32a7da755ececb)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:57:48 +00:00
Oswald Buddenhagen
b7706cdfeb make QMakeParser take a QStringRef as input
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>
(cherry picked from qtbase/ad17a35853fe21a93fc34f7b2d9262c5ac992b29)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:57:26 +00:00
Oswald Buddenhagen
50b87b3a8d add ProStringList::join(ProString) overload and make use of it
Change-Id: Ic3919a1fa9419bbb3b57dd1aa7eb95643ee59e53
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/e45a9fe457a4e5e70bf4e62092b253675dc97819)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:57:19 +00:00
Oswald Buddenhagen
ddd749b130 introduce a new way to pass arbitrary arguments to the project file
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>
(cherry picked from qtbase/26d44fce3dfb9dbd3b5be2a031fff8c1bb903960)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:57:11 +00:00
Oswald Buddenhagen
ca1f4a265d add ProString::toLongLong() and make use of it
this is just a bit cleaner.

Change-Id: I03e628aca9e2e53c602a4db724da277a0e2c2486
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/e6b755e702fd6d8ebeb25ecd7a5059e62da6c971)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:56:43 +00:00
Oswald Buddenhagen
c4382290f0 remove pointless conversion to QString in isTrue()
Change-Id: I7766672018dd4acf9b9fb89acfe664671de4bc3d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/7931395d5bf30d783449e1696edf8d59b81462ed)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:56:37 +00:00
Oswald Buddenhagen
5da274828a remove pointless conversions to QString when converting to int
this doesn't change a lot, but is cleaner.

Change-Id: Ia89c399d6df7cc6264954cf309d2c971a5592d6b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/a7a3cd643a554c717ad8fb2bdad3e941dfd94cec)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:56:29 +00:00
Oswald Buddenhagen
d549e85712 optimize ProString::toInt()/toShort()
QStringRef has respective overloads now.

Change-Id: I9b94c53092ef3fdd62a68f5d3c5bacb98a14d8ec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/e8bdca74b513b58d3db892d838b3a499365ca7e2)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-02 07:56:21 +00:00
Marc Mutz
bf5cc934ea qmake: restore nothrow move special members
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>
2016-08-02 07:56:15 +00:00
Anton Kudryavtsev
973cabd5c5 qmake: de-duplicate QString::number() calls with same arg
Change-Id: I6e05b9ad3350bd0da5b8a6dc1389ae05315a33df
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
(cherry picked from qtbase/27de4ea4d672d9f1b3a733f803f8605f81311d0a)
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
2016-08-02 07:56:03 +00:00
Anton Kudryavtsev
f71bc5ad9e qmake: optimize container usage in the json handling
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>
2016-08-02 07:55:56 +00:00
Anton Kudryavtsev
3f4e40e3c1 qmake: use reserve to optimize memory allocation
Change-Id: I6ace338512c24fd9dc11c767a28f0a63454076fa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/1d3503b8f3b49b0f684e1caa504deb0d05f2c60a)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
2016-08-02 07:55:45 +00:00
Marc Mutz
d882ae9cb7 qmake: eradicate Q_FOREACH loops [already const]
(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>
2016-08-02 07:55:37 +00:00
Marc Mutz
1a4f0f1dad qmake: eradicate Q_FOREACH loops [rvalues]
... 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>
2016-08-02 07:55:30 +00:00
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