Commit Graph

61529 Commits

Author SHA1 Message Date
Tim Henning
d25c7ea137 Tracing: Improve event adding performance by using at() instead of []
This speeds up adding events using Timeline::TimelineModel::insert()
by 20% in release mode and reduces it to a third in debug mode by
avoiding a check whether the container is detached.

Change-Id: I3c81120047c33b3ce20cfb4cd309cbe17694b141
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-05-28 09:06:57 +00:00
hjk
effbd54ae2 ProjectExplorer: Anticipatory obedience
Change-Id: I6c597d64f08ccff16f834055ca23641f30bd8382
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-28 08:39:09 +00:00
Friedemann Kleint
a49175aa29 Fix some deprecation warnings about String::sprintf() and qVariantFromValue()
stylehelper.cpp:216:46: warning: 'QString& QString::sprintf(const char*, ...)' is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
...
baseenginedebugclient.cpp:124:49: warning: 'QVariant qVariantFromValue(const T&) [with T = QmlDebug::ObjectReference]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
...

Change-Id: Iafdb58b8a66f1b0a14342fa5b29e31fc4997a621
Reviewed-by: hjk <hjk@qt.io>
2019-05-28 08:11:48 +00:00
Tobias Hunger
b7280d4986 CMake: Remove variable, as it is empty
Change-Id: Id85f78eddcb0ece3d6b955e12ab7cdc27bd0198d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-28 07:44:56 +00:00
Nikolai Kosjar
0bac3ad279 C++: Do not auto-insert '}' after control flow constructs
...as this rather gets in the way.

As before, pressing ENTER after { will still auto insert } on the next
line.

Fixes: QTCREATORBUG-18872
Change-Id: I8ee082962b5ee82781e51c3e5ee146343f808332
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-05-28 07:36:09 +00:00
Nikolai Kosjar
3b05eb88bd Clang: Fix applying override declarations
Since https://reviews.llvm.org/D50898 (clang-8) libclang provides
override declarations when completing code in derived class scopes.

Applying such a completion item appended "()" and resulted in invalid
code, which is fixed with this change - the semicolon is inserted
instead now.

Change-Id: If2a04c5c719f62b98874f083a97445cd4e1db07d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 07:35:21 +00:00
Eike Ziller
d2f3fb8c9f CMake build: Add silversearcher plugin
Change-Id: Id28bf38fd475304cccb5f4375288af7f5e369ac5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-28 07:24:56 +00:00
hjk
33ea685a91 Directly construct KitAspect::toUserOutput return values
Less dependent on used type and actually saves cycles.

Change-Id: I87344172c330198e98c11205a80862b3b30271e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-28 07:22:55 +00:00
hjk
92a52a7181 Use Qt's QFileInfoList instead of QList<QFileInfo>
Helps to adapt to potential upstream changes in Qt 6

Change-Id: Ie154bd4fd513d46cb0493758be8943fc4581d71c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-28 07:19:45 +00:00
David Schulz
7c93b26792 LSP: fix lsp position to QTextCursor position conversion
If the 'character' part of the lsp position is greater than the block
length for the 'line' it defaults to the end of the line (see
documentation under
https://microsoft.github.io/language-server-protocol/specification ).

Change-Id: I3ed6cefd7431e58adbab1dbcf94a12a5e460019a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-28 06:36:16 +00:00
hjk
2b1c8aa877 ProjectExplorer: Introduce a alias for QList<Tasks>
Change-Id: I91391ad22b420926b0f512cac23cfe009048b218
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 05:51:40 +00:00
hjk
24560d8830 CMake: Avoid a temporary QFileInfo
Change-Id: Ifaf8ecb3601881003b739027e81c0216744be5f5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-28 05:51:08 +00:00
hjk
33a9a03121 Android: Avoid a temporary QFileInfo
Change-Id: I58f31177506c1e25f07dc51d5b24ac368ebf9024
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-05-28 05:50:15 +00:00
Thomas Hartmann
aff3e204c1 QmlDesigner: Add try catch blocks for anchoring
There have been casual unreproducible crashes.
This kind of code should be replaced by using lambdas in master.

Change-Id: I5b44a4c7b013f70a012c22ff9610e5579b165ab4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-27 16:06:01 +00:00
Christian Kandeler
0be5fe5383 ProjectExplorer: Make it configurable whether to clear the issues pane
... on a new build.

Fixes: QTCREATORBUG-22478
Change-Id: If9d88d54397e03414088112f8c19363d9e153244
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 15:24:40 +00:00
Christian Kandeler
d0cf9be452 ProjectExplorer: Make "Close sources with project" setting persistent
This was forgotten in 5327d415a3.

Change-Id: I30b5f566a2a23098b31be5c697f9caa19da645db
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 15:24:12 +00:00
Christian Kandeler
be9bd1505b ProjectExplorer: Trim value of build directory
... coming from the line edit. Nobody enters a build directory with
leading or trailing spaces on purpose.

Fixes: QTCREATORBUG-16805
Change-Id: Ic33f126fb9c4c0d008ebeaf00a78c737729be623
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 15:23:39 +00:00
Tobias Hunger
0268d7c792 CMake: Use extend_qtc_target in Utils
Change-Id: I768af53cbf8c38c8011d394578a195857a635dd5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 14:50:23 +00:00
Tobias Hunger
2874611ec0 CMake: Save a list of known Qt Creator specific targets
This list can be used to decide whether a target should be known.

Change-Id: I09f1d693c38974fff04c514abe52cac740e53c46
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 14:24:04 +00:00
Eike Ziller
e0b0a08e50 ExtensionSystem: Move away from QList
Qt 6 API will move away from it.
Use QVector for API and some std container for internal things.

Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 14:21:00 +00:00
Joel Smith
e846b8717a TextEditor: Type over punctuation that can be auto completed
This restores a feature of older Qt Creator versions: typing "over"
closing punctuation.  For instance, if my cursor is at | and I have
something like this:

    if (statement|)

... and I type the ) character, older versions of Qt Creator would not
end up with )).  With newer versions of Qt Creator, this behavior is
limited to the case where an autocompletion has just happened (i.e. if I
typed the opening ( character, the closing ) is auto inserted and
highlighted - and if I type it myself, it won't add a second one).

Task-number: QTCREATORBUG-16946
Change-Id: I45af3ac139d5e7c76e5f0a8a9d66762f9209a525
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-27 14:09:12 +00:00
Christian Stenger
0980484be8 AutoTest: Fix building arguments list
Avoid interpreting an int as a char when appending
the seed to the randomize option.

Change-Id: Ibbcd59d35acf54cc14a07493652e1fe05b187bbc
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-27 13:10:36 +00:00
Christian Stenger
a2fa8ce2e8 AutoTest: Replace QRegExp by QRegularExpression
Change-Id: I0e7de5482786105d21765fdf7c1180c16414bc01
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-27 13:10:22 +00:00
Christian Stenger
07b1d2aa56 AutoTest: Fix regular expression
All test cases are surrounded by the quotes and the
quotes themselves do not belong to the test case name.

Change-Id: Ie38b0bbaed915ea38f8bd11174510c5096de3de8
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-27 13:10:04 +00:00
hjk
29f597d13b ProjectExplorer: Use QVector<Abi> for abis
Change-Id: Ia57d4f27e0684f2f97458bea24ce8f10a2efebcd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 12:54:03 +00:00
hjk
19e1cf1520 Replace uses of qVariantFromValue with QVariant::fromValue
Deprecated in Qt 5.14, alternative has been around since Qt 4 at least.

Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 12:33:29 +00:00
hjk
f7d224bf58 Utils: Remove now-unused FileName::appendPath()
Change-Id: I9d429a1f60930e27e3926e1242114bed3485f000
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 12:22:08 +00:00
Tobias Hunger
feb9d578c5 CMake: Do not build .pri-file
Change-Id: Ife5889ad9475769028c898fd298e737aeab08d79
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 12:20:08 +00:00
Tobias Hunger
47f8fb0600 Translations: Fix generation of directory list to translate
Change-Id: Ib010fa74495a98eddce333d74e447bca9db34afc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 12:12:23 +00:00
Christian Kandeler
b1274d4b9c ProjectExplorer: Tighten the pattern for possible compiler file names
A number of tools were matched that weren't compilers.
Examples:
    - arm-none-eabi-gcc-ar (also: -nm, -ranlib, ...)
    - git-clang-format

Fixes: QTCREATORBUG-22439
Change-Id: Ic598daebb6cfd534690145a0446649a8906aff5d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 11:41:33 +00:00
Christian Stenger
411678048d CMake: Set the correct build system target to the project part
The internal build target key had changed again. Adapt and use
a more error proof pattern to be hopefully safe if it may
change again.
The wrong build target key led inside the AutoTest plugin to a
wrong comparison of build target of the project parts vs. the
build target of the run configuration which in turn ended up
in always deducing the run configuration for the test runner.

Change-Id: I32df578df85cc0206c2b8fdac00acc3a798f0d73
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 11:35:52 +00:00
Christian Stenger
84b34a41e7 Wizard: Make the default generated template runnable
If one uses the Python - Window template and does not explicitly
change the custom base class to an existing the generated project
lacks some essential stuff.
Make the generated main file usable even for first time users.

Change-Id: I898189fd4edff88f13987d6d1df9f77e2ef6bd68
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-05-27 11:35:37 +00:00
Christian Kandeler
f6ac2c8e75 ProjectExplorer: Improve "same file" detection for toolchains
Only use the file size heuristic on Windows, as it actually helps us
filter out duplicates there.
On Unix, there is no such compensation for the risk of false positives.
For instance, on my Linux machine, i686-w64-mingw32-gcc and x86_64-w64-
mingw32-gcc have the same file size, but they are not the same file.

Change-Id: I427d2ff36a33ffb045c71851c91312e129616f69
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 10:08:38 +00:00
Christian Kandeler
f3338b2dc8 ProjectExplorer: Abort file removal if the project changes in between
This is not a limitation in practice, as the condition is very hard to
trigger.

Change-Id: Ibe89fbca6e789c61b896f1aac7a55958567cddb9
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 09:49:49 +00:00
hjk
2ac89cba92 ProjectExplorer: Use an alias for QList<Abi>
Change-Id: I69231c5974620ae30296bfc4e0ab41c900d95a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:35:53 +00:00
Christian Kandeler
98c4994c38 ProjectExplorer: Fix removal of file that occurs more than once
The observable problem:
    - Create a qmake SUBDIRS project with e.g. two apps, or something
      corresponding to that in a different build system.
    - Add the same file to both sub-projects.
    - Click on the file node for that file in the *second* sub-project
      and select "Remove".
    - Watch the file disappear from the *first* sub-project.

The underlying problem:
    - Before the file is removed, there is a dialog asking the user
      for confirmation.
    - Afterwards, the code checks whether the currently selected node in
      the project tree is still the one that was selected before.
    - If it's not, then the node for that file path is re-retrieved from
      the tree.
    - However, after the dialog ran, there is no current node anymore,
      presumably because the focus was taken away from the tree widget.
    - As a result, the node we continue to work on is always the one
      from the first sub-project, no matter which one the original
      node belonged to.

The fix:
    - Keep working with the original node if it's still in the tree.

Change-Id: I6c76ed96db9f55edbc7626c4ea99f166736707b8
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 09:21:52 +00:00
hjk
7e2992453e Android: Remove remaining uses of FileName::appendPath()
Change-Id: I33fb650f357d93d177e5977b21b14b42894f571a
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-05-27 09:10:56 +00:00
hjk
dc9cbd8f57 More FileName::appendPath() -> .pathAppended() changes
Change-Id: Ibc7eb4eb3ffb64658e441aafa240b1ddc0061930
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 09:10:19 +00:00
hjk
061896a148 ProjectExplorer: Add an official way to connect aspects
Aspects are not completely orthogonal, e.g. working directory
depends usually on environment etc. So far handling this used
ad-hoc set up in the (Run)Configuration constructor. Lets make
this an official second phase, that also reduces the need to
use a specific construction order of aspects.

Change-Id: Ic98b7d4e1ac9d46a32ec624bbbbfbbc32a40ab32
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:04:07 +00:00
Christian Kandeler
a9d6de5702 Core: Fix typo in OutputWindow
Change-Id: I61d091f24bb75412563085b777fb6661ef255c38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 08:41:42 +00:00
Christian Kandeler
a1dab694bb ProjectExplorer: Fix remove button state in toolchain widget
The non-deletable toolchains are the ones coming from the SDK.
Amends 3969a007c2.

Change-Id: I9586e2311378417c72c2eb6b55e6d5e29c65fba3
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 08:26:36 +00:00
Christian Kandeler
e59bcd9962 ProjectExplorer: Add a "product" tag to the ProjectNode class
A product is a project node from which a target binary is produced, such
as a Product item in qbs or a .pro file in qmake.

Change-Id: I6a0e6bed6c02684cb03b2b18fed6a1b493fa78b2
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 08:25:57 +00:00
hjk
a889669369 iOS: Use base IDevice::clone() instead of local toMap/fromMap
Some non-persistent data is handled in the base.

Change-Id: I5f6c5429b88178115bf26f885b80fa3daebf227e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 08:19:27 +00:00
hjk
967f20ab89 ProjectExplorer: Copy non-persistent IDevice members when cloning
Amends 555360c.

Change-Id: I0450366eb0936baa665572f63e45c35f4a18eb28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 08:19:12 +00:00
Eike Ziller
2001e96f01 Update 4.9.1 changes file
Change-Id: I5f6ea48265de11088e5028f38430c3bac373babd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 07:40:28 +00:00
Orgad Shaneh
24c0fc7ea1 Qnx: Delete unneeded qnxdevicefactory.*
Change-Id: Iccac8e70683b80c7e0df287109d90700aecb36f1
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 06:50:23 +00:00
Orgad Shaneh
1e138fbe10 Remove excess blank lines after namespace
Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 06:50:16 +00:00
Thomas Hartmann
168e91b618 QmlDesigner: Fix issue with list properties
On pure QML types list properties were reported as list properties.

Task-number: QDS-687
Change-Id: I34b1688953185b65d64c299c72c8170d7daa789b
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
v4.9.1
2019-05-25 12:26:13 +00:00
Christian Kandeler
b70d39a091 RemoteLinux: Let user specify the rsync flags
Task-number: QTCREATORBUG-22352
Change-Id: I11c16b5f7c58093bb89a9493a8742f338dbdd9c1
Reviewed-by: hjk <hjk@qt.io>
2019-05-24 16:37:44 +00:00
Eike Ziller
a7df038106 Add more change log for 4.9.1
Change-Id: I5471bc8ae879f200b785d7c67022250103f5fa01
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-05-24 14:09:03 +00:00