Commit Graph

44349 Commits

Author SHA1 Message Date
Eike Ziller
e693c9a02e Fix issue with snippet variables not behaving correctly on Gnome
Directly after triggering the snippet completion, a funny input method
event is sent that doesn't contain any data. This still results in a
even more funny contentsChanged signal from QPlainTextEdit which made
our text editor think that the document has changed somewhere else. In
which case we close the snippet variable input.
So ignore funny input method events.

Task-number: QTCREATORBUG-19571
Change-Id: I3958e8736b1b3e3dea5225356ee4cd173d6beaa0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-05 09:49:20 +00:00
Tobias Hunger
bbe7bac2bd SettingsAccessor: Fix logic to decide when to do a backup
This fixes spurious *.user.-1 files from popping up.

Change-Id: Ia78b99e7c535c085d85673cb310f0806ec4b4fee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-05 09:23:58 +00:00
David Schulz
3c4e723b9f CodeAssist: move destroy context condition to function
Increasing readability by moving complex construct into own function.

Change-Id: I4cad1a279293e3348f550e7c423d356d9c79769f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-05 08:35:02 +00:00
Eike Ziller
124e4499eb Merge remote-tracking branch 'origin/4.6'
Change-Id: I421af2d62994436782dab6d37e97622bd055ed44
2018-03-05 09:28:34 +01:00
hjk
d162085377 ProjectExplorer: Use RunConfigCreationInfo struct for rc creation
The struct will likely gain qtcrunnanable/terminal members,
better pass all to where it is needed.

Change-Id: Ieb0dae8b56ce5c0992955dbfc0cd89cdd7bfe848
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-05 07:15:40 +00:00
hjk
6781217280 ProjectExplorer: Consolidate RunConfig creation codepaths
Move some code around to make interfaces slimmer.
Also no need to check canHandle() twice per creation.

Change-Id: I7c86e2dc78ebd53a0f8e9609e9fa135aaf31e7b7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-02 15:32:21 +00:00
Eike Ziller
994a68280e Merge remote-tracking branch 'origin/4.5' into 4.6
Change-Id: Iaf254ce5bc895c703aa6772b4aaa139e531696f6
2018-03-02 15:55:29 +01:00
hjk
7acdf911a2 Core: don't put OpenEditorsViewFactory into global pool
Not needed anymore.

Change-Id: Ia18e0a20d8a4477c7f6dff5b24d0d1d349759bf2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-02 12:36:19 +00:00
hjk
72585ef3f1 ExtensionSystem: Remove type based getObjects()
Since commit cc88302309, access to the
typed lists is cheaper via the local pools, and subsequently all users
of getObjects() have been adapted.

As getObjects() is unused now, and the local pool pattern is preferred,
having the function around is not needed anymore. If the provided
functionality would ever be needed, user code can use allObjects() and
manually filter.

Change-Id: I1e9d8fa11da2ed0e68090cce1a25a3dd62c1aef6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-02 12:36:10 +00:00
Eike Ziller
8673aae986 Allow plugins to specify a "revision" to show in addition to the version
To be used for the version control revision the plugin was built from.
Invent a QTC_PLUGIN_REVISION replacement string for the plugin .json.in
which can be set by the build process.

Task-number: QTCREATORBUG-19951
Change-Id: Id5fd64b5506383e0b7749bcfd34d178baf8fe7af
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-02 12:33:32 +00:00
Christian Kandeler
fec6bb6c2f Update qbs submodule
To HEAD of 1.11 branch.

Change-Id: I49142bd56c1d411948608a2b0f273b88524e4511
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-02 11:38:59 +00:00
Orgad Shaneh
e4c8d09449 Cover more 1.0 opacity cases
Task-number: QTCREATORBUG-19716
Change-Id: Ia9abed20ffd816c35f5aacc1d837b1ed81ec2b61
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-02 11:32:25 +00:00
Alessandro Portale
807c7c6380 utils: Let the link icon have a LINK and a LINK_TOOLBAR version
Change-Id: I910d491f7f5ac47c55c966f687b004c0e0793c5f
Change-Id: I910d491f7f5ac47c55c966f687b004c0e0793c5e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-02 10:32:47 +00:00
Eike Ziller
1314422cc2 Add another opacity effect workaround
Task-number: QTCREATORBUG-19716
Change-Id: I4ee9133bc66c5ee39516b30cca72f8a072868ac1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-02 09:54:21 +00:00
hjk
928dd20101 TextEditor: Do not put settings pages into global object pool
No need for it.

Change-Id: I401f8c2894c74f331311f0025df29972142739c9
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-02 09:14:26 +00:00
hjk
3ea4b0156c FakeVim: Experiment with hand-written signals
Change-Id: If76c68d3abb42240a279c15cf4b3d4b9e04460bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-03-02 09:07:33 +00:00
Christian Stenger
33f2c24049 CppTools: Fix builtin overview model
5e872c0fcd changed the base class to TreeModel which
needs to have TreeItem inserted to fully work as intended.

This patch makes the overview model work without running
into countless soft asserts when using the builtin code model.

Change-Id: I875529bef03ea2cd9a226b05410fd05e247eded1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
2018-03-02 09:05:21 +00:00
David Schulz
4523e57943 ProjectExplorer: save environment differences for msvc toolchains
Since correct async loading of the msvc toolchains has not increased the
performance significantly, save the environment differences for these
toolchains and load them on startup. Additionally run the vcvars bat at
start up and emit toolchain updated, if the environment modifications
have changed.

Change-Id: I709efc1fb92318dfa23d4a2f96a4d62acedbfe1a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-02 08:40:05 +00:00
Alexander Drozdov
64df51bae4 BareMetal: fix run configuration creation
Run configuration was broken by
53a151074a. Add configuratio menu shows
valid variants for targets, but after adding, target information lost
from the extraId info. As a result, impossible to run BareMetal targets.

Change-Id: I82991d62e2d308fdf333f20fe0338a121845b20e
Reviewed-by: hjk <hjk@qt.io>
2018-03-02 08:20:08 +00:00
Orgad Shaneh
891e618c5a Merge remote-tracking branch 'origin/4.6'
Change-Id: Ib8a52ad56c4d74542c5a4c283699f6afca2ed6ae
2018-03-02 10:03:29 +02:00
Andre Hartmann
a2edfda1ca Git: Extract BranchUtils for re-use in Branches Side Panel
Done-with: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Change-Id: I1f48ffb3d9bb9b8d743ab6891c472fcfab778cf6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-03-01 21:20:42 +00:00
Alessandro Portale
0db9df2806 Compile fix: Don't use Utils::FileName's private constructor
error: C2248: 'Utils::FileName::FileName': cannot access private member
declared in class 'Utils::FileName'

Change-Id: I0d7169170d4c360fce038c43c6572acc6760bddf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-01 20:26:17 +00:00
Eike Ziller
205c930592 Merge remote-tracking branch 'origin/4.6'
Change-Id: I63f8aebb201936f671b1486ff9420f67e5e3fafc
2018-03-01 15:46:37 +01:00
Eike Ziller
ec571d86fd Merge remote-tracking branch 'origin/4.5' into 4.6
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6a9838d60dd37d4762fa7a345febc3a59e9d8351
2018-03-01 15:44:34 +01:00
David Schulz
5e2ad9457f ClangCodeModel: Fix crash on git diff/show
currentEditorChanged is emitted also for none TextEditors, so
check the qobject casted TextDocument before accessing it.

Change-Id: I57080221bec34b879f21e022029524818ea92569
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-01 11:47:32 +00:00
David Schulz
35efebf6f8 Core: Do not use help engine of another thread
As documentation is now registered in another thread
accessing the help engine from the main thread may crash.

Task-number: QTCREATORBUG-19933
Change-Id: Id5e376c793156bf2d553c237cfb068b000c5afb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-01 11:40:40 +00:00
Christian Stenger
23781b3abc Debugger: Fix detection of gdb on older SUSE
Broke with e8a8003b16.

Change-Id: I0e9662bc8fb4115de0c63d07c82de78ef73004a5
Reviewed-by: hjk <hjk@qt.io>
2018-03-01 08:10:11 +00:00
Alessandro Portale
5915779e81 ProjectExplorer: Make the Options/Kits Category icon themable
Change-Id: I70c3fffd11b217937d6a85e88da1de688031b8e0
Reviewed-by: hjk <hjk@qt.io>
2018-02-28 18:36:00 +00:00
Christian Stenger
79e1a8a042 AutoTest: Correct enabled state of context menu items
Permanently enable (De)Select All and allow triggering a
rescan also if there is a build running.

Task-number: QTCREATORBUG-19940
Change-Id: Ia0e8a5da135c3c59aba4ab179ae2970c25d470f3
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-28 14:02:41 +00:00
hjk
8c2bac9359 Debugger: Do not create the console unnecessarily
Triggering console creation in the plugin destructor is not needed.

Change-Id: Ic21016e7a19fa08ea7dd03a8364aa6fc229bb2d1
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-28 13:56:21 +00:00
Christian Stenger
383d53ddbd AutoTest: Fix debugging tests
Some special characters need to get masked if passed
on the commandline.

Task-number: QTCREATORBUG-19943
Change-Id: Ib20ccb33ee9fbb50819d3386905df536c5193b3c
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-28 13:48:26 +00:00
David Schulz
4c629ed356 Core: initialize helpengine in async register thread
Task-number: QTCREATORBUG-19933
Change-Id: I97e7391e1c1ab7b58caa4796d557c9cc7f484005
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-28 13:43:27 +00:00
Orgad Shaneh
b9fcb30b9a ProjectExplorer: Fix crash on debugger stop
Blind shot.

Task-number: QTCREATORBUG-19946
Change-Id: I629efaad836cf35a7694bafd8d288a6752560c44
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-28 13:17:50 +00:00
Orgad Shaneh
bd6235a94f GenericHighlighter: Update definitions url
Change-Id: I0411354aa89f08bde65c96a71ebc2e5deae34eae
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-28 13:15:42 +00:00
David Schulz
a0cb9919f3 Highlighter: fix crash after context change
Context changes might delete rules. Make sure to not dereference
these deleted rules by:
- save needed rule information before context change
- untrack every rule in ProgressData that was deleted

Task-number: QTCREATORBUG-19916
Change-Id: Icdbb739c1030bf918dbbe6c3a540a7c8893ce5a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-28 12:55:00 +00:00
Christian Stenger
27723c361b Debugger: Avoid inconsistent state when killing LLDB
Avoid having a useless debugger if LLDB gets killed from outside QC.
Shut down the debugger engine instead.

Task-number: QTCREATORBUG-18723
Change-Id: I92f9b61c559ac43f1fc74af88861f35ca462f71f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-02-28 09:52:56 +00:00
Marco Benelli
2acb365dac qmljs: relax checks for qbs files
Types information for qbs is more limited that qml; this causes
qtcreator to raise false positives.  This patch relax the checks and
provide some type information needed by qbs files generated by the
wizards.

Task-number: QTCREATORBUG-19757
Change-Id: I07a1dd9d8fedaf4c5c751c2f00643f15ae39127a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-02-27 15:17:44 +00:00
David Schulz
9c091fedb1 TextEditor: comment smart pointer usage in proposal widget
Change-Id: I29fd72a99d55a9539d0319cb76bf616ec55abf9e
Reviewed-by: hjk <hjk@qt.io>
2018-02-27 12:33:10 +00:00
David Schulz
a4b5fc00a8 CodeAssist: use shared pointer to pass around proposal models
Task-number: QTCREATORBUG-17752
Change-Id: Ia41f169b86ead209830e6f15764062389ced2b67
Reviewed-by: hjk <hjk@qt.io>
2018-02-27 12:32:36 +00:00
Thomas Hartmann
0474216e2f QmlProject: Fix import paths for code model
This fixes a regression introduced by
30638df441.

Custom import paths have to be absolute for the code model.

Change-Id: I232229fa58c3900fe684ca4529b2ed08bf93e8be
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-02-26 13:31:23 +00:00
Tobias Hunger
4598a78980 Fix build with journald support
Change-Id: Ieaf0463903898823bade3e9eb73be0005ac7db47
Reviewed-by: hjk <hjk@qt.io>
2018-02-26 12:05:35 +00:00
Christian Stenger
e8e3ade858 Core: Fix build without Qt Help library
Change-Id: If8229ad96fbe1aeb327bb77dd14bb55ec52d608e
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-26 06:45:29 +00:00
David Schulz
451567c31d Msvc: Check if future was canceled before accessing the result
Change-Id: I3029d665f64dd144e1e4010f0856537e7fb218f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-26 06:27:37 +00:00
Pawel Rutka
4aced20a21 Implement support for project file open after AddFile action
Change-Id: I5f5372498a34760976cea5b7d6f5f49dd04558db
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 15:15:22 +00:00
Pawel Rutka
5ea157f0b8 Support AddFiles same way as QMake project
Change-Id: Ib1b5e9ba201623b48144766048d3b404ff016131
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 15:15:12 +00:00
Pawel Rutka
b9bdacb27a Support basic behavior for AddFile in CMake project
Change-Id: Ib9c764908abc7daa9a3c614b93da98bc4e674862
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 15:14:48 +00:00
Ivan Donchevskii
d0273f83f9 Clang: Fix unit-tests build for MSVC 2015
Change-Id: If81ad5d8ea704a2714d3088024d701202e9854f2
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-23 14:40:33 +00:00
Christian Stenger
39dd8ebc6e AutoTest: Adapt to changed handling of CppTools
b276de576f fixed an issue with
mixing handling/not handling of carriage return characters.
The AutoTest plugin uses similar functionality and relies on
the code model (and its snapshot / working copy).

Adapt the respective part here as well.

Task-number: QTCREATORBUG-19897
Change-Id: If9183bfa020a1c4c6efdc5dee404c1a1e0ce41a6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-23 13:59:56 +00:00
Christian Stenger
f60641f3d3 AutoTest: Fix wrong handling of gtest output
Task-number: QTCREATORBUG-19912
Change-Id: I23b47fb6ac2e54f0b9980da8c68c41d3ce7d9511
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-23 13:45:55 +00:00
Knud Dollereder
8235ed457c Move the nullptr check before the first access of the model
Change-Id: I2dc972379cac571aafedaa27cf659076d5e46126
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-02-23 13:37:44 +00:00