Commit Graph

55184 Commits

Author SHA1 Message Date
Ivan Donchevskii
3fa8db13e9 ClangStaticAnalyzer: Rename plugin to ClangTools
ClangStaticAnalyzer is only one of the tools that
we can use and it will stay inside ClangTools plugin.

Change-Id: I74278e3fd12b792ab127d352db05d856c964968c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-03-26 06:18:12 +00:00
Arnold Dumas
66548fdb76 Icons: Remove transition helper
Change-Id: Iff8b3d50cc212ec5f40b494e455e36909fee0c80
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-23 18:01:34 +00:00
hjk
41a8e410be iOS: Fix compilation before it breaks
Make #includes self-contained, anticipating breakage in the upcoming
removal of projectexplorer/runconfiguration.h in qmakeproject.h

Change-Id: I7e7bc6224cde3f350d1880a97953e0e94ac5a80a
Reviewed-by: hjk <hjk@qt.io>
2018-03-23 15:16:59 +00:00
Tobias Hunger
adb169149c GenericProject: Fix adding several makesteps
Fix adding several makesteps to generic projects again. The problem used
to be that the constructor called by "Step" set a buildTarget of "" via
the delegation to GenericMakeStep's constructor and then added "all"
explicitly. So it was attempting to build two targets, with the empty
target being a syntax error.

Task-number: QTCREATORBUG-20108
Change-Id: I7382a1fa8b8b5869e6be11367e27d6a786f6aa74
Reviewed-by: hjk <hjk@qt.io>
2018-03-23 15:09:09 +00:00
Ivan Donchevskii
99bd0ed2a4 Clang: Rebuild overview model tree when token data is updated
In release builds overview model tree is built earlier
then the job with token information is completed.

Change-Id: I1a563551e813996001fb97924ac441e2b7d599b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-23 14:15:45 +00:00
hjk
d66e8b6ea0 Debugger: Remove some spurious '.report' content from dumper output
No real damage, the parser on the Creator side is apparently robust
enough. Still no need to add this.

Change-Id: I8329a55c44f866070fb3df48c3a22000ee33e848
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-23 13:03:35 +00:00
Tobias Hunger
cebc354484 CMake: Remove icon from QRC file
Change-Id: Idf0187858b7617d52f8d91b2b2d6febe1ea93bca
Reviewed-by: hjk <hjk@qt.io>
2018-03-23 11:00:41 +00:00
Tobias Hunger
38ed8495dd CMake: Move CMake project settings page into Build & Run
Change-Id: I51d482aa0187e4fc501d6c82f506c9874ffc6551
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-23 10:40:28 +00:00
Tobias Hunger
63f31a1e4b CMake: Make cmake build step available to all build step lists
"cmake --build ." is useful to build, clean and deploy, so offer it
everywhere.

This fixes soft asserts as a side effect when loading cmake projects with
existing "cmake --build . --target=clean" in their clean steps.

Change-Id: I39e5866f6012b9ea1153da324e4abd1cd25fea92
Reviewed-by: hjk <hjk@qt.io>
2018-03-23 10:40:18 +00:00
Tobias Hunger
9f21358cbe CMake: Remove code that is obsolete since QtC 3.7
Saved data has changed in QtCreator 3.7, remove compatibility code.

Change-Id: I27e1f163f905b5f8fd105f3cdeaf047777a1c06c
Reviewed-by: hjk <hjk@qt.io>
2018-03-23 10:40:12 +00:00
hjk
8e90ce7e01 PythonEditor: Simplify PythonRunConfigurationWidget
Use new wrapWidget() convenience function and don't use
members for locally used items.

Change-Id: Ia063501a124a56d0ade82dbc17d1087b11d4a88e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-23 08:34:30 +00:00
David Schulz
07870754b6 fix qbs build
broken by 190c5083b7

Change-Id: I28b509c91e3cc4e80c4dde1748bc92415929a46d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-22 14:09:54 +00:00
Marco Bubke
ceaaebdb36 Increment year in copyright template
Change-Id: I2f6a87a6c69ddb5425be2c7a82af23682769021b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-22 13:42:41 +00:00
Marco Bubke
53454b0f79 Clang: Use PCHs for indexing
As generating the AST is quite expensive it would be very useful to cache
the not changed include. So we generate PCHs for include outside of a
project part. With this change this PCHs are used by the indexer.

For that they are save to the symbol database by the PCH manager and when
fetched by the symbol indexer.

Change-Id: I7a5b07cfb32d72d50dc52d2b108cd41727a7bfc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-22 13:26:24 +00:00
hjk
401d6862b5 Debugger: Make CharArrays dumper test pass on linux
I need the #include <wchar.h> after a recent upgrade.

Change-Id: I59790d6c92b14f42df8b5ece7227c406f2810c8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-22 13:05:38 +00:00
Ivan Donchevskii
70f5e0e264 ProjectExplorer: Add kit environment flag to force MSVC English output
Enabled only on Windows.

Task-number: QTCREATORBUG-316
Change-Id: I69fb92f2eafa089b51e91390bc3099982465c246
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-22 12:29:15 +00:00
hjk
08ba8933c6 OutputPaneManager: Use a structure for related pieces
One vector with things handled together can be better
that keeping four vectors in sync.

Change-Id: I47865a5a2147a3795a3c820aa2676fb9611cab25
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-22 11:38:58 +00:00
Eike Ziller
c23d2b6e09 Increase requirement for building Qt Creator from Qt 5.6.2 to Qt 5.9
Qt 5.11 will be released and Qt 5.9 is the new LTS.
Increasing the requirement allows us to remove some baggage and
workarounds like Utils::asConst, special Q_OVERRIDE header, and
deployment target adaptions on macOS, and simplifies pulling in
proparser changes from Qt.

Change-Id: I9faf99336d26dd20bd63e6904ae543c0f351aa4d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-22 10:01:36 +00:00
hjk
798d115a5c Consolidate some run configuration widget boilerplate
This removes the outermost layer of widget-vbox and moves some
common code into a helper function.

The pattern repeats (with variations) a few more times, that's
left for later patches.

Change-Id: I8c98229cf41d03d5330c896ec9fa0965bfc65602
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-22 09:44:49 +00:00
Tobias Hunger
066376fdd0 Core: Fix warnings about writable constant Q_PROPERTIES
Change-Id: I556663a23af33e09fc141c019b76745a88852ca1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-22 09:39:38 +00:00
hjk
fe38c3eb2b Debugger: Remove the RebuildBreakpointModel command flags
This was useful to trigger collective attemptBreakpointSync() in the gdb
engine when gdb did not yet track pending breakpoints by itself.

That's not needed anymore.

Change-Id: I8afd2955070504c6bd6ae6c028b3f006b6eb4d7c
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-22 09:05:35 +00:00
hjk
a8a23110bf Debugger: Fix enum dumper
Make the hex display work with LLDB, fix GDB and LLDB test.

Change-Id: I529b5cdc908dbcba7270bc4574fa59a012fcacad
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-22 08:45:57 +00:00
hjk
f88dc5fd58 BareMetal: Use now-standard WorkingDirectoryAspect
Simplifies run configuration implementation.

Change-Id: Ia5a2f01de70ed8a54b26c4288ee3e2b375c2c59c
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-22 08:45:49 +00:00
hjk
6d8eaad281 BareMetal: Fix run configuration display name setup
Change-Id: I0ba784a4d775730277ec0b21aef649011f37b739
Reviewed-by: Alexander Drozdov <adrozdoff@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-22 08:45:43 +00:00
Eike Ziller
5e6305f346 TextEditor: Fix default context menu
Text editor implementations that did not do anything special with
invoking their context menu, including our plain text editor, only had
Qt's default context menu, without Qt Creator's clipboard history and
BOM actions.

Make the default actions in our custom context menu more similar to Qt's
default actions by adding Undo, Redo and Select All, and not hiding
disabled actions, and use that by default in all text editor
implementations.

Change-Id: Idd5fb276dcd652223d96536dacde8110f9eb576f
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-22 07:57:34 +00:00
Eike Ziller
deec3fc642 Be a bit more perl-like with regular expression replacements
Since we now use QRegularExpression and state Perl compatibility.

- & and \& expand to &
- $<number> exapands to capture group at position <number>
- $$ expands to $
- $& exapnds to whole match
- \<number> and $<number> expand to nothing if <number> is greater than
  number of capture groups

Task-number: QTCREATORBUG-9602
Task-number: QTCREATORBUG-15175
Change-Id: I17cea3239abaf130626f2bf224aabf0e9b1c6cef
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-22 07:56:39 +00:00
Razi Alavizadeh
437199acd8 Plugins: Re-categorize plugins which are in "Qt Creator" category
Category of DiffEditor, ImageViewer, Macros and UpdateInfo
  was removed, i.e., they were moved to "Utilities" category.

Category of other plugins that were in "Qt Creator" category,
  changed to "Core".

By this patch, forks of QtCreator don't need to change *.json.in files locally.

Change-Id: I243c6b1831c0b880d32b2118db71f0b281590b7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-20 15:31:49 +00:00
Razi Alavizadeh
d007471115 FilePropertiesDialog: Show mime-type and default editor
Added two new rows, Mime Type and Default Editor, to "File Properties" dialog.
File properties dialog is a good place to show these information.

Change-Id: I131b17a18679b1b94880b8f109fe166500ca34ef
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-03-20 15:16:47 +00:00
Eike Ziller
20d403d915 Restore extra editor windows when opening session
Task-number: QTCREATORBUG-13840
Change-Id: Idf87d0fd2d0b20f8239487a1c7bf31ea63456d42
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-20 14:43:45 +00:00
Marco Bubke
1f0562742e Clang: Add lastModified to the precompiled header
It is important to know then the PCH generation started, so we can compare
the header file time stamps against it.

Change-Id: Id8ee91e886c153d9d4a37cc0438c682f2098f7fa
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-20 14:04:00 +00:00
Ivan Donchevskii
f67df4f9ab Clang: Check that follow symbol QFuture is not cancelled
We can't take QFuture result if it's cancelled.

Change-Id: I493e083c0d35e753d1b2616caf2081f472393e34
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-20 12:58:14 +00:00
Eike Ziller
ddeb8df894 CustomExecutable: Improve tool tip on working directory
Do not set a base path on the path chooser. There shouldn't be a base
path since that effects the path chooser's expanded path, which is never
used for the working directory.

Task-number: QTCREATORBUG-13576
Change-Id: Ie7735dc726b442d97b2108e8d340d904c70aa5a6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-20 11:56:17 +00:00
Ulf Hermann
61598eca15 Utils: Watch file replacements with FileSystemWatcher
It's quite common for other programs to remove and re-add a file in
order to change it. QFileSystemWatcher does not track this, but silently
drops the file to be watched.

Add a directory watcher for each directory with files to be watched and
if that triggers, examine if one of the files we are watching in that
directory has been re-added. If so, generate a fileChanged() signal.

This still doesn't track replacements of directories. If we want to
track those, we could apply the same technique to directory watchers,
but we'd have to recursively watch directories down to the file system
root.

Change-Id: I8a70b76bb34502dcfac390ba90e715918d7a5b4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-03-20 11:42:19 +00:00
hjk
d332a1c322 Simplify DesktopQmakeRunConfiguration::updateTargetInformation() a bit
No need for looking up buildTargetInfo twice.

Change-Id: I730d7e827d9b5e81a2174ca763c3a89b24389742
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-20 11:23:22 +00:00
Eike Ziller
5acb6caa8a Search Results: Fix expand all button state at startup
It was enabled at startup even though it should only be enabled if
actual search results are shown.
Do not set the enabled state on the button, but on the local action
instead. The button has the Command's action as its default action, and
the state of that action can be overridden by the local action's state
at context change.

Change-Id: I045d022836b12375dc49d4ee0ffd4802d795db3b
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-20 11:03:22 +00:00
Ivan Donchevskii
5068f9ac36 Clang: Check that local renaming QFuture is not cancelled
We can't take QFuture result if it's cancelled.

Task-number: QTCREATORBUG-20008
Change-Id: I781746cf1d638627bb5992efa23d94111908f6d0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-03-20 10:38:26 +00:00
hjk
5d79e1dcee Drop QFileInfo::exists() check before trying to run an executable
Physical existence of a file is not strictly needed for something
being runnable, e.g. 'foo' can be used to start a process on windows,
even when only 'foo.exe', but not 'foo' itself exists.

On the other hand, the existence of the file is not sufficient either
to run it, so the check was too weak and too strict at the same time.

Change-Id: I4a41d2f5cbb0cb471023a8bc23628072b28a5984
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-20 10:14:50 +00:00
hjk
80f98a7fb9 Debugger: Make QList as movable
Apparently changed in qtbase dafa3618d23.

Task-number: QTCREATORBUG-19812
Change-Id: I70f543c71cc2147cbd5ab33a070e1a35049f46a8
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-20 07:13:12 +00:00
hjk
1bd4d97686 QmlDesigner: Fix compilation before it breaks
Make #includes self-contained, anticipating breakage in the upcoming
removal of projectexplorer/runconfiguration.h in qmakeproject.h

Change-Id: Ia166ccb3c830c3cc6f50181690ba281d4a705de8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-03-19 15:35:17 +00:00
hjk
7bb00c0526 WinRtRunConfigFactory: Use base method to list run configs
Change-Id: I444b676d522cea88f024d33d56ce407341c12274
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-19 13:47:01 +00:00
Ivan Donchevskii
08d1274ccc CppTools: Remove processEvents call from follow symbol
processEvents is a bad way of dealing with asynchronous
requests. Use QFutureWatcher for that purpose.

Change-Id: I3839cb9db80a6d391f6af1178e96986a325b7b99
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-03-19 13:37:46 +00:00
Ivan Donchevskii
d471006d81 ProjectExplorer: Create clang-cl toolchain also for C
clang-cl can build both C and C++.

Change-Id: I173b4e9e8f1726f328fd7af5782435566be5b932
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-19 13:37:26 +00:00
Ivan Donchevskii
63c48dea36 ProjectExplorer: Add support for clang-cl based on MSVC2017
Clang is compatible with MSVC2017 since 6.0 version.

Task-number: QTCREATORBUG-20087
Change-Id: I5403790c02a7dc04a58f30078fc7abac5755826e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-19 13:37:15 +00:00
Ivan Donchevskii
4d153b4f67 Clang: Add combobox with tidy configuration options
The old way was not flexible enough.
With these options it's possible to just use your
config file or set tidy command line yourself.

Change-Id: I1bace40986668dee5e1b30c9d03090a3fd22e253
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-03-19 13:19:00 +00:00
hjk
1e033d8a08 ProjectExplorer: Prevent crash on project closing
Introduced with e20d620043, currentProject will be null when
a project gets closed. The previous code path had access to a
locally cached and still valid pointer to the project that's
about to be closed.

Change-Id: I3260b4ed1ac325fc2be0e8bba934d7888b1d698c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-19 12:48:36 +00:00
Eike Ziller
7ba225cb79 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: Ifd9524b0155067faf9d8a90858cc5f7da6b651bf
2018-03-19 13:13:31 +01:00
Joerg Bornemann
cabbeb1c54 Synchronize autotest defines in qmake and qbs build
Do not remove QT_USE_FAST_OPERATOR_PLUS and QT_USE_FAST_CONCATENATION
in QtcAutotest, but in the two tests that won't build with it.

In the qmake build the defines are not removed from json.pro, because
this file does not include qttest.pri.

Change-Id: I97d173528ca2a02bac1bfae30709a959e6b69375
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-19 11:50:38 +00:00
Razi Alavizadeh
67e5eabc4a Nim: Fix typo
Fix a typo: Rename matchMultiLineCommendEnd() to matchMultiLineCommentEnd()

Change-Id: I2c1a5280c8abb05b9f76d0d8cce138d8a40ad014
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-19 09:29:36 +00:00
Thomas Hartmann
2407792d0d Use angle on Windows
Many OpenGL drivers are still very unstable and we see many issues.

Task-number: QTCREATORBUG-20067
Change-Id: Ifc1d5b2666f9cc69154032c3c4534cd96194110c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-19 08:27:25 +00:00
Tobias Hunger
62007d922c ProjectTree: Add missing registration of pre-existing projects
Register pre-existing projects when opening a new Project View. This
fixes missing parsing state on newly opened Project Views.

Task-number: QTCREATORBUG-20058
Change-Id: I47cd4791c1b8eac7717a7ce2b35d7f35bba5826a
Reviewed-by: hjk <hjk@qt.io>
2018-03-16 15:45:18 +00:00