Commit Graph

363 Commits

Author SHA1 Message Date
Ulf Hermann
dfa8e27968 QmlProfiler: Check runConfiguration for 0 before accessing it
Change-Id: I274d7a75313a899a2b0c05fddbe8e189f9b99156
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-01 09:00:31 +00:00
hjk
931ee3382c Analyzer: Rework the dock widget layout generation
Decouple layout generation from widget generation and
separate analyzer action description from menu action creation.

Tool specific layouts are named "Perspective" now.

Change-Id: I774efe77a07640c4cc26e4e566662c8a673c8831
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-29 10:47:43 +00:00
hjk
aaf05f5acd Move analyzerbase to debugger
This is the first mechanical step to execute on the 'shared pool of
debugger/analyzer views' idea.

Future steps would be providing infrastructure for the view pool,
making all analyzer/debugger views use the pool and then re-extract
a sensible base for a 'analyzer-and/or-debugger' tool plugin interface.

Change-Id: I1bb392e6dd3084fc56937956bee1d6fd9530335d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-25 12:31:06 +00:00
hjk
249a36b573 Analyzer: Remove AnalyzerRunControl::runnable() and .connection()
These re-implementations are conceptually "too specific". Rather let
the indiviual tools handle there expectations themselves.

Change-Id: I0bbea407b2241816a40d19eb1dbb0a7589cbda7b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-01-29 09:39:47 +00:00
hjk
9ae2ce7629 ProjectExplorer: Drop LocalApplicationRunConfiguration
The functionality can be provided by producing a suitable Runnable
in the derived classes directly.

Change-Id: I7b8e8fe33fffd2b00176b6cf6633eca4e152e466
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-26 10:09:29 +00:00
Ulf Hermann
ed96957714 QmlProfiler: Fix logic in QmlProfilerTool::clientsDisconnected()
We want to do acquiringDone(), no matter if the app died or not.
Otherwise we wait forever for more data to arrive if the app has not
died.

Change-Id: Iad807ad75d7b8aba899211497586e5324124d16a
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-22 17:34:54 +00:00
Ulf Hermann
a1dd1e4c5b Add runConfiguration to remote tool starters
Most of them need a run configuration. It's better to pass the
right one than to use various hacky ways to work around it.

Change-Id: Ic21b0ef33bdd79b526b1e1a1ead5ca87d9f32c4d
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-22 17:26:17 +00:00
Ulf Hermann
434b51dca6 QmlProfiler: finalize setup when starting
Change-Id: If7cf8158bf4c0cd6a2ffff2d5157a98f2d8c0f50
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-01-21 09:05:52 +00:00
hjk
5dad96e3b7 QmlProfiler: Adapt QmlProfilerRunControlFactory to Analyzer changes
Change-Id: I8047cdb3fc65df2139c1a5770218c48e83ef5f5a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-20 16:08:07 +00:00
hjk
abe08966a4 Analyzer: Remove AnalyzerStartParameters from AnalyzerRunControl ctor
Change-Id: I0f7e982a9144469869e0c42daedfb411789511ca
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-20 11:06:50 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Ulf Hermann
42d570a3fe Rename Project::ExcludeGeneratedFiles
We want to distinguish between source files and generated files. So
let's call them by their names.

Change-Id: I324c4b82ca7fb7d8d0e175ea6c4f14f1306ec929
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-13 14:12:08 +00:00
hjk
8150209ff7 Analyzer: Slim down AnalyzerStartParameters
* SysRoot can always be determined from kit.
* Pass around RunMode as extra parameter
  not as part of AnalyzerStartParameters.
  That's closer to the pattern used elsewhere.
* Environment was always initialized from the runconfig's
  EnvironmentAspect. The tools can do that directly.
* Provide setter for display name for cases where
  it is not equal to RunConfiguration::displayName

Change-Id: I811a0d7cdeb55cc37a16a593b3942abb567a2150
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-07 18:11:09 +00:00
Ulf Hermann
e4efb9bb3b QmlProfiler: Retrieve common actions from ActionManager
This removes the need to pass the QmlProfilerTool instance to all views.
QmlProfilerTool is exported so that we can access the common actions
from plugins.

Change-Id: Ie7072c23ef35763b729f4b87acce47ecbdb76e43
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-01-06 14:28:20 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
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>
2015-11-25 12:30:52 +00:00
Ulf Hermann
ffc11d5e9e QmlProfiler: allow for multiple sequential traces to be aggregated
Task-number: QTCREATORBUG-13317
Change-Id: Ic7d1d5c94d8d522741b6c4207a21a43f521da5fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-19 12:16:44 +00:00
Ulf Hermann
7b4e253a1e QmlProfiler: Support local connections on Qt >= 5.6
This removes the need to receive messages from the application via
stderr. The "Connecting to socket" is still parsed, but only for
diagnostic purposes. If it doesn't arrive, the profiling will still
work.

Change-Id: I022691293da2a1e671ba1263bc76e4044bf1a5b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-19 11:33:20 +00:00
Ulf Hermann
b4e6591188 QmlProfiler: Convert connections to Qt5 style
Change-Id: I1a490add706cd0cfce3f243e4ebc32a8c9a975c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-11-02 10:12:42 +00:00
Eike Ziller
6d4135d8f0 Merge remote-tracking branch 'origin/3.6'
Change-Id: Iddfa0d2f3c0fb8ba65c0e5d479ad8e2f2cb95685
2015-10-26 10:55:50 +01:00
Alessandro Portale
b8bdc6f669 Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch replaces many of the existing toolbar icons
with recolorizable masks for better theming support.

Change-Id: I557aa485205fe2624f33724226f698c303342b40
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-10-23 16:04:52 +00:00
Ulf Hermann
5bc6bf03e1 QmlProfiler: Don't update the time display during state transitions
Previously, the display would show 0.0 while the profiler was waiting
for the application to send data. That is somewhat confusing.

Change-Id: I3ad85e5479c2cf3a65e6c4b411d959a5b15baae8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-20 16:15:32 +00:00
Ulf Hermann
bd22de47e7 QmlProfiler: Prevent interaction with buttons while loading data
You could trigger invalid states by pressing the recording button
while the profiler was waiting for data to be loaded from the
application or by pressing the "stop" button twice. Now the buttons
are disabled when they don't make any sense. In particular you cannot
clear, change features, filter the display while recording and you
cannot toggle the recording while loading. Pressing the "stop" button
twice will cancel the loading now, similar to what happens if you
first disable recording and then stop while the data is loaded.

Change-Id: Ie5133f4bed76593dedc9763b778a2c5c17187543
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-20 11:43:14 +00:00
Alessandro Portale
6781e3c96b QmlProfiler: Remove extra arrow from filter button
Change-Id: Ieba517acc6652b2c188f8ff90558b10a6b8c0ac3
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-09-29 16:12:48 +00:00
Ulf Hermann
a324694671 QmlProfiler: Persist the last trace file loaded or saved
This is quite handy if you keep all your traces in one directory.

Change-Id: I09842404493c02fb0ca9c4a328950f7b6dcb5be0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-15 13:06:44 +00:00
Ulf Hermann
05388a7229 QmlProfiler: Simplify application state handling
Only half of the states are useful for anything.

Change-Id: I4591ccda6eec902e929e07947bad6c3f7b967ef9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-15 13:06:40 +00:00
Ulf Hermann
ddb872727f QmlProfiler: Eliminate QmlProfilerDataState
This class is only accessible through the model manager and there is no
real point in keeping it separate.

Change-Id: I575d47c08aa8f6731d44739f9604072b95fd1dcd
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-11 09:13:34 +00:00
Ulf Hermann
f1ede40500 QmlProfiler: Expose flush interval to user
Flushing data while the application is running can distort the results
because the flushing itself takes time. However, not flushing leads to
longer load times in the end and higher memory usage. The best strategy
depends on the application being analyzed and the users should decide
if they want to flush or not.

The settings infrastructure also paves the way for preserviing the
layout of the timeline and statistics views as well as the category
filters across sessions.

Change-Id: I2cdc37c7fc7eb9b05b6870955ddffaa712d6c956
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-31 09:19:32 +00:00
Ulf Hermann
bc6b81fb50 Consistently rename QmlProfilerEngine to QmlProfilerRunControl
It's always a pain to search for the only RunControl that's called
"engine" half of the time.

Change-Id: I4cece9f8958ff989925d9efaaf6fb41731842647
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-08 14:00:05 +00:00
Ulf Hermann
a4da263a1f QmlProfiler: Improve usability
Move the search and filter buttons left of the label, as the label's
length can change.
Don't auto-reshow the filter menus after selecting from them. This is
a very unusual feature and it gets in the way more often than it helps.

Change-Id: I23d0846eb2efaa20d872632175a21680a8216d85
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-08 13:59:58 +00:00
Ulf Hermann
054f03e165 QmlProfiler: Track requested, recorded, and displayed features
This way we can have a central filter menu to hide and show features
in any connected views.

Change-Id: I8142da0062a23f8166555016de6c7cb38060f725
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-07-08 13:59:49 +00:00
Eike Ziller
51104d2c3a Merge remote-tracking branch 'origin/3.5'
Change-Id: Ied20c9cebbb51252a4173fb8189c357006b45e1b
2015-07-01 14:15:54 +02:00
BogDan Vatra
2182ded57b ProjectExplorer: Use Core::Id as RunMode "enum values"
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>
2015-06-30 06:20:54 +00:00
Daniel Teske
5f0e1d9ff6 QmlProfilerTool: Don't check for pre 4.7.4 qt versions anymore
Those positevly stone old. Everyone using Qt 4 should be on at least
4.8.

Change-Id: I71e0edc38bb8bb39a40919920ab4de90cf09b09e
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-06-24 08:21:32 +00:00
hjk
ee5abe6bfc Analyzer: Move towards less global state
Make startTool() explicit as selectAction(Id)  + startAction(Id).

Change-Id: I695112bd8419021a781234121a55440b5dc381be
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-06-23 06:22:21 +00:00
hjk
efad927fc3 Analyzer: Remove AnalyzerStartParameter::useStartupProject
Not used anymore.

Change-Id: I97da63a3bfabbdcf5ccbd36178832ea47d913d04
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-06-19 09:49:16 +00:00
Ulf Hermann
bb6e697006 Analyzer: Add prepare step to tool starting.
The toolPreparer can do a last minute check and stop the execution of
the actual tool. The QML profiler uses this to check for unsaved notes.

Change-Id: I5185430f50ffb01e9854cafa442f0eaaad27fa5d
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-18 14:37:58 +00:00
hjk
bea726e8e2 Analyzer: Replace StartMode with a useStartupProject boolean
This is what it is on the top level. The change makes it obvious
that in the valgrind(-derived) plugins the value is later wrongly
used to make a decision on whether to run the valgrind process
locally or remotely. But that's isolated in valgrind now and
can be fixed there.

Change-Id: I6fa5e669dec1f9e2cdebe42a1591d15144082a21
Reviewed-by: Anton Kreuzkamp <anton.kreuzkamp@kdab.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-06-17 09:39:21 +00:00
Eike Ziller
af2db92523 QmlProfiler: Improvements to searching timeline event notes
- Open timeline view when clicking search button
- Use the usual search tool bar
- Implement incremental search and the various search options

Change-Id: Id83ab502cf4175738a825f531d9e454169663765
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-05-15 06:44:47 +00:00
Eike Ziller
af17e1922f Merge remote-tracking branch 'origin/3.4'
Change-Id: I66ac8be7a8e99fc730131f75710bafc73809f593
2015-03-02 12:11:37 +01:00
Joerg Bornemann
d2892026c8 QmlProfiler: fix progress bar visibilty for loading traces
Move the main part of the loading work into a background thread
and show the standard progress indicator for the "reading file"
part of the load operation.
The load operation can be canceled now.

Change-Id: I4cb3b762072ab4a0665dcf9d4a39d6d6630d22e8
Task-number: QTCREATORBUG-11822
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-02-26 16:19:27 +00:00
Joerg Bornemann
c3e1ccf78e QmlProfiler: save trace data in background thread
Trace data is saved in the background, progress is emitted, and
the save operation can be canceled. While data is being saved
the views are disabled and a semitransparent layer is put on top
of the trace view.

Task-number: QTCREATORBUG-11822
Change-Id: I94ec93147fb1788fc85939ddc591961d058050b5
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-02-26 16:19:11 +00:00
hjk
7f001dab1b Core: Make Context parameter to registerAction optional
... and default to C_GLOBAL. A rather common case.
Similar for ActionContainer::addSeparator().

Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-26 10:09:03 +00:00
hjk
54ce123a26 ProjectExplorer: Add runStartupProject() convenience function
The usage pattern seems to be used often enough to justify a function.

Change-Id: Iecdeb2b42879f419154902e685d0d13e8cae8b33
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-02-23 11:01:56 +00:00
hjk
813e995ebf Analyzer: Reduce explicit use of StartMode enum
Change-Id: I27b1d06395dea940c8dd39cd2bd41fc09cee3a9c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-20 09:35:24 +00:00
hjk
9d707ac63c Analyzers: Various cleanups
Fallout after the demise of IAnalizerTool.

Change-Id: I68f936ed5f2929dc4f09a408bdf6b0ea38e568ef
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-19 12:36:52 +00:00
hjk
73e2b0c579 Analyzer: Dissolve IAnalyzerTool
Change-Id: I1fd90cf00d6b9dff54b4555a14747282830a4b93
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-18 14:52:07 +00:00
hjk
64be0004a6 Analyzer: Remove IAnalyzerTool::m_toolMode member
It's always known from the context when needed.

Change-Id: Ibf314dfb779190e89b775acab784ed71acff2c83
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-18 13:24:01 +00:00
hjk
35d3088252 Analyzer: Move runMode member from IAnalyzerTool to AnalyzerAction
Slim down tool before dissolving.

Change-Id: I502aaa8860293acf8bfd93f541b751d5b96a9563
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-18 12:51:52 +00:00
hjk
da92b09969 Valgrind: Dissolve ValgrindTool hierarchy level
Medium term all *Tool should be replaced by RunControl(Factory)
to make the analyzer architecture more similar to Qt Creator core

Change-Id: I892cfc7fe45c73cc6ac4442a288810b83cb24c17
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-18 11:24:15 +00:00
Orgad Shaneh
b6de2d1bd8 QmlDesigner: Remove unneeded qualifications
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: I492792bb9e5655c55795e938031efc557c9a462f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-02-18 09:53:25 +00:00