Commit Graph

54723 Commits

Author SHA1 Message Date
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
Andre Hartmann
eff6f2cebb SubmitFileModel: Remove unneeded qualification
Change-Id: Iae3f87cda1ad4c58054a324f9b822daaacb63fb2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-05-19 04:23:12 +00:00
David Schulz
f811cff769 Debugger: Execute extra dumper commands after cdb start
Change-Id: I3dfc803695ffaa04d719103d8bec59ce8b4f08e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-05-18 13:07:52 +00:00
Christian Stenger
dc873311e5 CPaster: Fix fetching from pastebin.ca
Change-Id: If41c89dddfd556607dccd940f289408012680e82
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-05-18 12:36:47 +00:00
Robert Loehning
ae4be183fd Squish: Tune tst_codepasting to working cases
Change-Id: Iaa7ebcbc20f096d1776be13c62978d6851707d39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-18 12:35:42 +00:00
Robert Loehning
d9e1c77c01 Squish: Shorten object names
Change-Id: Ic57dce86bccae23a2edeee42207a872793feffa0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-18 12:26:18 +00:00
Vikas Pachdha
0093e4a263 Android: Fix android kit missing compiler on NDK path change
Task-number: QTCREATORBUG-18221
Change-Id: I4481d252064476f905a02a53c487664f3e1d4a4c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-18 10:51:19 +00:00
Kari Oikarinen
9ea07a2fbc RemoteLinux: Don't force value for DISPLAY in base environment
When set on nVidia Jetson TX-1, it leads to applications failing.

To allow previously created projects to work, add DISPLAY=:0.0 to user
changes to the base environment the first time the project is loaded. On
new projects for devices using X11 the user now has to manually set the
DISPLAY variable.

Task-number: QTBUG-60665
Change-Id: Iecc192fbad81ad5cbbbcabce6aeb28c3f501d022
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-18 10:09:16 +00:00
Tor Arne Vestbø
4eac9533e1 Make sure lldbbridge.fromNativeValue always sets value name
Change-Id: I40296843bcbc504d6271a1f30ac4f8c4a1a2fe85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-18 09:33:54 +00:00
Tobias Hunger
6dc6eb9ad0 ProjectNodes: Make FolderNode::replaceSubtree safer
Make it safe for an existing note to replace itself.

Change-Id: I8ce04ea45cb851c814b9efbc7d8490c5fb44150e
Reviewed-by: hjk <hjk@qt.io>
2017-05-18 09:19:11 +00:00