Commit Graph

173 Commits

Author SHA1 Message Date
Andre Hartmann
48073b2990 IOutputPane: Refactor zoom function into base class
Try to make zoom and font handling in the panes more
similar and put common stuff into IOutputPane.

Change-Id: I59c38c5eecbf67b7ca6c9d84a6f61b1292a787df
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-04-16 14:20:22 +00:00
Andre Hartmann
49ac912dac AppOutputPane: Add history completer to filter line edit
Change-Id: I520f8b54b327488f9a16d13a8ff2f84d431a2930
Reviewed-by: Alessandro Ambrosano <alessandro.ambrosano@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-04-15 06:47:24 +00:00
Andre Hartmann
abb9fb68e2 AppOutputPane: Fix zoom and settings button order
07645527a3 changed the order of these buttons
from:

	zoomIn, zoomOut, settings

to:

	zoomIn, settings, zoomOut

Restore the old order hereby, which is consistent
with the compile output pane.

Change-Id: Ieaff434b596ce1992b4b454e40083df83fbe54fd
Reviewed-by: hjk <hjk@qt.io>
2019-04-09 06:54:36 +00:00
Alessandro Ambrosano
07645527a3 Add output filtering for Application Output pane
Task-number: QTCREATORBUG-16356
Change-Id: Ibf6cca1915ef56c50c01cd3c23e7798453506a05
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-04-08 07:56:36 +00:00
Christian Kandeler
14bffd2c88 ProjectExplorer: Add settings icon to app and compile output panes
This provides a natural shortcut to the respective options page.

Change-Id: I1e57c64d1541540cb1c0c44c6fb8eaad69fc2e32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-04-04 10:44:31 +00:00
Andre Hartmann
1e3653992e AppOutputPane: Switch to categorized logging
Change-Id: I349aee7cf507ec7e79e73b7e091f75d4607e790b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-03-19 09:15:52 +00:00
Andre Hartmann
84f91f255c AppOutputPane: Cleanup and modernize
* remove QLatin1*
* range-for
* sort includes

Change-Id: I58cde997f086186660c9db9644cbea07b6d69d91
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-03-18 17:04:00 +00:00
hjk
164ae1428e ProjectExplorer: Move RunControl related classes to separate file pair
Change-Id: I5da56f80336673d595907abcc797f628be680cd5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-13 14:44:46 +00:00
hjk
582f72f433 ProjectExplorer: Simplify RunControl::appendMessage
Use a signal directly now, the users know the caller.

Change-Id: Ib2ff4dbe3047eddf2a060eef060b487a4c17e78c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 12:27:20 +00:00
Christian Kandeler
0978901b73 ProjectExplorer: Introduce dedicated output settings pages
One page for application output, one for build output. The respective
settings are now easier to find, and the general Build & Run settings
page looks more tidy now. We will also be able to link directly to the
respective settings from some button in the output panes in the future.
As a side effect, this patch also introduces a dedicated "word-wrap
output" setting for the compile output pane. It used to share this
setting with the application output pane, which was not obvious and
might not be what the user wants.

Change-Id: I5629363863ffe38e0faa006d361ec21484b593f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-12 08:50:45 +00:00
Tim Jenssen
a78e3e5dd5 use initializer lists
Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 15:10:54 +00:00
Alessandro Portale
616e19ff9e Fix warning: "Missing emit keyword on signal call"
[-Wclazy-incorrect-emit]

Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-01-17 15:54:56 +00:00
Eike Ziller
70e5cab569 Core: Use restrictions on character count instead of line counts
Assume lines with an average of 100 characters for the transition
and use the character limit already in two cases.

Change-Id: I43316d51d7d5017aa413d6c910d3784a14237e9f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-26 13:08:37 +00:00
Alessandro Portale
8d19333075 ProjectExplorer: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default
modernize-use-transparent-functors

Change-Id: Iebed22caa2e733d292f334e956e3d16b844e14e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:01:53 +00:00
Eike Ziller
3bbe535b95 Merge remote-tracking branch 'origin/4.7'
Change-Id: I3c5d7e9e8c589ad4425cd89d61e1f572f5cb7997
2018-06-19 10:03:28 +02:00
Orgad Shaneh
fe525d2b86 AppOutputPane: Add timestamps to normal and error messages
Similar to BuildManager::addToOutputWindow.

This doesn't affect stdout/stderr output.

Change-Id: Iddee043aa46cc89860b4a2231fe075cb553b5ad3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-13 10:10:57 +00:00
hjk
772098c710 Inline RunControl::canReUseOutputPane into its only caller
Change-Id: I2e858ab3bf715b41c26cfb6246d470787d003e3c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-29 14:30:22 +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
Robert Loehning
91fadf03d0 ApplicationOutputPane: Add missing handling of runControl being nullptr
Change-Id: I8f7b5f90bfa7389df55b42910ba245ad78ef5bc6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-05 13:54:47 +00:00
Tobias Hunger
69e9f81bd8 ApplicationOutputPane: Handle runControl being nullptr
The runControl associated with a tab might become nullptr. That was
already handled in some places. Do so consistently now.

Change-Id: I899cc467a213f2a991967fa98a5819a98412d387
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-14 14:20:34 +00:00
Filipe Azevedo
eab3a24526 Avoid soft assert when closing an already stopped run control tab
Change-Id: I1d39d6450ab32a3d1e75c120b85362806bb2a60e
Reviewed-by: hjk <hjk@qt.io>
2017-10-16 07:54:14 +00:00
hjk
7f2cb9ead9 ProjectExplorer: Allow user stopping ill-behaved RunControl
If a RunWorker fails to report success or failure (should not happen in
theory, but has been observed in practice, typically in exceptional code
paths) the RunControl will stay in 'Starting' or 'Stopping' state
forever. Give the user the opportunity to force a 'Stopped' state by a
second (or when 'Running' a third) time on the Stop button.

Change-Id: Iec58434927777bd67bfe01c5144ee5695b4d6cf1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-09-13 13:40:02 +00:00
Nikita Baryshnikov
bd4428eb84 AppOutputPane: fix coverity warning
Change-Id: Ifcfb826c474bb38cf33cfb8a029e60288aa49053
Reviewed-by: hjk <hjk@qt.io>
2017-08-21 17:09:42 +00:00
hjk
a54cba428a ProjectExplorer: Fix crashes on shutdown
Ensure that RunControls ramp down asynchronously.

Since RunControls now ramp down asynchronously the plugin can
only report synchronous shut down if no RunControl/OutputPane
was present.

Task-number: QTCREATORBUG-18605
Change-Id: Ib8d1f857f85c74d4f18ecb85db537121a2275668
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-07-20 13:50:31 +00:00
hjk
cd5ba75505 ProjectExplorer: Use a real 'finishing' phase for RunControls
Instead of a blunt delete() RunControl::initiateFinish() is triggered
by the closing of the application output instead. The rampdown process
is basically the same as stop() now, except for the other success
signal (new finished()) and the final self-destruction of the
runcontrol.

stop() itself triggers initiateStop() on all running workers in
parallel (before it was in the order of start). This gives
downstream complex worker combinations the flexibility to use any
order it wants by ignoring stop() on 'uninteresting' workers,
and centralizing rampdown e.g. in the main worker. That setup should
be rare in practice, but seems needed in some profiler cases.

Change-Id: I986a152a663754206709ed4df0d4568847afad17
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-07-17 12:28:50 +00:00
hjk
0a2032e434 ProjectExplorer: Rename RunControl::finished to stopped
That's what it is.

Change-Id: I8cf9af23bb7cafe1cde8f165fdbf85cdeb79f7e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-12 10:06:34 +00:00
hjk
acc86aee5a ProjectExplorer: Move re-runnable decision to RunWorkers
A RunControl is re-runnable if all its workers are,
a RunWorker is re-runnable if it's Stopped and unless it
says otherwise.

Also ensure SimpleTargetRunner only reportStop() once
per run and make process error message re-usable.

Change-Id: I73f5fb724d3026ceb81d5e32a3a71b4814b2bca9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-10 09:02:17 +00:00
hjk
d857fa52f7 ProjectExplorer: Fix recent indeterministic state of stop button
The recent RunControl related changes have led to several regressions
in the fragile handling of button states in the output pane.

Take advantage of the new Starting phase to fix disabling of the
run and enabling of the stop button at reasonable times.

Change-Id: Iae191a840484dd08d61facf6b9f439bfafcbbcb0
Task-number: QTCREATORBUG-18508
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-07-05 14:17:13 +00:00
Orgad Shaneh
5f973de952 Merge remote-tracking branch 'origin/4.3'
Change-Id: Ib5405ed2c3356f65b49fe2f454f8ac2e0de44ef6
2017-06-26 08:24:26 +03:00
Tobias Hunger
29cf39bfd6 ProjectExplorer: Fix crash in AppOutputPane
The RunControl owns the Formatter set on the OutputWindow. Make
sure the OutputWindow is deleted before the RunControl and avoid
some useless setting of the Formatter.

Task-number: QTCREATORBUG-18428
Change-Id: I40c8f032bb04c484957a35a6bbc0fda7b6491c51
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-23 14:22:08 +00:00
Christian Kandeler
0652297f5a AppOutputPane: Do not reset the formatter after the RC has finished
Otherwise, clicking on links will have no effect. This feature was
broken with commit 113134b3b6.

Task-number: QTCREATORBUG-18134
Task-number: QTCREATORBUG-18334
Change-Id: I3cf5d8a9b3957a3f06cb3dbba40bb2dd16a9f8a9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-06-20 13:27:31 +00:00
hjk
89f02cba2c ProjectExplorer: Split Target and ToolRunners into smaller tasks
This increases re-usability of activities like 'port gathering',
and makes their use less dependent on actual device implementations.

Change-Id: I017cb74874f2b38c487ba2d03906a675d5618647
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-05-15 14:35:03 +00:00
Eike Ziller
6e8ee7479e Merge remote-tracking branch 'origin/4.3'
Conflicts:
	src/plugins/debugger/cdb/cdbengine.cpp

Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
2017-05-09 15:07:30 +02:00
Vikas Pachdha
3282f85f3d Update the application output tab's title
Output tab might be reused but title nevertheless be updated

Task-number: QTCREATORBUG-18109
Change-Id: I497fa3086e840131fbfcc81a5002da06ac70978f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-09 11:55:31 +00:00
hjk
54d49432f5 ProjectExplorer: Split RunControl states further
This adds enough hooks to enable the base RunControl to take over
the task of most of the current ad-hoc "state machine" implementations
in derived RunControls (only exception is "intra-debugger" Start/Stop
handling), including error reporting.

The idea is to migrate "downstream" uses and finally remove the custom
state handling everywhere.

With this setup here, both varieties of RunControls can co-exist
for a while: New-style uses the Tool/Target state handling triggered
by the base RunControl::start implementation, old-style had this
function = 0, so all have their custom start() implementation.

'SimpleRunControl' derived cases (Local/RemoteLinux/Python run)
already use new-style with this patch SimpleRunControl doesn't
re-implement start().

Change-Id: I508f5ed05c557ca7188af92f9d9c8d00e2a4acfe
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-30 12:11:05 +00:00
hjk
2360a2d743 ProjectExplorer: Run RunControl::{start,stop} always asynchronously
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>
2017-03-24 13:37:46 +00:00
Orgad Shaneh
4290081831 ProjectExplorer: Move consts that are used in a single file out of header
+ inline where used only once.

Change-Id: I08c60551afde1d36a2c8d5005c1ea7e52ba0515b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-20 10:11:09 +00:00
Tobias Hunger
7f49457e9d ProjectExplorer: Set a description for the "Stop" action
"Stop" in the Keyboard Setup Dialog is not really helpful. Say
"Stop Running Program" instead.

Change-Id: I23f590b6faf64a9a680295c3ccf77231b4f5cd21
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-02 13:18:44 +00:00
Tobias Hunger
113134b3b6 RunControl: Make sure to reset the outputformater
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>
2017-03-02 13:18:33 +00:00
BogDan Vatra
c6440c3a21 Add the needed infrastucture to enable application output filters
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>
2017-02-28 15:16:36 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
hjk
3e8a1ea7ad ProjectExplorer: Move ProcessHandle to Utils for further re-use
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>
2017-01-17 11:19:12 +00:00
Eike Ziller
39555d3b86 Projects mode: Make plus icon dark and get rid of branch indicators
The PLUS icon was actually PLUS_TOOLBAR, so name it that way and add an
actual PLUS icon.
Remove the drawing of the branch indicators from the kit tree view by
overriding the method that does it.

Change-Id: I395e5187c1738faaee3e122b4f3f359261b514d7
Reviewed-by: hjk <hjk@qt.io>
2016-09-21 10:02:22 +00:00
Nikita Baryshnikov
62a4e22fe7 AppOutputPane: check that index in range
this fixes regression introduced here
942d024bc6

Change-Id: Icc28341c87a5c390df91700530db434ce211725a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-08-10 16:31:27 +00:00
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Nikita Baryshnikov
395d0045bd OutputPanes code style fixes
Change-Id: I58c4fd1369dc2d6400416b0366b1d357a3308523
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-08-02 12:39:26 +00:00
hjk
08dc992aef Core: Use QList's initializer list contructor for output panes
More concise code.

Change-Id: I0c83a02de725648294e1b6b49669bdec0c47fafe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-11 07:39:13 +00:00
hjk
67f9a26208 Merge AnalyzerRunControl::logMessage and RunControl::appendMessage
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>
2016-05-20 10:52:26 +00:00
Eike Ziller
a3880c4916 Merge remote-tracking branch 'origin/4.0'
Change-Id: If0ba896a083392a532f76bb26bec3540a7c17667
2016-04-25 13:27:14 +02:00
Alessandro Portale
600693af2c Debug start Icon: Use the toolbar variant
I missed to change these in
5e32183c9b

Change-Id: I54740576f8a5b99d3c588f759b2337601b1e8dd5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-22 23:01:12 +00:00