Commit Graph

201 Commits

Author SHA1 Message Date
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
hjk
6164378372 ProjectExplorer: Replace a few foreach()
Change-Id: I445cdfaac13ac894be3cd6fc8c20b4a09f460a01
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-03-02 11:54:00 +00:00
hjk
df7400b686 ProjectExplorer: Disentangle ProjectExplorer::updateRunActions
This enforces a linear pass through

  [static] ProjectExplorerPlugin::updateRunActions
  ProjectExplorerPluginPrivate::doUpdateRunAction
  [emit] ProjectExplorerPluginPrivate::runActionsUpdated

instead of the previous direct emission of the signal from
user code and connecting also the internal update to it.

This is meant to simplify reasoning about execution order and
maybe to help elimimating double executation.

Change-Id: Id8cc41a46d9dec06afb5514855f2ae80560f3695
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-26 14:32:58 +00:00
Kai Koehne
fda9955df0 Globally disable WindowContextHelpButtonHint
Do set the global application flag AA_DisableWindowContextHelpButton
to avoid having to unset the default WindowContextHelpButtonHint
in every single dialog.

AA_DisableWindowContextHelpButton was added in Qt 5.10.

Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-25 13:26:44 +00:00
hjk
c8137bdcf9 ProjectExplorer: Consolidate some Session::active* accesses
Change-Id: I47b0f6c2c60b2f7c86b6ffd1ad3df393d1321c8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-29 08:39:07 +00:00
Hannes Domani
286366b13f Valgrind: Implement multiple setting profiles for heob
Task-number: QTCREATORBUG-23209
Change-Id: Ic6371e2a71f2caac56e274a9403e1220e2d15812
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-26 11:17:43 +00:00
hjk
5795dc24c7 Valgrind: Minor code simplification
Change-Id: I64b218d76f4c65686a346bf884ceb8323b62f9f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-25 09:39:21 +00:00
hjk
758986ea0e ProjectExplorer: Store some aspect data by value in the RunControl
Change-Id: Idb7e119b5b0b483ce91efeb21fb415b654cfed4f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-05 13:45:25 +00:00
hjk
f9c221eb54 ProjectExplorer: Re-work setup runworker factories
This combines two of the previous three paths to create run workers,
and refers to RunConfigurations by id, not by type where possible
to decrease coupling between the classes.

Only allow "type of run configuration" and "type of device"
as the only possible kind of restriction and require a uniform
RunWorker constructor signature.

Adapt user code to fit that pattern.

Change-Id: I5a6d49c9a144785fd0235d7586f244b56f67b366
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-09 12:34:42 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
Eike Ziller
10098b2508 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	CMakeLists.txt
	tests/unit/unittest/unittest.pro

Change-Id: I64296ad31502d9b35012da129a28e9277e9fcf8e
2019-06-28 12:50:03 +02:00
Eike Ziller
33d49ec072 Fix lupdate issues
Change-Id: I0a7cc0650b6427d56b4415b2fff6cf39e29c96f9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-27 06:59:31 +00:00
Christian Stenger
33fde35c19 Valgrind: Fix compile on Windows
Change-Id: Ic986f43a48cf63c42f8b8825360034c930c5c3a5
Reviewed-by: hjk <hjk@qt.io>
2019-06-24 08:10:39 +00:00
hjk
1396c6e8e9 ProjectExplorer: Use Utils::FileName for Runnable::executable
Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-21 10:32:31 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
David Schulz
988fe7384e Fix build after 741950a3aa
Change-Id: I0647c07161935a785ba15efd23a81f2f5bfb8b28
Reviewed-by: hjk <hjk@qt.io>
2019-03-26 08:13:05 +00:00
hjk
741950a3aa Valgrind: Restructure plugin setup
Bring it more in line with the standard pattern.

Plus some cosmetics.

Change-Id: I2297c4e72892db386c50ece7dc64bdc89f0d9010
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-25 15:00:01 +00:00
hjk
68a10d71e7 ProjectExplorer: Replace RunControl::producer
... by two more specialized canRun() / createMainWorker() functions
resulting in somewhat leaner code on the user side and paving the
way for introducing a RunWorkerFactory class intended to follow the
now-canonical way of having factories as members in the plugin pimpl.

Change-Id: Id6fc2043a340203f14ab0b896a8dfa1e298f58a6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-20 09:16:08 +00:00
hjk
7b15dc35eb Valgrind: Compile fix with Heob
Change-Id: I4d58280a13643f0afff5a9ed2b0aae7bc40e551b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-03-14 06:37:54 +00:00
hjk
efb7d8deb7 ProjectExplorer: Split RunControl constructor
Into a trivial bit and two setters. Plan is to use it only with information
that is truly there (e.g. kit/device only) at the user side without having
to invent a RunConfiguration "handle".

Also remove some dead code in the test runner.

Change-Id: I987881e41722178b14b91f973b84cbdb67a9f85e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 16:38:45 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
Alessandro Portale
f5974ad993 Fix warning: "Don't call QVector::first() on temporary QList/QVector"
[-Wclazy-detaching-temporary]

Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0
Reviewed-by: hjk <hjk@qt.io>
2019-01-28 11:03:39 +00:00
David Schulz
1562674a06 fix compile after 0345bcb7cc
Change-Id: Ib51fb7f8b4a2229609fd76d482a4afb753681883
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-01-25 09:49:02 +00:00
Christian Kandeler
d7178b88c4 SSH: Use OpenSSH tools
... instead of our own SSH library.

Advantages:
    - Full compatibility with OpenSSH behavior guaranteed.
    - Minimal maintenance effort.
    - Less code to build.
    - Big chunk of 3rd party sources can be removed from our repository.

One the downside, Windows users now need to install OpenSSH for
RemoteLinux support. Hoewever, people doing embedded development
probably have it installed anyway.

[ChangeLog] Switched SSH backend to OpenSSH

Fixes: QTCREATORBUG-15744
Fixes: QTCREATORBUG-15807
Fixes: QTCREATORBUG-19306
Fixes: QTCREATORBUG-20210
Change-Id: Ifcfefdd39401e45ba1f4aca35d2c5bf7046c7aab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-12-13 15:10:11 +00:00
Alessandro Portale
00ec6dfb5d Valgrind: Modernize
modernize-*

Change-Id: I6db60dce78cf2575e36caa597b1f095adba34fd9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-12-10 18:54:02 +00:00
Orgad Shaneh
2c212d48a5 Valgrind: Strip QLatin1*
Change-Id: If93ca890ab6d023ab786a5153f50a1dfa03764de
Reviewed-by: hjk <hjk@qt.io>
2018-12-03 09:45:47 +00:00
Eike Ziller
e28eb85e8a Merge remote-tracking branch 'origin/4.7' into 4.8
Change-Id: Iaae859601ae4f529c1fa7ada3a5c569820abb0d6
2018-09-26 09:38:33 +02:00
Hannes Domani
8768e39d3c Valgrind: Add target executable suffix to heob command line
The suffix is needed in case the executable name contains a dot,
because then the .exe suffix is not added automatically by
CreateProcess().

Change-Id: Ief2cfeaa8dd8ebbfb71f69575ee9574a4f2156d3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-25 14:58:16 +00:00
hjk
d421bc2fe3 ProjectExplorer: Split IRunConfigurationAspect
... into items that can be used generically in project configurations
(ProjectConfigurationAspect) and items that have a choice between
global and project settings (GlobalOrProjectAspect)

Change-Id: I94831237bdbb18c339eb76eba131bf7f928933d6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-09-18 06:13:21 +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
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
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
3b5ecac238 Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.

The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.

Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.

Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.

The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.

There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.

The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.

There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.

Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-08-17 12:35:15 +00:00
Eike Ziller
db9837fa6c Merge remote-tracking branch 'origin/4.7'
Conflicts:
	src/plugins/clangtools/clangtoolruncontrol.cpp
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: Ib1e8abf066898b50c90fc1ccba4697fe983e8a8f
2018-08-15 13:53:28 +02:00
Hannes Domani
5a3a432396 Valgrind: Fix heob check if executable exists
Task-number: QTCREATORBUG-20938
Change-Id: Id1c3cbf610b97a13209e6a767c5e881e9be18ac7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-14 10:03:07 +00:00
hjk
1567679b81 Debugger: Tighten Perspective interface
Pass id in constructor, so it can be const.

Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-13 08:42:52 +00:00
hjk
f45f1a8cef Debugger: Make perspective toolbar items part of the perspective
This simplifies the toolbar setup and removes the need for the
stack of toolbar widgets.

The actions themselves have been owned by the plugin already,
so nothing changed in this respect.

Change-Id: I44754e16c8fc2acc53633dd9d560b1e732eece27
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-06 11:12:44 +00:00
hjk
e9eb1a6437 Debugger/Perspectives: Go back to QPointer<QObject>
Lifetime of the pointed-to object may end before that of
the plugin, so unique_ptr is the wrong choice.

This amends 01f2b982a2.

Change-Id: I76b9ac78348d2ae1e7eff0693b091dbe8475ab93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-02 08:56:20 +00:00
hjk
01f2b982a2 Debugger: Move ownership of perspective dock widgets to plugins
Similar to the previous patch, but affecting more plugins: with dynamic
perspectives lifetime is better managed close to the code that knows how
to (re-)construct the items.

Change-Id: I0e7bfcf769d198ec2afa88b972be900baa1b6a46
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-01 11:27:21 +00:00
Orgad Shaneh
1958c2129e Revert "Windows: Match the name case of included files"
It breaks cross-compilation on linux/mingw.

This reverts commit 1c014ed3d9.

Change-Id: I3e8183ec318541a4393ad242eefbdeaa78b7be44
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-07-19 05:44:06 +00:00
Alessandro Portale
1c014ed3d9 Windows: Match the name case of included files
Although Windows is case insensitive, and lower case always works, Clang
complains:

Lexical or Preprocessor Issue: warning: non-portable path to file
'<FooBar.h>'; specified path differs in case from file name on disk

Change-Id: I8f94e9fb62f6afec8aa6b9d08a7c78f6ba8a4435
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-07-12 20:12:30 +00:00
Eike Ziller
3bbe535b95 Merge remote-tracking branch 'origin/4.7'
Change-Id: I3c5d7e9e8c589ad4425cd89d61e1f572f5cb7997
2018-06-19 10:03:28 +02:00
Christian Stenger
b870f01d11 Valgrind: Heob: Make heob support translatable
Task-number: QTCREATORBUG-19830
Change-Id: I0c9799d9b3f8b56d96e78bf48fe32b9a3c4591eb
Reviewed-by: hjk <hjk@qt.io>
2018-06-14 06:30:01 +00:00
hjk
07079a1613 Valgrind: Use the majority way to register run workers
Change-Id: I6423620a9a1917ab09b93038b020c36e9208b728
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-04 11:51:43 +00:00
hjk
36b835ff0a Finish merging Runnable and StandardRunnable
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.

Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-23 08:48:36 +00:00
Eike Ziller
4749a919a6 Merge remote-tracking branch 'origin/4.6'
Change-Id: I9927fdff4c7e73c703757852a3f3cf79444e3cb6
2018-05-02 15:22:16 +02:00
Christian Stenger
bb6eae5c3b Heob: Fix compiler warnings
Fix warnings regarding initializing order.

Change-Id: Iea220be1fcca47262ebf43d0cfe069ca0bfc1df5
Reviewed-by: hjk <hjk@qt.io>
2018-04-30 12:55:39 +00:00
hjk
065e644d92 Heob: Compile fix for MinGW
Task-number: QTCREATORBUG-20347
Change-Id: I13d0e4cae19a1623113f113dc6fe7e245d54be8c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-04-30 12:10:55 +00:00
Alessandro Portale
cebb667023 Valgrind: Use OPENFILE_TOOLBAR in toolbars
Change-Id: Ib154f6352006b827b771d033eddc939ac4dc6dfe
Reviewed-by: hjk <hjk@qt.io>
2018-02-13 10:55:04 +00:00