Commit Graph

53197 Commits

Author SHA1 Message Date
Eike Ziller
5457a2b505 Do not use tr() in initialization of static
Leads to issues at load time

Change-Id: Ibf13c88d05b15f6169f3a82a0e1d66c10bff7991
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 07:39:52 +00:00
Alessandro Portale
83f5face41 AutoTest: Redo three icons
benchmark, text and visual

Change-Id: I4b1c92535687cfde397257622f171989bda413cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-19 07:07:36 +00:00
Nikolai Kosjar
d6da4e5136 CppEditor: Use class enum for CppUseSelectionsUpdater::CallType
Change-Id: Iaf6df1ccec50b84048933506a46b93bedf77da8e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:59:10 +00:00
Nikolai Kosjar
af3416a9de CppEditor: Refactor CppEditorWidget::contextMenuEvent
No behavior change.

* Extract some functions
* Add some clarifying comments here and there
* Add QTC_CHECK()
* Remove QLatin1String
* foreach -> for
* Const-correctness

Change-Id: Ie6ccc987ef959c5295a4d3225aac0dbad144f91d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:59:04 +00:00
Nikolai Kosjar
656b9f9185 Clang: Restrict warning options edit to single line
...to avoid confusion.

Use a customized QPlainTextEdit instead of a QLineEdit because the
latter does not allow wrapping of long lines. Horizontal scrolling in a
QLineEdit for long/many options is inconvenient.

Change-Id: I15b5f034e04920d0ca955c4f822d882b05e9c235
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:58:34 +00:00
Nikolai Kosjar
082ba1d133 Clang: Validate warnings options from user
...in "Menu: Tools > C++ > Tab: Code Model > Clang Code Model Warnings"
to avoid (re)parse issues due an invalid command line for libclang.

If an invalid option is detected, then indicate it by providing an error
message. As long as there is an invalid option, the options are not
accepted.

We do not want to maintain a white list of valid options, so mostly
check whether the option starts with "-W". An unknown or misspelled
option like "-WnotYetKnown" will be ignored by libclang.

To keep passing in some options for testing/debugging convenient, skip
validation if QTC_CLANG_NO_DIAGNOSTIC_CHECK is set.

Task-number: QTCREATORBUG-18864
Change-Id: I196d0474c7521969c54133f52dfc7be0394bfc3e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-19 06:57:11 +00:00
Andre Hartmann
d45e44a2d6 Locator: Remove duplicated using namespace from opendocumentsfilter
Change-Id: I47e3dc36a63d6f054d6e806ddb3cb84254d24034
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-18 20:19:30 +00:00
Robert Loehning
27153ddb76 QmlDesigner: Check whether puppet build process started
Change-Id: I6fe1a6c4426ccd6704b27d5a77f1f5aa30d067fd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 16:49:06 +00:00
Eike Ziller
49f3442a72 CodeAssist: Use settable property for IAssistProposal::isFragile
Removes the need to create yet another subclass (for overriding a
virtual method) in some situations.

Change-Id: I55d70de60b4f8d127a175d996f797700c2f172a6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-18 15:33:52 +00:00
Orgad Shaneh
f97657b15e Dumpers: Add a show case for C-style strings
Change-Id: Ic70761ffcd76bdfed7879c222d471b50a8b32c0b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-09-18 15:00:37 +00:00
hjk
9ff3064561 MemCheck: Code cosmetics
namespaces, includes, use convenience functions when appropriate.

Change-Id: Ibfba9b4ce8d4644829cb308b45b5902e39a57634
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 14:57:49 +00:00
hjk
c4e6678b50 Qnx: Partially fix Attach to Running process
Only works for opened, active project, but better than before.

Change-Id: Icafe3a9605cea29cd16ed4bd316bf195e78efdb5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-09-18 14:56:50 +00:00
Marco Bubke
382c9647e8 Sqlite: Remove the Sqlite Prefix
We use a name space now, so the prefix is not of much use.

Change-Id: I2b077576f94dab778add6ab2e54870f7ca18da78
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 13:37:11 +00:00
hjk
d2aaa26653 Debugger: Remove DebuggerRunTool::setRunParameters()
It's all coming via individual setters now.

Change-Id: I373f43963e696fa7223f9d664de1df1bc8b021e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 13:01:28 +00:00
Orgad Shaneh
2a9f45c567 AutoTest: Reorder build systems for consistency
+ Only enable qmake when the plugin is enabled.

Change-Id: Id2a7600a1e71daf14a050ec7ac3247de795a2835
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 12:25:06 +00:00
Christian Stenger
4068ec44b6 AutoTest: Allow arguments for test runs
Arguments specified for run configurations were
ignored so far, but sometimes it might help to process
them. Add the possibility and a respective setting
to be able to pass arguments to the test run.

Task-number: QTCREATORBUG-17630
Change-Id: Ie64b784e8477efa02f50ce6b4cf3e55864952880
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-09-18 12:17:04 +00:00
Christian Stenger
b1373c4853 CMakePM: Fix compile with Qt5.6
Change-Id: Ic50efba6b7ff70d4811b7e790e7b9c1f89a1fe44
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 12:16:05 +00:00
Thomas Hartmann
f369fd8d6a QmlJS: Add bezierCurve to builtins
Change-Id: Ie0301379742af679f785dc18c363e6e310069956
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-09-18 12:05:58 +00:00
Robert Loehning
0683042141 ClearCase: Don't try reading when file cannot be opened
Change-Id: Id403f9ed58fb624aef7f6d54607e19a5dd057fd5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-09-18 11:56:58 +00:00
Orgad Shaneh
2760b9fc67 Dumper: Dump CHAR/WCHAR arrays as strings
Change-Id: I78bdb181e27cc858356c9026fc960135b54cdcbb
Reviewed-by: hjk <hjk@qt.io>
2017-09-18 11:43:51 +00:00
Tobias Hunger
dfec256dff CMake: Allow CMake configuration to be forced to string type
This allows editing values with misidentified types in Project Mode.

Change-Id: Ic74da2ca71cc9046cbbeb1202075976c9edd28b7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 11:36:51 +00:00
hjk
3d8ddb389d Debugger: Remove last user of setRunParameters()
Change-Id: I0480c1f8532d3d9dfdfe277d4bcadc171a11d38c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-18 11:26:27 +00:00
Robert Loehning
fb9c5e59ed QmlDesigner: Fix indentation
Change-Id: Ia7d3eba7832acc13189f3716e37e9b5f1be5190d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-18 11:15:09 +00:00
Nikita Baryshnikov
bf46cf8eaf ScxmlEditor: silent fallthrough warnings
Change-Id: I7bd7140f05e8342a2e10713eb1646e0bd3f028ff
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-09-18 11:08:08 +00:00
Christian Stenger
66423bcb3e AutoTest: Fix parsing for Qt test
Broke with b6e12f4a.

Change-Id: If72b668b12cf9af7d154a8be8909a9c85645b457
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-18 10:38:39 +00:00
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
hjk
0b8ab0d78a Debugger: Don't second guess on run in terminal setting
Task-number: QTCREATORBUG-18912
Change-Id: Id6ded1b7df03273048e118e5679f288b21066667
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-15 12:13:04 +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