This is meant to be a base for tool-specific additions to the
target-specific RunControls providing a common base and convenience
interface for the various *{Debug,Analyze,*}Support classes.
Code in the current support classes in intended to be split
in bits suitable to be handled by the target run controls
and in target-independent bits in the pure tool implementation,
making the ToolRunSupport derived instances as slim as possible.
Change-Id: I2bc3f4ad246f6ea81b19458ee5a4392609e4fd2d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This introduces a mini-state-"machine" to handle RunControl states
Intialized->[Starting->Running->Stopping->Stopped->]*->Finished.
Needing time between trying to start and getting feedback is nowadays
the normal setup for all remote targets as well as for most local tools.
Making that the default for all runs simplifies the code and provides an
opportunity to (a) fix some currently wrong reports of "stopped
immediately" and (b) to remove target-specific (WinRT) or tool-specific
(Valgrind, GammaRay) state members doing essentially the same.
Change-Id: I7f52fee41144188ee8389e922fdc265f8c0a6459
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Currently still kind-of-two implementations due to the kind-of-two
current ApplicationLauncher message handling, but getting one step
closer to a unified implementation.
This also de-emphasizes the "wrong" QNX-IS-A-RemoteLinux relation
by removing the QnxRunControl inheritance of RemoteLinuxRunControl.
Change-Id: Iec8abaa53223a5a47ec51817b3994d37d444557a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Essentially a RunControl with and ApplicationLauncher member like it is
used directly or in disguise in the LocalApplicationRunControl, Nim and
Python. Extenting that to RemoteLinux/Qnx is possible, but left to the
next patch.
Change-Id: I91b3199d3d6a418fe4e5be7a5d61689c581a5121
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Make sure to reset the outputformater in the RunControl's Application
Output Tab when the runControl finishes.
Change-Id: I7014727580f56f3769f1308da53a1e37231fba22
Reviewed-by: David Schulz <david.schulz@qt.io>
No practical change as the only case that is used so far are local
setups on Mac. It's a conceptual change, though, giving concrete
RunControl implementation the chance to act "sensibly", e.g. by
raising a locally running simulator control in case of remote setups
or such.
Change-Id: I5679428934fe08b8c9756f3906ee3d9073278822
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Provide protected methods in RunControl to handle the notification
of when the RunControl starts and stops. Use these helpers to
move the isRunning() method into the RunConfiguration itself instead
of reimplementing it everywhere.
Change-Id: Ia8de42f7a6a14a049870d4e7fcb9af6756c2caa4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Currently will be used only by Android, but in the future can be
extended everywhere
Change-Id: I37314248f2d6dba2401e853b2a6ea4a36859f502
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Retrieve output from Journald more reliably.
Change-Id: Ic733698e7ed3717841a5a902c4f1e9e94d952885
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Make RunConfigurations provide %{CurrentRun:Env:VARNAME} via the
macro expander infrastructure.
Change-Id: Ibf2d9d507294f0bc9a51a1521884b364e0c7955d
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Also, use qint64 instead of quint64, as this is what Qt uses.
Keep 0 for invalid PIDs, even if arguably -1 would be better,
but Qt uses 0, too.
Don't move 'toString', instead inline it into the only
caller, keeping translations intact.
Task-number: QTCREATORBUG-17596
Change-Id: Ie9411ea1d2031a5ab0a99bcb3ff48ee430afe254
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This makes the code a bit simpler, at the cost of the factories not
having access to the fully specialized RunConfiguration anymore. This
is apparently never used and the factories can still use the Id to decide
what to do if they really need to.
Change-Id: I7d94f85e984ac87e62c6d341c1038e1538aa15df
Reviewed-by: hjk <hjk@qt.io>
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!
* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)
Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
The tools' ability to hook into processing of the output is
retained by making the function virtual.
Also remove the unusual overload of the RunControl::appendMessage
slot and the signal of the same name by renaming the signal.
Change-Id: If3c3cc2dd9c933169dc30b16e3165c9b3cf1440e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Somewhat better encapsulation.
Removes the "false" sharing of Concept implementations, and takes
the opportunity to change the operator==() into a 'canReUseOutputPane'
function to be explicit about its only use.
This doesn't solve the change in output pane reuse behavior yet,
but provides the base to put the required logic into canReUseOutputPane,
as opposed to abusing the general equality concept.
Change-Id: Id9e4e6b8601c5fcf40a252fb423c2c4c2b74ddb6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Similar variables don't contain "Configuration" in their names. For
example: CurrentBuild:Name.
+ make it available globally.
Change-Id: Ie094e2f7afc449d678cf0afec1548350f03ead77
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Some information on where the thing is running is needed, IDevice
seemms to be the common denominator.
Change-Id: If6528e0deb118cedf5ccd06f6830b4afd3153473
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
It is a fairly central exported class, no need to expose storage
details to user code.
Change-Id: Ibe199969450bc30b46ab7500e04a22300c492f2c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Sprinkle overrides over code derived from classes in ProjectExplorer
Change-Id: Ia4cc25649f7dc00b0ea126d8176a59afbc5ed574
Reviewed-by: hjk <hjk@theqtcompany.com>
The (target specific) RunConfiguationFactory can specify what it considers
a Runnable for the target. The (also target specific) RunControlFactory
can use that either unmodified or tweak it to set up a RunControl,
(and finally, target specific code runs it).
So this still keeps the target code in full control on what is passed
where, but reduces the need for boilerplate in the cases where
the produced and consumed Runnables are the same (or similar).
Change-Id: Ied59430462f4a45ad0006a99c1efd8b07cd181b2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
ProjectExplorer::RunControl::m_displayName exists, no need to
shadow it with Analyzer::AnalyzerRunControl::m_displayName
Change-Id: Iccbae658ca49c3fa2965a34a1bdf7c4a3bbd4073
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
A 'Runnable' contains (possibly target-specific) data to describe
something that could be run (e.g. a remote executable with
arguments, working directory and environment). A 'Connection'
contains (possibly target-specific) data to describe a connection
to target that will be used to run a Runnable.
Runnable and Connection objects are used in the target
RunControlFactories and are opaque to the project explorer.
Change-Id: I2293dffa71148646cfb52c9b582ccd2675b145a8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.
Icons are now listed in per-plugin *icons.h headers.
RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.
Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
On windows, users frequently get compile errors because the application
binaries/libraries are locked while the application is still running.
A good solution would require actually knowing which builds output files
that are used by the currently running applications, and would
distinguish
between locally running applications and remote applications.
This solution in this patch is far simpler, it offers a option to
stop all runcontrols or stop all runcontrols from the project, that the
user
wants to build. Those options don't take into account whether stopping
those applications is actually needed and is global.
Change-Id: I75b0b6c450898bb29c1e4f9c18c3199aeed696fe
Task-number: QTCREATORBUG-13188
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This provides a way for third-party plugins to implement run
modes without the need to add a value to the central enum or
using manual workarounds like RunMode(*(int*)&someUniqueObject).
Instead of centrally defined enum values this uses Core::Id that could
be defined anywhere.
Change-Id: Ic350e3d8dbb8042c61b2d4ffec993ca151f53099
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I1d05d48b23f44e3d589cc2a790803714786b57d2
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
BuildConfiguration asks Target,
Deploy and Run ask either activeBuild, or Target.
Change-Id: I3845cfbd16de7b85268d83b5324865ff24482152
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This was a regression introduced during the macro expander rework.
Task-number: QTCREATORBUG-13260
Change-Id: I9fd28c6a522faa11992931f937dd0b0eb779f419
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Nested event loops are dangerous and in this case lead to a crash.
So change the api of ensureConfigured to not use a nested event loop.
The CustomExecutableRunConfiguration then has to manage the dialog more
explicitly. Also this makes the dialog non modal, since it should then
cope with every situation.
Task-number: QTCREATORBUG-11416
Change-Id: I2af782915c148f8dff1b0df54fdb64aa83f684d2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>