Commit Graph

57165 Commits

Author SHA1 Message Date
hjk
0303b84fff Debugger: Fix switch from and to sub-perspectives
Change-Id: I17d3b7eb6416843b7a330da14528f0670cd88452
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-23 12:17:39 +00:00
hjk
763a1cfc06 Debugger: Simplify keeping track of perspective dock widgets
It's essentially a property of the dock widget, and we fully control it.
So store the information there.

Also, using QString as id saves a few conversions.

Change-Id: I9e1add60c8451127363aba67eec295001cc3425b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-23 12:17:14 +00:00
Robert Loehning
bba35ceff4 Squish: Remove remaining mentions of Squish hooking
Change-Id: If4fde6d47433b1c8e46c68c5b225004446214797
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-23 12:11:36 +00:00
Leena Miettinen
97c56225a7 Doc: Move topics in creator-editors.qdoc to individual files
To enable single-sourcing of the Qt Creator Manual and Qt Design
Studio Manual. No content changes were made in this patch.

Change-Id: I2bc1db22310bcef539d5961e728a565142c2e2d4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-23 11:24:44 +00:00
Leena Miettinen
2dba79df26 Doc: Use defines to show and hide info about Edit mode
Move the descriptions of sidebar views to
creator-sidebar-views.qdocinc to be able to include them
in the "Working in Edit Mode" topic in the Qt Design Studio
Manual.

Restructure the section and update the screenshot. A different
screenshot for the Qt Design Studio Manual will be added in
its doc sources.

Change-Id: Icd33c580c040ffefa5563fea723bd02e2d2ce520
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-23 10:53:19 +00:00
Leena Miettinen
9550f3ac95 Doc: Use defines in "Creating Components" to view and hide info
For single-sourcing Qt Creator Manual and Qt Design Studio Manual.

Change-Id: Ic771280121d56d11bcc8eccd7edbf0b4bc72eefb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-23 10:52:51 +00:00
hjk
e6e38df436 Debugger: Shift some perspective related API to the perspective class
Also, use QString uniformly for the (now rarely used) perspective ids.

Change-Id: I682062e7d179d0fcfd309e7714713bd1218bd8bb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-23 08:57:10 +00:00
Marco Bubke
aca14a36e9 Clang: Use only filePathId for comparison
The filePathId is already unique and the directoryId is there only to
improve the access time for the directory. So it is already strongly
ordered if we compare only filePathId.

Change-Id: I67255bea1d36d41a59421eeb51964440c053b1e3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-23 08:42:10 +00:00
Marco Bubke
d02d9b0f43 ClangRefactoring: Remove FileCache from SymbolStorage
It is not used.

Change-Id: Iaff5a34dfe613f0a627e0a3a727af1130ad2b522
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-23 08:11:29 +00:00
Marco Bubke
876d068011 UnitTests: Move printing functions to creator printing file
Change-Id: I09043347370d4fad623f8e803d4ef0f147fffa21
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-23 08:06:25 +00:00
Robert Loehning
fe8c8619c9 Squish: Update URLs to sources of Qt 4.8.7
Change-Id: I9dfc2df788be128ee82561d1974920c5924566e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-22 11:27:12 +00:00
Thomas Hartmann
957035155d QmlDesigner: Fix infinite loop if no prefix for id is provided
If the prefix was empty the id would never become valid.
Use "element" as a default prefix.

Task-number: QDS-204
Change-Id: I01e4afd1e0da7bcada69a0c621bbe483f4098b90
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-08-22 11:07:27 +00:00
Thomas Hartmann
336ea19b17 QmlDesigner: Update icons of Qt Quick Designer
Change-Id: I970da740c15505cae525fc3514a27c1bc12fe40f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-22 09:50:01 +00:00
Eike Ziller
18833bed24 Fix reload behavior of binary editor
It should silenty reload internally triggered changes and permission
changes.

Broke in 4e475fb5e6

Change-Id: I900adac72f51ea5e070c9c4efb59c09296526c42
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-22 06:40:36 +00:00
Eike Ziller
2486e61068 Fix handling of read-only editors when applying refactorings
If e.g. a ".ui" file is open, there is a read-only text editor widget
for the file, even though the file itself is writable.
The application of refactorings or global text-based replace should not
change the content of this read-only editor widget, but instead operate
directly on the file as if it wasn't open in Qt Creator at all.
It should also silently reload these files after modification on disk.

Task-number: QTCREATORBUG-19958
Change-Id: I409d5d03059be4c3520a1031ff0fbfa9feb675bb
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-22 06:40:01 +00:00
hjk
32d2a4c985 Shift perspective ownership to plugins
Change-Id: Id146ca771b4dc92f35cf156efbabae154f2d940f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-21 15:38:22 +00:00
Tobias Hunger
df4bfed60b ToolChain: Auto-detect Intel C compiler on Linux
Task-number: QTCREATORBUG-18302
Change-Id: I926daa208f121004b53a9618ec801d979cc33212
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-21 14:36:15 +00:00
Leena Miettinen
148d64dc89 Doc: Reorganize Qt Quick debugging information
QML-specific information about evaluating expressions at
runtime was already there, so linking to it instead of the
C++-specific info. Moved all information about the Debugger
Console to this topic, after the information related to the
Locals and Expressions views.

Hiding C++ and Qt version specific information.

Change-Id: Icf8798521218fca4ee6dea65b2e96ce685027a37
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-21 12:53:35 +00:00
Ivan Donchevskii
8c21a7a396 Clang: Fix local references for operator arguments
Workaround for wrong cursor annotated by Clang.

Use clang_getCursor in case of the variable used as
operator argument to get the proper cursor.

Task-number: QTCREATORBUG-20966
Change-Id: Idb195bffc2296f3fae27595cf9c43c9e6b2c5cd0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-21 10:41:30 +00:00
Ivan Donchevskii
8d0391a4f9 Clang: Treat brace initialization as constructor completion
Try to complete constructor after left brace with fallback
to normal completion.

Task-number: QTCREATORBUG-20957
Change-Id: I6c33790a3ee1e623a3d8abe9a44cfd821b6f3106
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-21 10:40:04 +00:00
Ivan Donchevskii
b8989f1a8a ProjectExplorer: Fix MSVC toolchain macros
Some defines about which we asked cl.exe are context
specific and do not make sense for the whole toolchain.

'__cplusplus' shouldn't come from MSVC but should rather
being figured out by code model based on -std=, MSVC
version and ms-compatibility version.

Task-number: QTCREATORBUG-20933
Change-Id: Ia31efc6a451753f6f6efae1abccd7f7a13ff44d9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-21 10:39:15 +00:00
Ulf Hermann
c98a390733 FileInProjectFinder: Use the cache also without project directory
As we add things to the cache, also without a project directory, there
is no reason why we wouldn't use the cache when looking them up.

Change-Id: I9f90cf7b88410513d2ebd0524e7d369fcb4db704
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-21 08:57:09 +00:00
Eike Ziller
7b6ea357f6 Avoid shortcuts with "Alt" on macOS
On macOS shortcuts with "Alt" are used for entering special
characters, where "special" depends on keyboard layout and can
mean e.g. '|' or '~'.

Task-number: QTCREATORBUG-20873
Change-Id: Ifa70b95381ef48d2ba3b15a528a5dcfe43d53bfd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:52:44 +00:00
Eike Ziller
d35638df56 Do not modify environment for user applications
We used to set QT_OPENGL, currently set LD_LIBRARY_PATH when qtcreator.sh
is used, and might set other variables in the future,
but these environment modifications should not be passed on
to user applications or when we run tools that are not shipped with
Qt Creator.

For LD_LIBRARY_PATH there already was a hack for
Environment::systemEnvironment.

For environment variables that we might set in main()
in the future, this patch caches the system environment for
Environment::systemEnvironment early before any modifications are made.

The previous hack for LD_LIBRARY_PATH no longer works, since it
used QCoreApplication::applicationDirPath() which cannot be used at that
point in time (before the QApplication has been created). Instead pass
the correct user LD_LIBRARY_PATH directly from qtcreator.sh to
Qt Creator through a command line option, which is cleaner anyhow.

Task-number: QTCREATORBUG-20808
Change-Id: I6674a5e0537e1b37fd7dcbff371b542fa24bce69
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:48:21 +00:00
Ivan Donchevskii
2c0554c187 ProjectExplorer: Fix memory leaks in tree models
Fix widgets being leaked by the ToolChainOptionsPage.
This page created widgets and stored them in the tree node
and never deleted them.

The fix is to put all the widgets into one QStackedWidget, so
that this will clean up once the page is destroyed.

Change-Id: Ic02824a4c52771d8962dc594176077c2e139fb84
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:25:51 +00:00
hjk
263cf4c608 ProjectExplorer: Remove RunWorker::setDisplayName
It has been an obsolete alias for setId for a while and downstream
uses have been adapted.

Change-Id: I467370aa67054599c7771e8275d28e62ddc461fa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:02:22 +00:00
hjk
98f3b961c6 Unify key names for various fields in stored RunConfigurations
This replaces various versions of the key name of the arguments,
working directory, use terminal and use dyld image suffix fields
by unified versions ("RunConfiguration.Arguments",
"RunConfiguration.WorkingDirectory", "RunConfiguration.UseTerminal",
"RunConfiguration.UseDyldImageSuffix").

The different names for the fields are technically not needed
(as proven by several cases that already now used the same key),
partially outdated ("Qt4ProjectManager.MaemoRunConfiguration.Arguments")
make RunConfiguration constructors less uniform and more complex
than needed.

The "RunConfiguration." prefix in the new names is not needed, but used
by several other settings, so having it there looks more uniform now.

In (the unexpected case) that different keys would ever be necessary,
the default key name could still be overridden by using setSettingsKey
from user code.

Change-Id: Ifb74ad74e0a9c724c8bf5e71e1bb2424d5d1831b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-08-21 08:00:46 +00:00
hjk
9f9c72302f Debugger: Streamline ThreadHandler
- Use the TreeItem/data pattern recently introduced with Breakpoints
  to remove the need of keeping track of id/object mapping. Opens
  possibility to have thread groups as intermediate level.
- Use the ThreadHandler directly as model for the thread combobox
  to remove the need of manual combo box updates.
- Move setting current thread from individual engines to central code.

Change-Id: I030e21a4aa5ab30b0efbc84528d9cecf29cbbe30
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-08-21 07:25:57 +00:00
hjk
7dcfe86c34 Debugger: Re-enable breakpoint property editing before debugger start
Amends 3b5ecac23.

Task-number: QTCREATORBUG-20970
Change-Id: I8206b16bc17a4d3830b8e517c7e952efabcf4609
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-21 06:29:51 +00:00
David Schulz
0c1191886a Debugger: fix initial value of operate by instruction for cdb
Change-Id: Ifad9fdd96175a304130b8f41f53c235c0260220d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-21 06:29:33 +00:00
hjk
6203fb5db1 Debugger: Make breakpoint property dialogs less dependent on engine
... so they can be reused for global/preset breakpoints later.

Change-Id: I34493f3b702605054c1ea227f56ed286eb77fcca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-21 06:13:13 +00:00
Marco Bubke
39e78bd3f6 Clang: Don't index already indexed symbols
We don't index system headers any more and introduce a first step to
decrease double indexing. For that we introduces the SourcesManager which
so far tells you only if a file was already indexed for a certain time
stamp.

Change-Id: Icde54465693ca84a622764c595635cac365c0111
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-20 13:16:52 +00:00
Marco Bubke
cc0db43c34 Clang: Extent sources manager with dependency
For many index cases such a function call it is needed to check if
any of the included files are changed because the function which is called
could be changed too.

Change-Id: Ibe0f43426c735d39072f284cad075dd4dc6f99c0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-20 13:16:19 +00:00
Orgad Shaneh
9ed36db854 Dumpers: Add a dumper for QPointer
It has an internal QWeakPointer<QObject>, which is not helpful. Cast to the
QPointer's template argument instead.

Change-Id: I9308c5eb9ea3867a682c4e4cba5d8041547981d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-08-20 12:47:17 +00:00
Christian Kandeler
2485eb1a8c QmlDesigner: Do not require a qmake project for designer import paths
Let's enable all build system plugins to provide this information.

Task-number: QTCREATORBUG-20810
Change-Id: I0ef953e3c2c9a2be1fc4187e93232e9a2aeacafd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-20 12:44:41 +00:00
Christian Kandeler
3336baad12 Fix references to the clang code model documentation file
Was forgotten in 7ab07a4e8f.

Change-Id: I2c6d21b79658e3946eb6ecdcf7b11992c0bf865e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-08-20 11:58:18 +00:00
Thomas Hartmann
028d4b54aa QmlDesigner: Always give root item id if state added
This is required to access the state.

Change-Id: I647edfd824760164b5e0a621c23ac6931c0ceec0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-20 11:43:52 +00:00
Thomas Hartmann
3b5b9ff53e QmlDesigner: Use model values for timeline
We do not really support bindings for those properties.

Change-Id: I55fd44900b8eb3f32340a637f6ac6014269716f8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-20 11:42:47 +00:00
hjk
6ab30dcef7 Debugger: Make qmlServer url again accessible in DebuggerRunTool
Currently needed by GammaRayIntegration.

Change-Id: I0915e4bf02bd9be3f1fe0342b9b9ce543811a9ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-20 11:40:18 +00:00
Tim Jenssen
6849690da9 remove common actions from toolbar
This removes paste, copy, cut, delete, undo and do action icons
from the toolbar to make space for more important icons.

Change-Id: I8b0db80521e0848c93d4eb9d20796a5376d7e08e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-08-20 11:38:37 +00:00
Alessandro Portale
e3d65fcf3f TextEditor: Ship generic Kate highlight definition for Python
Qt Creator comes with several Kate highlighter definition files.
With the release of Qt for Python and, soon, the possibility for
Python code completion via lsp, it seems appropriate to support
Python syntax highlighting by default.

Change-Id: If42c620d802920b54c508780b0d264343401b9a7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-08-20 10:43:41 +00:00
Ulf Hermann
4b57f6ac3d QmlProfiler: Don't save the run worker in LocalQmlProfilerSupport
We don't need it and will dangle when the RunControl drops its workers.

Change-Id: I93e872083a870ad860624509622c5d779e35dfd3
Reviewed-by: hjk <hjk@qt.io>
2018-08-20 10:32:56 +00:00
Ulf Hermann
5b2ac16011 QmlProfiler: Don't stop the RunControl from RunWorker dtor
The QmlProfilerRunner is owned by its RunControl. It will only be
destroyed from the RunControl's dtor and therefore we don't need to stop
the RunControl at that point.

Furthermore, accessing the RunControl there is dangerous because it is
partially destroyed already.

Change-Id: I006e053bb9cd0da23cedb8fedfc46e049b72517d
Reviewed-by: hjk <hjk@qt.io>
2018-08-20 10:32:49 +00:00
Ivan Donchevskii
81d5d99db8 ClangTools: Do not spam the warning pane with long messages
The user does not usually need the whole command line.

Task-number: QTCREATORBUG-20707
Change-Id: I30cd395cd85eb0a3dd19b9d5f1b34a1c7a4b95a5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-20 09:50:21 +00:00
Leena Miettinen
7ab07a4e8f Doc: Move files to enable single-sourcing
Create creator-only folders for topics that are to be excluded
from the Qt Design Studio Manual.

Change-Id: I6e212c6f1f2911fd02b135fe72e6379ef95c9eee
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-08-20 09:44:20 +00:00
Leena Miettinen
ee9745e3da Doc: Update info about Git
- Move all information about Git to the Git-specific topic
- Add missing information

Change-Id: I54bc19fd05ac100e8fbb03b3103754e8eb04fa01
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-08-20 09:36:51 +00:00
Robert Loehning
fc399d9bb7 QmlProfiler: Initialize members of ...Private class in own ctor
Change-Id: I70f897df83a413f322127905e6310c64d7ce9b81
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-20 09:30:28 +00:00
Robert Loehning
f8fb8767da QmlProfiler: Initialize pointer
Change-Id: I592ba7c058cc8665dfd5e010bb14e77fa9072619
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-20 09:30:15 +00:00
Ivan Donchevskii
3286b6a36d Clang: Reuse full type qualification from tooltips
Backported from master.

Use qualification helper function from clangtooltipinfocollector.h
instead of Unified Symbol Resolution (USR) not to deal
with special symbols used in USR.

Exception: handle anonymous namespaces
via USR because they don't have displayName.

Affects current document filter and symbol outline.

Task-number: QTCREATORBUG-20917
Change-Id: I97f8fbc8a9f380d220d85837568f56a1a217f035
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-20 09:12:22 +00:00
Ivan Donchevskii
8a0295c35d ClangRefactoring: Rename struct to class for Symbol
Deal with the forward declarations.

Change-Id: I428863a78e667f6458b0470531efc0e19793d01b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-08-20 09:11:59 +00:00