Commit Graph

51482 Commits

Author SHA1 Message Date
David Schulz
d42e867f44 TextEditor: Use default values for DisplaySettings members
Change-Id: I04a58ffd25d44e144d064fe691251ea136ed8c88
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-23 12:07:53 +00:00
Eike Ziller
b289dbde3c Fix style of visualized whitespace for various vcs editors
Blame, log and git rebase editors.

Task-number: QTCREATORBUG-17735
Change-Id: Ifd23ba7b6ccf3ef98d3026cdc8c17fd88c97797c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 11:32:57 +00:00
Nikolai Kosjar
1a9808d393 Clang: Remove unused functions
Change-Id: I66e990dfce5196da48cdf158cf7e5a4050565670
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 10:52:41 +00:00
Eike Ziller
21a246ac38 Fix highlighting of C/C++ line continuation backslashes
The backslash itself is not a token, so we must make sure to only format
the trailing whitespace characters as visual whitespace, instead of
everything trailing.

Broke in a92694596e

Task-number: QTCREATORBUG-987
Change-Id: I4e9e84d29513ea317d7e3bde6c6b4c43749cb649
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 09:21:36 +00:00
Eike Ziller
a901916710 DiffEditor: Remove dead code
It updates a local variable that is not used.

Change-Id: Id7ec92108bb3a35c9177bd3429b6f69ac23a9f28
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-05-23 09:00:07 +00:00
Eike Ziller
d0da958f99 Fix whitespace highlighting within python comments and strings
Change-Id: Ib3c72483b42c4843efc8deb1c15eddf953c661af
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 08:50:48 +00:00
Eike Ziller
0a1376dd2c Generalize function for visualizing whitespace from CppHighligher
Move function which formats all non-whitespace with a given format, and
all whitespace in the same range with correct whitespace highlighting
(merged with the non-whitespace format), from CppHighlighter to
SyntaxHighligher.

Change-Id: I8cac306f6362e804698068a0df0292f88726264f
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 08:50:32 +00:00
Eike Ziller
db11c01df8 Clang: Fix highlighting of primitive types
libClang categorizes these as keywords, so we need to check
if a keyword is actually a primitive type, and use that.

Task-number: QTCREATORBUG-17867
Change-Id: I354bb0422505ed7732a0799d9c86d3acfdeb0785
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-05-23 08:41:42 +00:00
Eike Ziller
f51fbd68e1 SyntaxHighligher: Remove the need to specify format for spaces
It has all means to know itself.

Change-Id: I464c195c5ee47e5fc58414a280c166e4a332c588
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 08:34:53 +00:00
Eike Ziller
cf57965ebc Simplify text format handling in syntax highlighters
Pass the mapping from custom enum to text style in form of a function,
which then can use a switch which is checked by compilers, and
avoids the need to lookup a different enum somewhere else to find
out what the mapping actually is.
That mapping is cached to keep performance as before.

Also, most highlighters created an enum just for the purpose of mapping
to text styles, basically creating duplicated subsets of text style like
enums everywhere. Instead provide a default, identity mapping from text
styles to text styles.

Change-Id: I2ea1ca702b99e36b8742dfda510b1b2753f0a1c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 07:47:22 +00:00
Ivan Donchevskii
762f67f729 Clang: fix completion for incomplete includes
Complete includes when one choice exists.
Fix complete in the middle.

Task-number: QTCREATORBUG-15710
Change-Id: Iec794c17aabc8de47f981382f4b4286b9325827d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 07:46:26 +00:00
Nikolai Kosjar
986a518c17 C++: Handle curly braces like other brace types
Unless it balances the curly braces
 * typing '{' leads to auto insertion of '}'.
 * typing '}' skips already present '}'.
 * removing '{' leads to auto removal of '}'.

This prevents unbalanced curly braces, which are problematic for clang.
Concrete use cases are: typing of initializer lists, lambdas, function
definitions.

Task-number: QTCREATORBUG-15073
Change-Id: Iec8c6aa5aca054455c1e1bfde3a65c4fd1f579c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-23 07:43:39 +00:00
Thomas Hartmann
7482d8a152 QmlDesigner: Fix resolving of source
Using the QUrl:resolve() does not work with Qt 5.9.
Since the file url is a local file and not directory this was
weird usage of QUrl anyway.

Change-Id: I2d709bc40a404b61ea3c3edbbfd1727a6ee2111c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
v4.3.0
2017-05-22 15:22:11 +00:00
Jesus Fernandez
19a178e1b1 EnvironmentWidget: Change the shortcut from &Edit to Ed&it
&Edit was conflicting with &Edit from the menu bar. To make the shortcut
more useful 'i' is used instead of 'E'.

Change-Id: I88541bec44cfe68e4b36508887597ce05867f25f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-05-22 15:09:38 +00:00
Tobias Hunger
2ec987ff49 Resources: List .qrc-files with the other files
List .qrc-files with the other files, even though they can be
expanded to reveal the resource files contents.

Task-number: QTCREATORBUG-18234
Change-Id: Iad05fb358c35eb81c4f74b7a0524447801981ae5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-22 14:47:45 +00:00
Tobias Hunger
013642b0a7 ProjectExplorer: Fix node selection in wizard dialogs
When File>New File or Project is selected, then no node should be selected
on the summary page. If the wizard is triggered via the context menu of the
project tree, then select that node as context instead.

Task-number: QTCREATORBUG-18093
Change-Id: Ic9a14ad72c23c9a40ba2866772e0dcd5b28f9a74
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-22 14:47:21 +00:00
Tobias Hunger
db84ad5368 SessionDialog: Fix autoload checkbox
Change-Id: I35203feb94335300933a6b940bf7807ee37e55b1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-22 14:47:12 +00:00
Eike Ziller
f694e4b481 macOS: Fix conflict between cancel build and DeleteStartOfWord
Change-Id: I63f9bbb6b190009e2feceeb6f3a9a8f1953fd6f5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-22 14:28:39 +00:00
Thomas Hartmann
c515f68786 QmlJS: Allow Loaders in ui.qml files
Loader are working in the designer and we will add more support for
them in the future.

Change-Id: Ied62d65b0eb9933b44a7833ccafcb934d4ae6fba
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-22 14:19:02 +00:00
Ivan Donchevskii
707170ca04 Clang: make workaround for multibyte utf8
Correct columns in clang diagnostics and completion

Task-number: QTCREATORBUG-16775
Change-Id: I7260a0e52007fe261e83492dca5d457c34476497
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-05-22 13:28:36 +00:00
Thomas Hartmann
a03e04b1cd QmlDesigner: Always add the iso icons to the qrc mapping
Since the qrc scanning is now asynchronous the qrc mapping
is not always reliable. Especially the first time when a new
.qrc file is added.
To keep at least the iso icon tool working reliable we always
assume an iso-icons directory.
Since the mapping qrc to file system is one to many anyway, this is
not breaking anything.

Task-number: QTCREATORBUG-18225
Change-Id: Ibb6d77960bd643f8c1f37bebc0c0e400588d0429
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-22 13:16:06 +00:00
Vikas Pachdha
00167e5ab2 Android: Delete auto generated kits without valid Qt version
Task-number: QTCREATORBUG-18229
Change-Id: I55a31a12b00eefe70c224c2d9e4939218827e1be
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-22 12:11:39 +00:00
Christian Kandeler
34702f8441 SSH: Fix enum values
Newly introduced enum values need to get a higher value than the
existing ones of the same type. Otherwise such values will be
interpreted wrongly when loaded from settings created by earlier
versions of Qt Creator.

Task-number: QTCREATORBUG-18235
Change-Id: I0f8497352d1ef382b5c8a65db4e1dea20b6296da
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-22 10:51:40 +00:00
Thomas Hartmann
e2a45d0032 QmlDesigner: Fix compile
Change-Id: Id37f517fb0584f8066cc0922ed1ca18901bfa7b2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-22 10:44:37 +00:00
Orgad Shaneh
7a3eb71cf7 ProjectExplorer: Minor cleanup
Change-Id: I9388053eafae661bb16c75917ca8cc738df8b3c1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-22 10:29:14 +00:00
Thomas Hartmann
3869af3a15 QmlDesigner: Avoid conflicts in shortcuts
Some shortcuts for the toolbar were still conflicting
with the text editor.

Change-Id: I4cad3c9a1f4978ea75b74cc58b789c12fdde871c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-22 09:18:49 +00:00
Thomas Hartmann
602f1e1369 QmlDesigner: Register context menu actions for form editor and navigator
The context menu actions with a shortcut should also work
in the navigator.

Change-Id: Idd9165737e0d76c78aeb9200191a5e42a41ff793
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-22 09:15:49 +00:00
Thomas Hartmann
81aac69f45 QmlDesigner: Avoid conflict on F2
F2 is also used by the text editor.
We avoid a conflict by defining F2 just in the form editor
and navigator.
To avoid conflict we remove the action from the shortcut manager,
since we already have an action in the context menu.

Change-Id: Ib4c30a271da8f106210f5a86cfe0088386b87403
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-22 09:13:20 +00:00
Christian Kandeler
77e7d222f6 Update qbs submodule
To HEAD of 1.8 branch.

Change-Id: I37833b80dbcf4f3ac5a00e7eda69c47eb66fc454
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-05-20 10:50:08 +00:00
Tor Arne Vestbø
9b3ad89dcd Make Qt python pretty printers available inside LLDB/Xcode
The LLBD bridge can be imported from the users's ~/.lldbinit:

    command script import "<path to lldbbridge.py>"

Or by relying on a (future) debug script in the QtCore dSYM bundle.

Change-Id: Ia099dcebc6375d38ae2d75c939bb5669e30e4b2c
Reviewed-by: hjk <hjk@qt.io>
2017-05-19 14:03:46 +00:00
Eike Ziller
4e35cc2ea8 Fix that raw string literals that close on same line were not terminated
With the built-in model, which affects basic highlighting.

Task-number: QTCREATORBUG-17720
Change-Id: I7369d7288d9c2c8e5ef36fc27549121014527e58
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-05-19 13:50:42 +00:00
hjk
a37c8add58 Debugger: Fix QmlInspector state update connection
Change-Id: I1693d593ec08c14c48b2c2800ce2f240f9e5f438
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-19 13:07:01 +00:00
David Schulz
ce7166bb01 Debugger: Fix compile after 36ec37b29d
Change-Id: Ibd252961a5646ef3a9eec91db62c1b2fa74a47af
Reviewed-by: hjk <hjk@qt.io>
2017-05-19 11:59:37 +00:00
hjk
a7ad7f1766 WinRt: Port to RunWorkers
Keeping it as one blob for now, a proper split in the new architecture
would make WinRtRunnerHelper a RunWorker, too.

Change-Id: Ie310d05c1edf0ef9544b80743c140e44fcffc3ae
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-19 11:35:38 +00:00
Christian Stenger
cccc6b37ec AutoTest: Remove not needed code
As this functionality had been simplified GTest* classes had been
ignored. Continue the simplification and finally remove now useless
code and file.

Change-Id: I89170cd5f05bb93bf30a05fdbf5370012bc9741a
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-19 10:02:55 +00:00
hjk
36ec37b29d Debugger: Streamline ramping down
There were only two used target states, and in case of mixed
debugging all parts of the machinery better agree on the
direction. So one bool in the (shared) runTool is sufficient.

Change-Id: Iffbf1651b82dde707cfc37d8da9d3da573b34b76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-19 09:56:49 +00:00
Orgad Shaneh
ded514cf05 CppEditor: Fix infinite loop on "find next" in include hierarchy
Change-Id: I8ee661b2d4b66704d85dd55cdd52f9e8c8d558d5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
2017-05-19 09:54:03 +00:00
Nikolai Kosjar
abc7f2fa61 GccToolChain: Do not deadlock on compiler path changes
Make sure mutex is recursive.

Task-number: QTCREATORBUG-18175
Change-Id: I357ff46e185a99540036b2c175650704fb8e45a0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-19 08:53:25 +00:00
Tobias Hunger
9e43814b13 RemoteLinux: Fix build warnings about inconsistent use of override
Change-Id: I58d53f05fbaa18763ad3198235004f6081da71b7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-05-19 08:34:43 +00:00
Tobias Hunger
6886b59fe6 CMake: Filter duplicate files from tree in tealeaf mode
Task-number: QTCREATORBUG-17955
Change-Id: Ibd19c7a0d398f3f26d63983ec024722933485513
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-19 08:01:50 +00:00
Ivan Donchevskii
5e84af54a0 Clang: fix incomplete include text underlining
Fix invalid include text selection.

Task-number: QTCREATORBUG-15471
Change-Id: Ifbe00a7215f2307648e815cb283691496d02c4d0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-05-19 07:47:16 +00:00
Orgad Shaneh
3490e67a49 FindInFiles: Support relative path based on the current project
Task-number: QTCREATORBUG-18139
Change-Id: Icffbba7f9db4514b986f0414a9f7a834d4da39c6
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-19 07:34:33 +00:00
Orgad Shaneh
5368e29050 PathChooser: Avoid unneeded validation when base is unchanged
Change-Id: Ia4b00d673725ff3718dbc9703c933a44fe2314dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-05-19 06:55:53 +00:00
Orgad Shaneh
aae55000db GenericHighlighter: Remove invalid entries in makefile.xml
Those keywords are mapped to undefined lists.

Reported in https://phabricator.kde.org/D3621#inline-17949

Change-Id: I5d5fc654afe2e35577175a0e3fa2196555ee4ada
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-05-19 06:28:20 +00:00
Orgad Shaneh
a4a146b3cb Move Git-specific logic from DiffEditor to Git
Change-Id: I29466c26a51844bb975ac3ecb68adf708021aa67
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-05-19 04:48:23 +00:00
Andre Hartmann
744285c3fc SubmitFileModel: Remove commented code
Change-Id: I6806ff0d724dc40559a980cd09aa9ae9e32ebaab
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-19 04:24:53 +00:00
Andre Hartmann
a396c79702 SubmitFileModel: Change enum naming according coding style
Change-Id: I2b2b37c8125076374c69cc638f1e9611dff27a8c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-19 04:24:41 +00:00
Andre Hartmann
9e2952cf8e SubmitFileModel: Whitespace cleanup
Change-Id: I93a4d07efd7acd06d72372da7679a8e71b00a8e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-19 04:24:13 +00:00
Andre Hartmann
7e45c2e7e2 SubmitFileModel: Remove Q_FOREACH
Change-Id: Ie6cb01f6873ea3c438068d2963a648f0979f7133
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-19 04:23:40 +00:00
Andre Hartmann
ca95965b27 SubmitFileModel: Simplify list construction
Change-Id: Ie59501ec245020666e59b41b9690a562538cd69c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-19 04:23:26 +00:00