Commit Graph

44349 Commits

Author SHA1 Message Date
Christian Stenger
0d87abee8b AutoTest: Fix handling of forward declared test classes
If a class has been forward declared we might not end up
inside the real class declaration when trying to find
declared test functions. So, do not just take the first
found symbol into account, continue to process others if
we haven't found the real declaration.

Task-number: QTCREATORBUG-19319
Change-Id: I752d7a10470f5362e2214596966d93c037d58f4a
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-20 14:45:18 +00:00
Christian Stenger
466fb7ea53 AutoTest: Fix running Quick Tests with special functions
If special functions (init, initTestCase, cleanup, cleanupTestCase)
are present for a Quick Test they must get ignored when trying to
run a single test as they cannot get explicitly addressed.

Task-number: QTCREATORBUG-19311
Change-Id: Ie91928271928cf581bfef0b5e3463e027af985fd
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-20 14:45:10 +00:00
Christian Stenger
5b64c6ea82 AutoTest: Remove confusing information
If there is no information regarding the tests to provide to
the user 'unknown' is not helpful either. Just give no hint if
we do not have any.
While at it ensure to provide only non-empty information.

Change-Id: Ia1667c2cfd35b0456bfd47c2d4a14ed4d0000a4d
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-20 14:45:00 +00:00
hjk
95c17c3f0d Partially revert ProjectExplorer: Get rid of QLatin1* in settingsaccessor
Some intermediate is needed in return statements.

This reverts commit cf5d926221.

Change-Id: I76192484c0a8e88c85c34a2b31c6ec3487763524
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 12:14:14 +00:00
Ivan Donchevskii
ebdeb87241 Android: fix make command for latest NDK
Change-Id: I8c54ac146a96c11d6df5a7e5c791314799119b5f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-11-20 11:08:56 +00:00
Tobias Hunger
8dd8bd2fc8 Move SettingsAccessor from ProjectExplorer into Utils
Change-Id: I83e9d7ef81f8c0af7220ce2777723db53ef2e02a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:41:01 +00:00
Ivan Donchevskii
32bae7ef6c Clang: use local renaming based on ClangCodeModel
Provide refactoring engine for ClangCodeModel and
implement missing methods.

Change-Id: If5c913e0c5a7941cd2ced54d0fcfa4d625eadc93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-20 10:24:47 +00:00
Tobias Hunger
94e818dc82 ProjectExplorer: Do not depend on app_version.h in settingsaccessor
Change-Id: I673a1946ecfc9ef7e60eeae549eff7e08741d756
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:08:40 +00:00
Tobias Hunger
cf5d926221 ProjectExplorer: Get rid of useless QLatin1* in settingsaccessor
... and derived classes.

Change-Id: I7468794203c2ef32bb82585ed31cd50b7b80f5aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:05:03 +00:00
Tobias Hunger
15139aadb6 ProjectExplorer: Modernize UserFileAccessor a bit
No change, just adapt to new C++ standards.

Change-Id: I775f4ad3615b782808863e34294b511971bd7427
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:04:20 +00:00
Tobias Hunger
6cde4a73f8 ProjectExplorer: Use std::unique_ptr in SettingsAccessor
Change-Id: Id5c675c12d5a271efced0f3f52592364bfde34d1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-20 10:04:00 +00:00
Christian Kandeler
fae4f2c9b5 Update qbs submodule
To HEAD of 1.10 branch.

Change-Id: I12398ee8eb381b31356fdc515d07addc9bf501da
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-20 09:44:00 +00:00
hjk
d1c9b33eb7 ProjectExplorer: Add a RunConfigurationFactory::canHandle(Target *)
All RunConfiguration factories had some kind of canHandle(Target *)
implementation. Centralize this notion.

Change-Id: Ie24a355e857bddfd76b866859b8c7a42ffc83840
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-20 08:52:00 +00:00
Eike Ziller
93bb5081ed Fix bread crumb directly after switching to file system view
We need to set up all connections before syncing

Change-Id: Id1da237b6c3b5f27006ec4cd4a4dd47689c5abd9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-20 08:00:01 +00:00
Jochen Becher
56be6cc2c8 ModelEditor: Improve custom items
The default name for a new custom item can be set. The display of any
text of a custom icon can be suppressed (e.g. start element in activity
diagrams).

Change-Id: Iaaefda3a6795e0b2a63d96fd001948d302906b7a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-20 07:29:46 +00:00
Christian Stenger
4ead3aa522 AutoTest: Fix nullptr access
Task-number: QTCREATORBUG-19313
Change-Id: I84a6f35c4da325ed5b0bd12de90cf156d27b86c5
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-20 06:54:48 +00:00
Jake Petroules
7a0fbf2c23 Use qbs.defaultBuildVariant to inform Qbs of the default build variant
Qt Creator always put its value for qbs.buildVariant in the config when
building Qbs projects. That overwrote values applied by the multiplexing
mechanism or by the project files, which is undesired. Instead, Qt
Creator will now use the qbs.defaultBuildVariant property, which is
provided for this reason.

Task-number: QTCREATORBUG-19316
Change-Id: I923dfb6e083135b7c3ae6346af3ac639a4f02dbc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-17 22:56:52 +00:00
Tim Jenssen
75b77fea33 fix getting a warning if no installsettingspath is set
Change-Id: I6f5528026a6fd7c1f3df683c7d0816a82e592efc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-11-17 17:32:20 +00:00
Tim Jenssen
d0a44fa4e2 introduce installsettingspath as an argument
Change-Id: I2435ddd09e25a73bd70efe847990dcfc57b8680e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-17 16:26:53 +00:00
Tobias Hunger
bf970a5929 ProjectExplorer: Split up settingsaccessor.h
Split up settingsaccessor.h/settingsaccessor.cpp by moving
the userfileaccessor code into its own set of files called
userfileaccessor.h/userfileaccessor.cpp.

Change-Id: I634550b7ebba29a94791b163dcf05aacf61cfdd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-17 15:34:15 +00:00
Eike Ziller
23d72b6911 Fix selection when switching root in file system view
Don't jump to the (previously) selected file.
If the (previously) selected file is not a child of the new root,
then "select" the root directory, which also adapts the bread crumb.
Also show the selection instead of the parent in the bread crumb,
which is more natural when a root is selected and not wrong otherwise
either.

Change-Id: Ib5a58a034101e4e2617b4ae1a5ec9188d1a92eb5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-11-17 14:24:33 +00:00
Tobias Hunger
fa8a0da2cd SettingsAccessor: Add missing forward declaration for Project
Fixes the build.

Change-Id: Ieb51a56adeafc72c3e0142b34467a3955981fd3a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-17 10:49:48 +00:00
Christian Kandeler
b289a3f87a QbsProjectManager: Run updateAfterParse() also on add/remove file
Adding and removing files via the project tree is essentially the same
thing as doing it by editing a project file, except that no reparsing is
necessary.

Task-number: QTCREATORBUG-19292
Change-Id: Idb1bcf0e183f34d4de513f69f974e45ac91afeeb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-17 10:09:41 +00:00
Nikolai Kosjar
b9a24b1d5d Clang: Stop highlighting unresolved identifier as local variable
{
    Foo; // Highlight as Text, not LocalVariable
}

Change-Id: I94d46edc396675b6543f5f5a532fdeb5efd45537
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-17 10:07:16 +00:00
Tobias Hunger
d114810ba3 ProjectExplorer: Move VersionUpgrader into header
Change-Id: I946412afbcf0b9c7c09e5bf6299a8e44c490a587
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-17 08:28:04 +00:00
Tobias Hunger
6726ce90d3 ProjectExplorer: Move project() into UserFileAccessor
SettingsAccessor should provide a way to access generic settings files,
so it may not depend on the project being known. That knowledge has
to be contained in the UserFileAccessor instead.

Change-Id: I81949111c332a806312fd2cb1528c06c79ba9446
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-17 08:27:57 +00:00
Orgad Shaneh
951f0e0bbd Valgrind: Fix cyclic connect
Editing the widget triggers rawPathChanged(), which calls
setValgrindExecutable, which emits valgrindExecutableChanged(), which calls
setPath on the widget.

No other path reaches any of these functions.

This causes the cursor to jump to the end, so if you want to change
'valgrind' to '/usr/local/bin/valgrind' you have to jump back after each
character.

Removed the now unused signal.

Change-Id: Iaf4e902fb9a42975e9ada6662b7a64e53fab5cad
Reviewed-by: hjk <hjk@qt.io>
2017-11-17 07:53:32 +00:00
Orgad Shaneh
a02ee529ef Valgrind: Fix callgrind parsing with git version
Commit db860c7cdce8765f8c4ec28127860c8e97ba34ab added a format marker to
the file. First line is now: `# callgrind format`

Task-number: QTCREATORBUG-19004
Change-Id: I2f6ed81044fa0d675a02b9634d8ee8e3ea1da6e5
Reviewed-by: hjk <hjk@qt.io>
2017-11-17 07:37:43 +00:00
David Schulz
b9d00c3f27 QmlJSEditor: Display code model warnings as annotations
Change-Id: Ief6ed8fe551846f5e788c14a49269231462ea40a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-11-17 05:51:06 +00:00
Tobias Hunger
5ef41157c7 ProjectExplorer: Add virtual method to store/retrieve shared settings
Add virtual methods to store/retrieve shared settings to SettingsAccessor.

Implement that method for UserFileAccessor.

Change-Id: Ia3c4314c7528d44dd14dee635be516beeec02fd7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-16 16:16:05 +00:00
Tobias Hunger
dcd10a68b8 ProjectExplorer: Move members from SettingsAccessor to private class
Change-Id: I49525b695ec519e79d0f2b6addc16bff2ea14de1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-16 16:15:56 +00:00
Tobias Hunger
8499ea4650 ProjectExplorer: Make settingsId override-able
Change-Id: I9d398a1c474f3c5c54024222845615c99889423f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-16 16:15:50 +00:00
Tobias Hunger
6e4192160b ProjectExplorer: rename creatorId to settingsId in SettingsAccessor
Make function non-static while at it.

Change-Id: I95d694bc7c75934737841aa7d06bcca844707631
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-16 16:15:42 +00:00
hjk
9792547ef9 ProjectExplorer: Implement RunConfiguration::do{Clone,Restore} in base
It's possible now.

Change-Id: I49ed73312aea1627a9543890431e2e379e3fb3ec
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-16 14:08:33 +00:00
David Schulz
97053d9f2f Utils: Move code model icons to utils
Using the already established icons for code model errors and warnings
to Utils to mak them accessible for other code models.

Change-Id: If9f8efde60cf20411e043aeb2831a9254398bcaf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-11-16 13:55:35 +00:00
hjk
c1d3e22511 Debugger: Do not create a new terminal when attaching
... to a running application that already has one.

Task-number: QTCREATORBUG-19302
Change-Id: Id83f840408c26f3db85dbe30dadac9949ce6b660
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-16 13:12:11 +00:00
Ivan Donchevskii
8eececaa96 Clang: add clang plugins checks to code model settings
Add UI controls to change settings and apply them
together with warnings and command line options.
Current settings are not very flexible but should be
easy to test and use without reading tidy/clazy help.

Change-Id: I1ca6b49a42a1169b34a703dd50de0bbc105df28f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-16 11:05:21 +00:00
hjk
cdaa4aee1a Add some mechanism to help screenshot creation
If QTC_SCREENSHOTS_PATH points to a writable directory, each widget that
has been registered with ICore's setupScreenShooter(const QString &name,
QWidget *w) will dump a screen shot to this directory as soon as the
widget is shown.

Change-Id: I2dec12064f1bb3c510d2fd9d27c1b79f7b7d5f30
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-16 10:28:49 +00:00
Filipe Azevedo
ac1ce65a38 Add isRemoteRunning() as isRunning() only apply to local processes
Change-Id: I75d726cea160c557374051db3ba413d3dd1a41a2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-11-16 10:10:31 +00:00
Thomas Hartmann
17b761ce86 QmlDesigner: Ignore indentation for multi line expressions
If expressions cover multiple lines they might be altered by the indenter.
This means the expression differs slighlty in white spaces.
This did assert before, but is a false alarm.

For now we just treat the white spaces in th beginning of the line as a
special case. Eventually we have to fully normalize expressions.

Task-number: QTCREATORBUG-19284
Change-Id: Icc57ef08d1c889deded7cca08ccfba66f09f3115
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-16 08:10:21 +00:00
Eike Ziller
f58a617ea9 Merge remote-tracking branch 'origin/4.5'
Change-Id: Iab6befd5e713289877aa0a47b9ce6bddfb5e2593
2017-11-16 08:49:06 +01:00
hjk
28fda42c62 CMake: Use Standard RunConfiguration::initialize(Id) signature
Change-Id: I66b534df216552d129d4605148ff3b4eff543d11
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-15 16:36:49 +00:00
Eike Ziller
761505071d Improve styling of crumble path in file system view
- Fix left alignment when wrapping over multiple lines.
- Don't break lines before path separators
- Add a separating line below

Change-Id: I709fa3c6d12fa45a909ed6ca5c63cc5b877b2dc3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-11-15 15:16:42 +00:00
Tim Jenssen
09f02013e5 Utils: move 2 images to utils
select.png is used by the designer

Change-Id: Icfa0ab4c931de7365c8bd252de0a0f972beb2c6c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-11-15 11:59:25 +00:00
hjk
8f749e473a RemoteLinux: Convert to RunConfiguration::initialize(Id) signature
Change-Id: I940d96b3f6467f2898193092b4ce66b752161039
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-15 11:58:10 +00:00
hjk
36f802a901 Qnx: Provide a RunConfiguration::initialize(Id) implementation
This was sharing code by inheritance with RemoteLinux, have a own
one for now.

Change-Id: I30e64cfb126e794aebe0f84913b79fc40cce87ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-15 10:37:13 +00:00
hjk
da08c911c9 Ios: standardize IosRunConfiguration::initialize() signature
Most other signatures look like RunConfiguration::initialize(Core::Id),
this here is part of unifying them completely.

Change-Id: I7cd2acc8ebe6ec8cef05272f18f0fa5ded94f930
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-11-15 10:08:39 +00:00
Tim Jenssen
43481d88da wizards: remove unused variable
Change-Id: Ic6e567360b909c577ac679b6c33565021b65bf9e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-15 09:55:28 +00:00
Tim Jenssen
ee8580009d Wizards: test default CheckBox values
Change-Id: I6d1de2c5a51e52d928f397a1abe659a76f15d086
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-15 09:55:22 +00:00
Tim Jenssen
aa3bc64174 Wizards: add enableLoadTemplateFiles bool
With that, it is much easier to debug one json wizard test.

Change-Id: I12c8fb452a635296e0650afdc40f1e8d0a99d1d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-15 09:55:14 +00:00