Commit Graph

44349 Commits

Author SHA1 Message Date
Tobias Hunger
33fc20ab51 Utils: Improve Utils::contains
* Consistently use anyOf to implement contains.
* Support contains over an container of std::unique_ptr matching a pointer.

Change-Id: I0180f3ec3d5935d8afeeac67a745d4b38a01674d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:43 +00:00
Tobias Hunger
9b832f670d Utils: Implement more Utils::anyOf variations
Change-Id: I0cba5b58dde6003f5c5cb399142f985cbe83f0a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:37 +00:00
Tobias Hunger
8cd2c234db QmlProjectManager: Fix warning about unused lambda capture
Change-Id: I3fd8f89dc3f5f54a7479c7e1d118766fedd66ba7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-01 13:16:26 +00:00
David Schulz
2f42bc447b Debugger: detect cdb in non default install roots
Change-Id: Ic5b484c674d750bdcbc24d607720589ee9f056c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-01 07:59:32 +00:00
David Schulz
d0bf2a4528 TextEditor: fix animate navigation within file
The calculation based on visible lines is not working as
expected when we have collapsed blocks. Using QPlainTextEdit
functions to get the correct target scroll bar value.

Task-number: QTCREATORBUG-19327
Change-Id: I0393fc94ba2a11caeaa77d6d87bc69c6c7de1bb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-01 07:58:43 +00:00
Ulf Hermann
8c504dc61e QmlProjectManager: Drop support for QtQuick1
Change-Id: Id60c9768d8fad03f588207af07bba676dbfc76fc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-11-30 15:57:53 +00:00
Eike Ziller
0c9c747d92 Add "Rename" to file system view
Renames the file on disk, notifies editors, and tries to change the file
in all open projects that had it (and support renaming).

Task-number: QTCREATORBUG-19209
Change-Id: I165e9468c7235f9f503a3820bda3eb00f3c086d0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-30 14:43:41 +00:00
Tobias Hunger
fe038630fb SettingsAccessor: Remove SettingsAccessorPrivate::Settings::isValid
It is unused.

Change-Id: I9cace756479a2af2a1b96a3e4bde790f31b319ae
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-30 10:41:10 +00:00
Tobias Hunger
da205fd41b SettingsAccessor: Move code around
No change is intended but the moving of entire classes, methods or
functions.

Change-Id: I18d3462bb97c203aee1b81f3c0d7a429a9aa3e86
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-30 10:41:02 +00:00
Tobias Hunger
ee834b7e2f SettingsAccessor: Add setters to VersionUpgrader
Add setters to VersionUpgrader and use them. This shortens the
implementation classes a bit.

Change-Id: I5ffe6f085752bf39bbcb08c286844cc1088eeea5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-30 10:40:53 +00:00
Nikolai Kosjar
ae750aa3a3 Clang: Fix qbs build
Broken with

  commit 9ad760efda
  Clang: Store the database in user resources

Change-Id: Idca0709e3e28291e43594f6b43f24faf7957a1a6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-30 09:41:46 +00:00
hjk
edcce9c1f3 Do not show accelerators in dock window titles
The dock widget's togglViewActions text is tied to the widget title,
but the view headers should not display a potential "&" accelerator.

So stash the &'d string away when setting up the title and retrieve
it when re-creating the view menu.

Task-number: QTCREATORBUG-19378
Change-Id: I6bf49ca526d12ddd57dfa33a94327a83baeaa6b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-30 09:33:49 +00:00
hjk
19d93d29a9 Introduce a ChannelProvider run worker
... to provide a set of urls indicating usable connection
points for 'server-using' tools (typically one, like gdbserver
and the Qml tooling, but two for mixed debugging).

Urls can describe local or tcp servers that are directly
accessible to the host tools, if needed port forwarding
could be set up when needed.

Use it as new base for GdbServerPortsGatherer for starters.

Note: Since none of the customization points for actual port
forwarding are currently provided by device implementations
only non-forwarding cases are working right now. Incidentally
this does not affect existing setups, as the only case where
it would be needed (Android/adb) have a complete custom
implementation. The medium-term plan there is of course to use
this new setup here and have the AndroidDevice implementation
only provide the forwarding, not the whole debugging (etc...)

Change-Id: I42c9783348cd430b1c435bbca56329c678ac485c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-11-30 09:32:40 +00:00
Christian Kandeler
9488b7e604 QbsProjectManager: Set the default working directory in the run config
... rather than in the run config widget. Otherwise merely opening the
run settings can change the behavior of applications.

Task-number: QTCREATORBUG-19374
Change-Id: Ib227ab07d09b7a8ce34909ae0b08b6b222bcee14
Reviewed-by: Georger Araujo <georger_br@yahoo.com.br>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-30 09:23:38 +00:00
David Schulz
173ed5b6fd qtcdebugger: don't abort unregister if Debugger.Default is not defined
Task-number: QTCREATORBUG-19252
Change-Id: Idc986a52276c40f20a983495ab4423c8753a9dda
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-30 05:40:05 +00:00
Oliver Wolff
e05f2889ad winrt: Add runnable to run configuration
When Creator checks whether the application that is being debugged
is a debug build, it gets its information from the runnable so we
have to provide one when winrt is used.

Change-Id: I2259783f82eef96b50ba5f804306e5225919d24b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-29 14:27:07 +00:00
Ivan Donchevskii
21b8e10814 Clang: Fix FilePathView constructor
Do not keep pointer of a temporary object.

Change-Id: I5251c7dbc8581be96afaa947e1a58adaeb0b17e3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-29 10:44:37 +00:00
Marco Bubke
9ad760efda Clang: Store the database in user resources
We used temporary directories but this can be different paths.

Task-number: QTCREATORBUG-19372
Change-Id: Id6ac18e6eecdc5bb354bda3741e16cb87c552ba6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-29 09:57:53 +00:00
Eike Ziller
c90e5b50dc Algorithm: Support std::vector<std::unique_ptr> with contains and findOr
Change-Id: I01cb71c06b405f071498ed8752f9acac44d2b223
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-29 08:59:52 +00:00
Eike Ziller
e2baa116ca Merge remote-tracking branch 'origin/4.5'
Change-Id: I86852d289c22210a0439e8e297819dc7276a96de
2017-11-29 09:56:22 +01:00
Tobias Hunger
78ef474c71 Qmake: Set up environment for initial project parsing
Set up a better environment for initial project parsing (before Kits
are configured).

Task-number: QTCREATORBUG-19241
Change-Id: I2431113dbbe6fb6a66f95fb1efb36834fa184f3d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 16:33:47 +00:00
Marco Bubke
4007828820 Clang: Disconnect from server if process is a zombie
Task-number: QTCREATORBUG-19370
Change-Id: Ibf96c38004e0e0e9aa436df946076979f07df0da
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-28 15:09:08 +00:00
Marco Bubke
f70bf3d2d1 Clang: Move QLocalServer in ConnectionClient
Before the QLocalServer was in the ConnectionServer so more than one
client could connect to the server. But we never used that possibility
which made the hand shaking much more difficult. It is now moved
in the client, so that there is always a QLocalServer.

Change-Id: Ifa357074b0c0809434c49d23b1cee38496f72f43
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-28 15:08:58 +00:00
Christian Stenger
45c667d52c Add environment variable for internal profiling
Change-Id: Idd9197a7610aec550945fc0cb1c0a1dd833b7cba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-28 14:42:41 +00:00
Hugo Holgersson
bf3c67e0d0 TextEditor: Implement highlighting of function definitions
This allows users to style function names at their definitions.

Once set, the XML-style token "FunctionDefinition" will
highlight all function definitions: the style option is a
mixin to Function and Virtual Function.

TEST=Default themes and locally hacked themes that lack Function,
FunctionDefinition, Declaration-styling look as they did before
this patch.

Requires Clang.

Task-number: QTCREATORBUG-16625
Change-Id: I49d8e401211bdf28ff74699feac16fe98f6d64ce
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-28 12:54:29 +00:00
Tobias Hunger
e050622f55 Nim: WS-only fix
Change-Id: Ia968cf8a24b85bd90bd2d0e9353779ac41ff385f
Reviewed-by: hjk <hjk@qt.io>
2017-11-28 12:33:42 +00:00
David Schulz
a4cd04cd61 Debugger: modernize cdb detection
Change-Id: Icc01ee47311fdd6d34df7555afd93bb323fdd05c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-28 12:07:53 +00:00
Tobias Hunger
2bc872e6b0 BuildConfiguration: Fix caching of environment
Task-number: QTCREATORBUG-19371
Change-Id: I5ab20cd39d18283d0bd9e5c24db69e7ddba387b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 10:50:49 +00:00
Nikolay Shalakin
4f8905fe83 fix some missing breaks in switches
Change-Id: I8cc269d9a622b4af090795e40e11205d1190248b
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 09:54:12 +00:00
Nikolay Shalakin
171adfcfc9 QmlJsImport: correct ImportMatchStrength comparison
Change-Id: I9aa775dc23d19e856e38baf9834bedb6903800a9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 09:53:47 +00:00
Nikolay Shalakin
54498da3b4 avoid crash during Android Virtual Device Manager launch
Change-Id: I9d496fd8e6b976f2cdfe891139475636ad3be018
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-28 09:53:06 +00:00
Christian Stenger
e412a800b0 AutoTest: Limit search for test tree items to respective root
If searching for a test tree item matching a QtTestResult
we can safely limit searching to the subtree holding
QtTests or QuickTests.
Additionally store information whether it is a Quick or
pure Qt test into the result to limit it to a single root.

Change-Id: I240e778448d99434d188d90a110dfa4f1934c950
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-28 09:40:47 +00:00
Nikolay Shalakin
1cf2d2942c python scanner: fix "oct" and "chr" highlight
a missing comma defeated both keywords.

Change-Id: I2486ca5ca7d82d7ddcab8656b02fba0b3f54ddd8
Reviewed-by: hjk <hjk@qt.io>
2017-11-27 19:24:58 +00:00
hjk
d282a0708f RemoteLinux: Restrict remote custom exe runconfig to remote case
It was accidentally showing up for the desktop case, too.

Change-Id: I3baa354b83bec93866af5f31699ccc7d8a2fe3c7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-27 15:13:19 +00:00
Tobias Hunger
86d074123a ProjectExplorer: Fix build failure on windows
Task-number: QTCREATORBUG-19368
Change-Id: I4464b4f9b2f1a2d725f5a08fb6e38444fabcdea5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-27 15:00:24 +00:00
Tobias Hunger
566b118a87 Utils: Make algorithms take more containers
Change-Id: I05bd1052bbc2c6481fdec8a3763d9ae4f3dc8f44
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-27 15:00:16 +00:00
Tobias Hunger
750493a0eb QmakeAndroidSupport: Fix warnings
Change-Id: Ic302ab4978f7a00a9119a4e9214c040b7cf1e0ba
Reviewed-by: hjk <hjk@qt.io>
2017-11-27 14:59:53 +00:00
Tobias Hunger
85af11ccc9 ClangRefactoring: Fix warning about missing override
Change-Id: I85d2e789e9e078dafc76c7da46849d8e87fbd2a7
Reviewed-by: hjk <hjk@qt.io>
2017-11-27 14:59:37 +00:00
Ivan Donchevskii
8efb598e60 TextEditor: move Link class to separate header in Utils
Link is a common class and is used across the plugins.

Change-Id: Id92e47e1b8604316ca8b970804e57abaf404ec28
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-27 13:57:02 +00:00
Nikolai Kosjar
16ca76d8f5 Clang: Fix future reporting on backend crash
...otherwise CppUseSelectionsUpdater might block for an infinite
duration.

Change-Id: I756d82499b0b2864363dcaeff15398a8bf5500d9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-27 12:47:38 +00:00
hjk
f686dec480 BareMetal: Remove BareMetalRunConfigurationFactory::canCreateHelper
Was unneeded and forgotten to remove in the recent RunConfiguration
refactoring.

Change-Id: I8032ce576d2afe7841c77a39f2719ee7a6ec0de7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-27 12:22:55 +00:00
Eike Ziller
8e1fefd8de Merge remote-tracking branch 'origin/4.5'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I29979e76cb01bc94ddcd7868ca1cbc34afb14c5d
2017-11-27 12:46:56 +01:00
Orgad Shaneh
63861c44c1 DiffEditor: Fix parsing of mode-only change in patch
If one of the files has mode-only change, the entire patch
fails as a git patch, and is parsed as a text patch.

Because of that, the prefixes (a/, b/) are not stripped and
jumping to a change by double-clicking does not work.

Change-Id: Ib54ce4fa7aad02cb956af1f7de73d3c732ac5a89
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-11-27 11:40:31 +00:00
Christian Kandeler
8bc3ac9177 Update qbs submodule
To HEAD of 1.10 branch.

Change-Id: I4d73b84f845cccc0363673100681c74f51dd695a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-11-27 09:49:07 +00:00
hjk
23ccfc4b36 Utils: Delay saving of treeview column sizes while resizing
As discussed in the linked report, QSettings behavior was changed to
aggressively attempt to sync on each ::setValue() call, therefore causing
excessive disk thrashing when used regularly.

This is arguably a regression on the QSettings side, specifically as the
documentation suggests some kind of delay and therefore merging of quick
sequences of setValue calls (as implemented previously), but since this
opinion is not generally shared, Qt applications need to implement that
behavior now by themselves.

This patch here does that for the reported case in Creator (and uses the
opportunity to delay to 2 secs, which should be sufficient for the case)

Change-Id: I04af0cd1a042abcf7113b5dde5c36e0338f7acb3
Task-number: QTCREATORBUG-15594
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-27 09:48:09 +00:00
Tobias Hunger
dfcd573427 Qmake: Do not crash when closing a project while it is parsing
* Fix crashes and resource leaks in qmake project.

Task-number: QTCREATORBUG-19358
Change-Id: I3b383640cdf994b4014ccbfc4278be48f9e5fd3f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-27 09:16:54 +00:00
hjk
1697f97aff ProjectExplorer: Register createes' base id in RunConfigurationFactory
This shifts the resposibility of creation/splitting of RunConfiguration
ids into what are essentially "type ids" and "build targets" to the base
implementation, possibly opening the path of abandoning the mangled ids
in favor of explicitly storing their constituent parts.

Take advantage of base id split in RunConfigurations for availableIds
/displayNameForId and for canCreate/canRestore/canClone.

Change-Id: I19fefb32757407ab5053a2ae0e5a79438659f6ec
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
2017-11-27 07:23:17 +00:00
Tobias Hunger
dbd365afe6 Kit: Allow for Macros in EnvironmentKitInformation
Task-number: QTCREATORBUG-19359
Change-Id: I215fcbb6156f864176d7a8284371029e3ae62e92
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-24 17:52:52 +00:00
Eike Ziller
cf781640cf Fix that double-click in file system view sometimes does not work
When clicking on an item that changes the height of the crumble path, a
double-click has great chances of not succeeding, because before the
second click, the item might move away from under the mouse.

If the tree has a scroll bar that can move wide enough, we solve that by
scrolling the tree such that the same item remains under cursor when the
crumble path height changes. (We have to synchronize the scroll bar
value change with the relayouting though, to avoid flicker.)

If there is no scroll bar, or it cannot move enough in the needed
direction, we delay the re-layouting by the maximum double-click
interval to guarantee a double-click will still have the same item under
the mouse.

Change-Id: I3b296925d9be2d2ab5affbbb64df67173d9715d4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-24 12:51:44 +00:00
Tobias Hunger
9dcf8cf0ed ProjectExplorer: Remove useless newlines in output of ApplicationLauncher
Those will be added anyway.

Change-Id: I7b1f4b1b7bc0f5f0128989dfdbb4c436fd9b60c1
Reviewed-by: hjk <hjk@qt.io>
2017-11-24 10:24:33 +00:00