Commit Graph

52602 Commits

Author SHA1 Message Date
Marco Bubke
76a7dff82b Utils: Simplify SmallString reserve
The reserve function is quite complicated because it is implementing a
grow pattern. Something we seldom need. So we now align to the next cache
line size.

Change-Id: I14bb88c12bd740a7afa7cd08969a4e07fb0f9add
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 10:17:11 +00:00
Christian Stenger
e255baaa8f CppTools: Add target type information to project part
Let project managers store information whether a project part
belongs to an executable or a library and use this information
inside the AutoTest plugin.
This information will help to determine which targets are
relevant for the execution of tests.

Change-Id: I93b42797bf55225425398dc83aecea3c99eea290
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-18 10:01:30 +00:00
Christian Stenger
8288eadac6 AutoTest: Unify handling of run modes
Move used enums more central to avoid duplicating
information and unify their usages.

Change-Id: I33e9bdc11f7da16ecabf03991b5a5f550a53bdad
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-09-18 10:01:18 +00:00
hjk
f885785564 Debugger: Remove use of setRunParameters in Qml attach dialog
Change-Id: I90ef143b9c9a0d8606e7d00346c1e508c32a4d88
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 09:58:46 +00:00
Marco Bubke
53f68fd86f ProjectExplorer: Remove test for Macro
Under windows the signature for private and public member are different. So
the hack to make private members public is not working. The other method
to use a macro project macro header is not wanted.

Change-Id: I25a3f4a8645394ba6b49a7d4778adab90155f892
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 09:38:08 +00:00
Eike Ziller
3c988e5a0d Change File System pane to a forest of trees
It shows the file system as a tree, where the user can change the root
directory of the view. Currently there are "Computer" (the default), and
all project directories.
If synchronization with the current editor is enabled, the view
automatically switches to the best fitting root directory.

Task-number: QTCREATORBUG-8305
Change-Id: Ic265eb49b1e8e0fd8cdeeb4fb1c64b8631f32e21
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-18 09:15:23 +00:00
Nikolai Kosjar
083ff55abe Clang: Fix warning about unused function
Last use was eliminated with

    commit b6e12f4a1c
    Convert macros from plain QByteArray to a vector of structs

Change-Id: I512524839199bc5c8b64f739636e9caebc37c7d0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-18 07:27:49 +00:00
Marco Benelli
6f7aa1f962 QmlJS: user defined style in reformatting file
The size of tabs and indentation used to be ignored when reformatting
a file.

Task-number: QTCREATORBUG-12849
Change-Id: I0b522b526a199c6397b78b5e193159ec52fc941a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-18 06:58:35 +00:00
Alessandro Portale
adae0c3ae8 Ssh: Move some Ssh specific images from Utils to Ssh
Removing the invalid resources dependency on Utils, cleaning up
the Utils images and prevent other places from using such unthemed
icons.

Change-Id: I78f5cfe1f48d0853c6c3e8822cbb041c232db426
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-09-17 19:46:11 +00:00
Ivan Donchevskii
a137b08eaa CppEditor: refactor FollowSymbol
Create an interface to get the ability to use
another FollowSymbol implementation

Change-Id: I5802f62523ff3ee47b8a14e487adf43edcb6c9b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-15 14:14:01 +00:00
Ivan Donchevskii
76d12dc2d5 CppEditor: add default RefactoringEngine
..and use it when we don't have refactoring plug-in

Change-Id: Ibe317a9728d439b9c5e05271d92a330d22eaacb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-15 14:13:48 +00:00
hjk
62ada96091 Debugger: Remove serverStartScript run parameter
Instead, create the resulting RunWorker as dependency directly.

Change-Id: Id15005bb5707bb97dfc61cc2f84409e759e60f9f
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 13:34:06 +00:00
hjk
ace413a74c Debugger: Don't second guess on run in terminal setting
Task-number: QTCREATORBUG-18912
Change-Id: Ie6ded1b7df032730e8e118e5679f288b21066667
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-15 12:13:12 +00:00
Tobias Hunger
a35d81a697 Environment: WS-only fix
Change-Id: I69c8f08b9519770323f8a546ca23546f13a01dfd
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 12:11:03 +00:00
Tobias Hunger
df22d2c717 CMake: Do not lose value when renaming key in config model
Do not lose the value when the key gets changed in the CMake configuration
view in Project mode.

Task-number: QTCREATORBUG-17926
Change-Id: I7c55f815bc918da0267eed57385c2d641568dc8c
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 12:10:29 +00:00
Tobias Hunger
63ce81db5e CMake: Sort Project CMake configuration via the Proxy model
Makes renaming items feel more natural as they do no longer stick to the
top (note that currently you can only rename newly added items!).

Change-Id: I89d0dc7cb73e08d8b60900a96ffd2ab1c2b490c2
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 12:10:19 +00:00
Tobias Hunger
8e5528212f CMake: Only enable edit button for CMake configuration when useful
Only enable the button when items are actually editable.

Change-Id: I54fd5430772a6db61c85b59d5c655d3bd4ebf8d7
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 12:10:13 +00:00
Nikolai Kosjar
d1799b9aa1 UnitTests: Fix build with QTC_NO_CLANG_LIBTOOLING
Change-Id: Ia2c5b9cf617e56f09bf334bdd57e58bf96c838b1
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-15 09:59:46 +00:00
Tim Jenssen
9664f2a89c fix msvc build
error C2039: 'isspace': is not a member of 'std'

Change-Id: I92410b09c4de18d9c3c43a2f052a6b2595c92013
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-15 08:14:31 +00:00
Friedemann Kleint
7832806439 Python indenter: Skip past empty lines
When trying to determine the indentation for non-empty lines, skip back
past empty lines when trying to find the previous indentation.

This prevents code from being inserted at 0 when pasting in below empty
lines.

Change-Id: I6e13e4146e6637180142c0e0b3f9cdafa89df3e5
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2017-09-15 07:33:50 +00:00
Marco Bubke
3c25b1e3be Add projectmacro to qbs
Change-Id: I6e9df1241c97313c7d69e339de8866d2a2ce193b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-14 16:06:17 +00:00
Marco Bubke
b6e12f4a1c Convert macros from plain QByteArray to a vector of structs
The old code model expected the macros as C++ formatted text
("#define Foo 42) but newer targets like the Clang codemodel expect key
value arguments like "-DFoo=42". So instead of parsing the text again and
again we use an abstract data description.

Task-number: QTCREATORBUG-17915
Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-14 15:23:56 +00:00
Marco Bubke
3adb71d45e Clang: Add Symbol Indexing
It is a first step and now a database is generated if you start QtCreator.
Some code is now shared with the PchManager which can be improved in the
future.

Change-Id: Ic267fe7960f6c455d91832859a673ce98f269aa2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-14 13:39:55 +00:00
Andre Hartmann
8488ce627b Git: Refresh RemoteModel when last remote was removed
The existing check prevented a model update if the remote
list was empty and therefore kept an orphan entry and forbid
adding the remote again until the dialog was re-opened.

Task-number: QTCREATORBUG-18904
Change-Id: I5a45919a8af5108d44f85f87a64a00cf459af3bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-14 10:44:43 +00:00
Orgad Shaneh
c64374b7c7 ProjectExplorer: List abis on mismatch
Change-Id: I90266c7d8b200b0b99937d4b5ae9f427117aff2c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-14 10:25:31 +00:00
Robert Loehning
71b5d84122 Android: Remove pointless condition
Change-Id: Iaf9d28a68bb06e7430083c5a944bf88c37b50ecf
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-09-14 09:43:33 +00:00
Robert Loehning
816fdb579b ExtensionSystem: Add missing spaces
Change-Id: I9fc5df6c33bf802e1e4f85f394db40e64f3e1b55
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-14 09:42:57 +00:00
Ivan Donchevskii
8136523ed7 Clang: fix clang static analyzer invocation
Change-Id: I95579040ed1df865585cac4833d5b3f065a5770d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-14 09:33:00 +00:00
Vikas Pachdha
bc32c380a5 Android: Remove python support checking for the NDK's GDB
The check and the warning was for the super old NDKs which are
not supported anymore

Change-Id: I13cb0d3aa1deb3e5cff284ac4e4960e4d23950b4
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-09-14 09:16:40 +00:00
Vikas Pachdha
027383814a Android: Remove Ant and make gradle as the default java build tool
All GUI options to choose between  ant and gradle are removed.
Gradle is the only java build tool used now.

Change-Id: I309ff66256c5d40920a5d77a8331c5917c53c185
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-09-14 09:01:12 +00:00
Robert Loehning
f4a8f52b0d Utils: Use ref instead of copying large object
Change-Id: I77ea6d1e9eaf16e92ce04cc59357b2c754d76e44
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-14 08:40:26 +00:00
Orgad Shaneh
4280e93737 Refresh window title on app activation
Task-number: QTCREATORBUG-18485
Change-Id: I5598dd628a76213fc4b9e49a002818b2fa3663cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-14 08:27:41 +00:00
Nikita Baryshnikov
6fdb0756f7 SshExceptions derive from std::exception
Change-Id: Id107ed53fed9ff72e90b662dfc024c4ced24a89d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-09-14 06:03:50 +00:00
hjk
7eec0f63ac Debugger: Merge DebuggerStartParameter into *RunParameters
The users (typically target specific DebuggerRunTool derived classes)
are meant to use the individual setter functions nowadays, not the set
up the full structure, so the members are a true implementation
detail now.

Change-Id: Ida04801e3230a2fe8bbadde8845e58c3077c87a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 14:00:59 +00:00
hjk
7f2cb9ead9 ProjectExplorer: Allow user stopping ill-behaved RunControl
If a RunWorker fails to report success or failure (should not happen in
theory, but has been observed in practice, typically in exceptional code
paths) the RunControl will stay in 'Starting' or 'Stopping' state
forever. Give the user the opportunity to force a 'Stopped' state by a
second (or when 'Running' a third) time on the Stop button.

Change-Id: Iec58434927777bd67bfe01c5144ee5695b4d6cf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 13:40:02 +00:00
Robert Loehning
89d08bf4b2 Squish: Update createNewQtQuickApplication() and calling code
This is only meant to let the wizard finish successfully. Further
changes will be needed because of changed code in the project.

Change-Id: Ic88ffa107f15c55b3278d3d6fc4d3c2dbc4d728b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 13:17:13 +00:00
Friedemann Kleint
b7cdd90e55 QmlDesigner: Fix spelling of API
CurserSelectionSyncronisation -> CursorSelectionSynchronisation

Change-Id: I1370d0153d566e1c54f1e00f8c2339bfc9e33a5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-13 11:53:15 +00:00
hjk
afc39c4cc3 Qnx: Merge debug support related files
The attach part has not been active for a while, but there's code
now easier to reuse. So move participants of a potential solution
to a suitable place before attempting to fix functionality.

Change-Id: I9a7d4a6637e8ef214c22ee5683103e464109210d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 10:16:03 +00:00
hjk
890c1906e6 ProjectExplorer: Re-organize RunConfiguration constructors
The idea is to massage the setup in a way to make implementation
of new configurations less error prone by identifying recurring patterns
and sharing repetitive code that tends to be forgotten (see Android cloning).

The former two lines of constructors (owner-and-id, owner-and-source)
are split into a simple, shared, constructor and new setId() and
copyFrom() functions.

The change is mostly mechanical, some multiple calls to fromMap
have been removed, though, some consts added.

Otherwise, to keep the patch small it temporarily introduces two
helper templates in IRunConfigurationFactory. Also, setId() signatures
have not been unified yet. These won't be needed in the final setup.

Change-Id: I8c0734496caae744a9883fe6d92c1d8f8e0234ea
Reviewed-by: hjk <hjk@qt.io>
2017-09-13 09:24:26 +00:00
Friedemann Kleint
4710e6b4b2 TextEditor: Fold Python/Perl/sh license headers
Skip shebang and fold the first comment.

Change-Id: I06d55931555f1c77f08bf30427ae7072f38b02da
Reviewed-by: hjk <hjk@qt.io>
2017-09-13 06:40:14 +00:00
Friedemann Kleint
d56becc808 Python Editor: Introduce simple folding
Mainly go by code indentation, ignoring empty lines.
Handle comment blocks at 0 as a special case.

Change-Id: Ibe5bef7286c640a2eea8b50140dae256b6635a56
Reviewed-by: hjk <hjk@qt.io>
2017-09-13 06:40:06 +00:00
hjk
67b4a7a872 Debugger: Replace a few more uses of setRunParameters
Change-Id: I8f35bcd3812402cda7d3c69eb01ed3d3fb9e396a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 06:26:36 +00:00
hjk
4c360601b4 Debugger: Replace guessKitFromParameters()
... by guessKitFromAbis(), that's what it is.

Change-Id: I45b0f9cc2fb6af5ed0832dab9f798ebe8101cf66
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 06:25:09 +00:00
Orgad Shaneh
50e3085f22 Tooltip: Hide when Escape is pressed
Change-Id: Ib516cbbd9b51ddac3dac48668e3341830233af4b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-13 06:14:24 +00:00
hjk
ac2012a73a Debugger: De-virtualize *Engine::notify* functions
Most were never re-implemented, so just for debugging purposes
in the mixed engine.

Change-Id: If569e0e553e3fdd5ef83b3bdfdbd22fd0ad5b90f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 06:12:03 +00:00
Christian Stenger
0e92b085f9 QmlDesigner: Fix qbs build
Change-Id: I6a541a23fc9fde51a8355589c26ecefe1eb71788
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-13 06:00:39 +00:00
hjk
001d4c10a7 Debugger: Remove use of setRunParameter() for state auto test
... which are disabled anyway.

Change-Id: Id15de0e5b766373570d89bacf02464e46f5b2b89
Reviewed-by: hjk <hjk@qt.io>
2017-09-12 15:34:23 +00:00
Alessandro Portale
9ad888e6a6 QmlDesigner: Replace redundant images + remove unused files
Replaces some redundant icons files with already available, themeble and
HighDPI-able Utils::Icons. The removed files are mostly images which
haven't been used since a while.

Change-Id: I1c17eb176a0d3d0a80335b43909012eab822c6b1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-12 15:21:02 +00:00
Ivan Donchevskii
96ef6c797b CppEditor: split CppEditor and CppEditorWidget
Change-Id: Id3c815184f7f3bace0276e947f6b6f76e61ec6de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-12 15:05:38 +00:00
hjk
c26149dc43 Debugger: Integrate setupEngine() into tool start()
... a step towards abandoning the engine-related bits of
the debugger state machinery. The base RunWorker states
meant for that are good enough now.

Change-Id: I3b269bdeb66f14a956b76e6a7e8258f45b3e59e5
Reviewed-by: hjk <hjk@qt.io>
2017-09-12 14:36:22 +00:00