Commit Graph

44349 Commits

Author SHA1 Message Date
Nikolai Kosjar
e48d8afedd C++: Check previous lines for auto insertion of closing brace
If '{' is typed, we check whether '}' should be auto-inserted.
Previously, we did this by only looking at the tokens of the current
line. By using the BackwardsScanner we can easily look also at the
previous lines, which fixes e.g.

  namespace N
  <CURSOR> // type '{' - no '}' should be inserted.

Change-Id: Ib2c2989c33f87464431d45facf986bcbb2eff2f8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-07 14:22:38 +00:00
Ivan Donchevskii
c020f2448b CPlusPlus: Add toLink method to the Symbol
Basically move it from CppTools to CPlusPlus
to be able to use it there.

Change-Id: I0af80f93bdc029824397ceafdf940cb86c4382b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-02-07 14:01:52 +00:00
Tobias Hunger
31f1713c75 ProjectTree: Do not register action more than once
Change-Id: I9d9c86694cd8066ba4be2a065805a3b52bc272ff
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-07 13:42:50 +00:00
hjk
87543118d5 CppTools: Apply 'static' pattern to StringTable
This also fixes a crash on loading (some?) projects introduced
in 577bf7c08a.

Change-Id: Ie35d466fa3b84b183118fe93f55393a4c59755de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-02-07 13:32:08 +00:00
Tobias Hunger
d5cd95c702 CMake: Fix warning about unused parameter
Change-Id: I008a9e6193503a2d2761675921b6bc673ea5333d
Reviewed-by: hjk <hjk@qt.io>
2018-02-07 13:21:46 +00:00
Nikolai Kosjar
f75983b0aa TextEditor: Modernize texteditor.{cpp,h}
Apply some clazy and modernize fixes from clang tidy: mostly use of
nullptr and removal of type duplication.

Change-Id: Ibd9ee8f9b8a836a40d6f9be0b95acc91513a1a01
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-07 11:36:53 +00:00
hjk
940824ddee QtSuppport: Remove unused static function
Change-Id: Ifa884a440581c77f6d99ad6ee0669b8e5eb4aeda
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-07 11:21:49 +00:00
hjk
577bf7c08a CppToolsPlugin: Partially pimpl and remove use of global object pool
Change-Id: Iee09bf2fc7c945b8dcf950edfe94889d35c63735
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-07 11:20:22 +00:00
hjk
5e55c1e947 Welcome: Detach Welcome page registration for global object pool
We require individual pages to be provided in Plugin::initialize()

Change-Id: I431112b523ed4cc803c07e5c6df8aa8d4ed1663b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-07 11:10:56 +00:00
hjk
b16019c95b CppTools: Remove an unused declaration
Change-Id: I165f32678d61e3731fff68982bdb3f5c1791b1f0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-07 11:10:45 +00:00
Hannes Domani
ac8f2b8302 Valgrind: Open help for heob
Change-Id: I9cc7dfc2553f445784d3bb86378e2db28f70902c
Reviewed-by: hjk <hjk@qt.io>
2018-02-07 11:07:20 +00:00
Eike Ziller
2ce37a86ef Merge remote-tracking branch 'origin/4.5' into 4.6
Change-Id: I3ab4084095d90daf064475157b9a3cdce56dbdec
2018-02-07 12:03:43 +01:00
Eike Ziller
5432dd1f5c Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/coreplugin/locator/locator.cpp
	src/plugins/imageviewer/imageviewerplugin.cpp
	src/plugins/remotelinux/remotelinuxplugin.cpp
	src/tools/clangbackend/source/tokeninfo.cpp
	tests/unit/unittest/data/highlightingmarks.cpp

Change-Id: I74cc3ba3a2836cb9d0e65d3380d8c4f88d720c67
2018-02-07 11:58:23 +01:00
Alexandru Croitor
cb5ee3a9cb Make valgrind-fake target be a QtcTool
Change-Id: Icb572cac15224f1820851f8df0f13a99a7eed61c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-07 09:49:17 +00:00
hjk
d3bb3c0953 TextEditor: Use a non-static d-ptr
Change-Id: I21ae4599f152964166c65095996e3fc4ac417ba5
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-07 09:46:10 +00:00
David Schulz
3c2ad7eed9 QtSupport: move example image loading from delegate to model
Change-Id: I287336b4d36d648666093a4894ab131b8999ca98
Reviewed-by: hjk <hjk@qt.io>
2018-02-07 09:40:31 +00:00
Leena Miettinen
631d9cd711 UI text: Fix grammar
Change-Id: I39fd5db51e3228de34c028993416f66fce9962da
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-02-07 09:29:46 +00:00
Christian Stenger
109c3f06f8 TextEditor: Fix compile with Qt5.6/gcc4.9
Amends 91c19c2734.

Change-Id: I556c2336ac2bbde7f7f2acf4ed9339809a918b55
Reviewed-by: hjk <hjk@qt.io>
2018-02-07 09:06:53 +00:00
Vikas Pachdha
267e938191 Android: Fix empty output tab header and run configuration name
Task-number: QTCREATORBUG-19711
Change-Id: I5dc97129fa2e37360b9d74d99888703e049b9049
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-02-07 08:27:33 +00:00
Leena Miettinen
7797a2ba63 Heob: Fix UI text
Fix issues in writing style and punctuation.

Change-Id: I68da7960ccb5876ec8baf3b8eab1ab7e0d475a77
Reviewed-by: Hannes Domani <ssbssa@yahoo.de>
Reviewed-by: hjk <hjk@qt.io>
2018-02-07 08:17:07 +00:00
Christian Stenger
921c4b9aa2 Utils: Fix compile with Qt lesser than 5.10
Broke with 79a43b4d86.

Change-Id: I9e7c9dc02c917b0ec3672b296e673212b16e835d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-07 08:10:15 +00:00
Ivan Donchevskii
ad2461caca Clang: Add environment variables for extra clang flags
Different variables for clang code model and clang
static analyzer.

Task-number: QTCREATORBUG-19329
Change-Id: I64abdefb8c646a6f45f789a61abf75198e7ca3b8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-02-07 08:05:08 +00:00
hjk
aee0f8efcd Qnx: Pimpl and remove unneeded use of global object pool
Change-Id: I0029b151e34e2e7498afd8e410dfc617282bed49
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-07 08:03:35 +00:00
hjk
91c19c2734 TextEditor: Simplify SnippetProvider handling
The group identifier is as good as the actual object, so use that
on the generator and the consumer side.

Change-Id: I6ccd54a2362631af0b50583f12563b8e41a5dd78
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-07 07:59:05 +00:00
hjk
0c3aed2549 QbsProjectManager: Avoid use of global object pool
Change-Id: I6cce96dafda1694c46a4302ae121f7c08a9c82d8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-07 07:51:41 +00:00
hjk
c685dd1d83 TextEditor: De-qobjectify SnippetProvider
It's really not much more than a struct with three items.
And there's no need to have them in the global object pool.

Change-Id: Ie4f46ba2ecb1b90ef22479a0e81d03d9301c2e7a
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-07 07:50:14 +00:00
hjk
58a168db82 TextEditorPlugin: Pimpl and remove uses of global object pool
Change-Id: I17eb0e928788f02f6089fd2a2ed2393d7f577d11
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-07 07:49:06 +00:00
Nikolai Kosjar
88c480ee7c CppTools: Remove unneeded #include
Change-Id: I3b1dd5aa12ba8690ee5de98ccdef99644fff04f9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-07 07:40:35 +00:00
Christian Stenger
d5e666b012 Utils: Do not blindly assume qmake* is an executable
Change-Id: Iec444d2883536a0140197af9e8b90e3050d8fc5b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-07 06:13:41 +00:00
hjk
0bbf224667 PythonEditor: Remove uses of global object pool
Change-Id: Iba9903ca994a0e9aef268685269789daf2b83183
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-06 14:29:05 +00:00
hjk
0b33500655 ClassView: Adapt to new plugin setup pattern
Change-Id: Ieb97736ceb462baf6d97dc39cc4bd08854477a92
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-06 14:28:27 +00:00
Tobias Hunger
79a43b4d86 SettingsAccessor: Unify handling of different file locations
Unify the code calculating the different file locations used by the
SettingsAccessor.

Change-Id: I85283f99618143ce1fbdd309bce12529cec442ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-06 13:43:35 +00:00
Tobias Hunger
4f65d9a1fb CustomToolChain: Add placeholdertext to explain expected format
Add a placeholder text to explain the expected format of predefined
macros.

Change-Id: I2852df6802dba9607466e5488b0225ef08a1e142
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-02-06 13:42:10 +00:00
Tobias Hunger
e109b8c1e2 CustomToolChain: Read data from toolchain after setting it
Re-read the data from the toolchain after applying it. This makes it
more obvious what e.g. the macro parser did with the input.

Change-Id: I5518c55c66be84dcdc3b1fa8482e04279768e3eb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-06 13:41:35 +00:00
Tobias Hunger
068f993db2 CustomToolChain: Fix expected format for predefined macros
The documentation says predefined macros for custom toolchains are to
be in "KEY=VALUE" format, while the code got accidentally changed to
only accept "#define KEY VALUE" instead.

Task-number: QTCREATORBUG-19714
Change-Id: I073e5b27f6fd5cead25a6406ae1f7cb19a7a03a7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-06 13:41:28 +00:00
hjk
e20152017c Welcome: Remove one unneeded usage of global object pool
Change-Id: Iaf94a26eb49c49648ac89f7e463b8849e86cba9e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-06 13:01:58 +00:00
Leena Miettinen
d79c22cd9b Qt Quick Designer: Fix typo and caps in UI text
Change-Id: I759d7ceb319bb9b328a093118a9b5182d01dc6d7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-02-06 12:03:01 +00:00
Thomas Hartmann
b405f81ada NewDialog: Hide empty categories
Empty categories are not shown anymore.
The new QSortFilterProxyModel also allows to eventually
add a string filter to the wizards.

Change-Id: Iddbc9c635608aac1310cf0a08bc4f4718d8b5863
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-06 12:00:26 +00:00
hjk
713b8636ea Vcs/Text search: Remove a few addAutoReleaseObject uses
Using a QObject parent suffices here.

Change-Id: I4dc5448511d55bf14fbd8f810e91336a49e94094
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-02-06 11:58:15 +00:00
Leena Miettinen
99223ebfef QML debugging: Fix UI text punctuation
Change-Id: Id4d06b8d083f224a58299c134e2feeffedd72e9f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-02-06 11:41:56 +00:00
Antonio Di Monaco
e8a8003b16 Debugger: Fix wrong GDB version detection for SLES
GDB version on SLES is reported as

GNU gdb (GDB; SUSE Linux Enterprise XX) Y.Z.W

So, the content between parentheses must be skipped, otherwise
the wrong digits are parsed.

Change-Id: I05eb1373bc6558dfe088c1328142ff21d48f5591
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-02-06 10:56:49 +00:00
Ivan Donchevskii
e7792f8f50 Clang: Query extra document annotations after resume
Resume job sends only basic tokens data therefore
one more UpdateExtraDocumentAnnotations job is required.

Change-Id: I6d5e65f22d26cf9c905c894654ff87f920659d8f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-02-06 10:42:39 +00:00
Eike Ziller
3f87c4685e Fix crash in timeout of JavaScript locator filter
The timeout code may not access thread local state, because if it fires
on the main thread after the thread already finished, that state is
gone.

Change-Id: I3b9b432515ff6f0c46c46b1904bdd622a19960d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-06 09:16:46 +00:00
Mitch Curtis
baceadc0fb Position environment variables at the top of the environment widget
This ensures that the user doesn't have to scroll down when they've
added a new environment variable and are editing its value; they'll
be able to see its value as they're typing it.

This improves the situation for most cases, but variables whose names
start with letters later in the alphabet cause them fall within the
"end" of the view's range, making it impossible to position them at
the top of the view.

Task-number: QTCREATORBUG-19715
Change-Id: I1f4b5bd311fa2a45770676ba2af3e254ae936f06
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-06 09:06:50 +00:00
Tobias Hunger
e1409ae50f IRunConfiguration: Remove BuildTargetInfo from the RC factory APIs
Change-Id: I1d77d22a1c1ce1cbcfca8af7855ae7b935ac1c2c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-02-06 09:01:32 +00:00
hjk
796da44fee BaseTreeView: Also pass background single clicks to models
Now that they are no longer used for column resizing the models
might actually assign some custom functionality.

Change-Id: I04d24641f555de0478c9803b4bfde70779747abf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-06 08:47:11 +00:00
Orgad Shaneh
6ca1d2bfa4 Locator: Do not remove uninitialized object
Change-Id: Iaf273fcdcb57bec123a706ed83bf621576725878
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-06 08:11:16 +00:00
Leena Miettinen
9514e07caa Utils: Fix UI text
Change-Id: Iae4302f2866abde5a9771ca4c7fc25dedb6dc0b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-06 08:09:14 +00:00
Eike Ziller
608a5ff89a ModelEditor: Add the zoom actions to tool bar
And remove the Tools > Model Editor menu, which is no longer needed.

Change-Id: Ib5b4a3a63408e69a2a65ffb87864db2f3ceef367
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-06 08:07:39 +00:00
Eike Ziller
e8dbc16814 ModelEditor: Simplify creation of commands and tool buttons
Change-Id: I569d2894edb791be2393e6cb7a1878e88b373797
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-06 08:07:31 +00:00