Commit Graph

54841 Commits

Author SHA1 Message Date
Marco Bubke
a8b11cb2c5 Clang: Improve access to caching structure
The clang file id is counted from zero, so it better to use a vector
instead of a hash with all the overhead.

Change-Id: Iaf201898e9e16005d196b5b49065f15f9d3d2dfa
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-27 14:45:41 +00:00
Marco Bubke
576eb3370c Clang: Use the clang indexer for indexing
It is not removing so much code but will makes somethings easier in the
future. We added the SymbolType::Definition too.

Change-Id: I4e106b8518e6bfed0c6a4aa6be61c4a5fe5f8bef
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-27 14:45:35 +00:00
Ivan Donchevskii
41a12410e6 Clang: Fix initial tidy settings tab
When no settings exist it has to be disabled.

Change-Id: I1cb8368edf182fa616930f5718323c8e03a0e649
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-03-27 13:54:06 +00:00
Joerg Bornemann
af939831f8 ClangSupport: Fix qbs build after incomplete refactoring
Remove files that are not supposed to be built anymore.
These were removed from the .pro file, but the .qbs file
picks them up, because it uses wildcards.

Change-Id: I457044147153baadcc223ff7e9d6b5497dd80fc0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-03-27 12:41:35 +00:00
hjk
3bce4b9af2 QmlProject: Use new helper function to create run configuration widgets
Change-Id: I471fe60d25bb3d8ca3ebf2d2abe8e725bc7daa56
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-03-27 12:33:51 +00:00
Ivan Donchevskii
c93e2815c7 AutoTests: Fix build after ClangStaticAnalyzer plugin rename
Change-Id: Ic34633f98e6c3c1b73389802429f3011e87b301e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-27 12:33:31 +00:00
hjk
116f7db28c iOS: Use base method to list run configurations
The base method is good enough nowadays.

Change-Id: I1affc678a2168d002ed8f627a56f172e30c1c0be
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-03-27 12:31:45 +00:00
hjk
40730a4eb2 Android: Use base method to list run configurations
The base method is good enough nowadays.

Change-Id: I8e7e9acbade239ff0dce4ac594b62d23cc5522cb
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-03-27 12:28:44 +00:00
Marco Bubke
d6df537ae2 Clang: Remove old CPP code
It was there to suppress warnings but this is now done with compiler
arguments.

Change-Id: I62edae9c115c09aa07601547159c04e038943a9b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-26 13:39:58 +00:00
Marco Bubke
9c4bfbe20a Clang: Improve interfaces
The interfaces should never used to handle ownership. So it is now using
protected destructors. Copy operations are forbidden too.

https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c35-a-base-class-destructor-should-be-either-public-and-virtual-or-protected-and-nonvirtual

Change-Id: Ib0b60a73a7ec130973b5cb0095cc5b2f10fa0758
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-26 13:39:36 +00:00
Eike Ziller
f1e02c0826 Fix that menus didn't show ampersands in files names
And instead interpreted the ampersand + following character as an
accelerator key.

Task-number: QTCREATORBUG-17817
Change-Id: I327239499ce56e75fd12f2df5be60d4b04913acd
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-26 12:02:15 +00:00
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
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
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
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
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