forked from qt-creator/qt-creator
QmlProfiler: Fix warnings about hiding overloaded virtual functions
toolSelected() & toolDeselected are const methods in the base class. But anyway the attach Action isn't used any more, so let's remove it completely ... Change-Id: Ia40cb6d927fb8422700816a8c6de81aa3734959d Reviewed-on: http://codereview.qt.nokia.com/2324 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -103,7 +103,6 @@ public:
|
|||||||
Utils::FileInProjectFinder m_projectFinder;
|
Utils::FileInProjectFinder m_projectFinder;
|
||||||
ProjectExplorer::RunConfiguration *m_runConfiguration;
|
ProjectExplorer::RunConfiguration *m_runConfiguration;
|
||||||
bool m_isAttached;
|
bool m_isAttached;
|
||||||
QAction *m_attachAction;
|
|
||||||
QToolButton *m_recordButton;
|
QToolButton *m_recordButton;
|
||||||
QToolButton *m_clearButton;
|
QToolButton *m_clearButton;
|
||||||
bool m_recordingEnabled;
|
bool m_recordingEnabled;
|
||||||
@@ -128,7 +127,6 @@ QmlProfilerTool::QmlProfilerTool(QObject *parent)
|
|||||||
d->m_project = 0;
|
d->m_project = 0;
|
||||||
d->m_runConfiguration = 0;
|
d->m_runConfiguration = 0;
|
||||||
d->m_isAttached = false;
|
d->m_isAttached = false;
|
||||||
d->m_attachAction = 0;
|
|
||||||
d->m_recordingEnabled = true;
|
d->m_recordingEnabled = true;
|
||||||
|
|
||||||
d->m_connectionTimer.setInterval(200);
|
d->m_connectionTimer.setInterval(200);
|
||||||
@@ -228,16 +226,6 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
|
|||||||
return engine;
|
return engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerTool::toolSelected()
|
|
||||||
{
|
|
||||||
updateAttachAction(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlProfilerTool::toolDeselected()
|
|
||||||
{
|
|
||||||
updateAttachAction(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *QmlProfilerTool::createWidgets()
|
QWidget *QmlProfilerTool::createWidgets()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!d->m_traceWindow, return 0);
|
QTC_ASSERT(!d->m_traceWindow, return 0);
|
||||||
@@ -280,15 +268,6 @@ QWidget *QmlProfilerTool::createWidgets()
|
|||||||
Core::ActionContainer *manalyzer = am->actionContainer(Analyzer::Constants::M_DEBUG_ANALYZER);
|
Core::ActionContainer *manalyzer = am->actionContainer(Analyzer::Constants::M_DEBUG_ANALYZER);
|
||||||
const Core::Context globalcontext(Core::Constants::C_GLOBAL);
|
const Core::Context globalcontext(Core::Constants::C_GLOBAL);
|
||||||
|
|
||||||
d->m_attachAction = new QAction(tr("Attach..."), manalyzer);
|
|
||||||
Core::Command *command = am->registerAction(d->m_attachAction,
|
|
||||||
Constants::ATTACH, globalcontext);
|
|
||||||
command->setAttribute(Core::Command::CA_UpdateText);
|
|
||||||
//manalyzer->addAction(command, Analyzer::Constants::G_ANALYZER_STARTSTOP);
|
|
||||||
connect(d->m_attachAction, SIGNAL(triggered()), this, SLOT(attach()));
|
|
||||||
|
|
||||||
updateAttachAction(false);
|
|
||||||
|
|
||||||
QDockWidget *eventsDock = AnalyzerManager::createDockWidget
|
QDockWidget *eventsDock = AnalyzerManager::createDockWidget
|
||||||
(this, tr("Events"), d->m_eventsView, Qt::BottomDockWidgetArea);
|
(this, tr("Events"), d->m_eventsView, Qt::BottomDockWidgetArea);
|
||||||
QDockWidget *timelineDock = AnalyzerManager::createDockWidget
|
QDockWidget *timelineDock = AnalyzerManager::createDockWidget
|
||||||
@@ -476,16 +455,6 @@ void QmlProfilerTool::attach()
|
|||||||
}
|
}
|
||||||
|
|
||||||
d->m_isAttached = !d->m_isAttached;
|
d->m_isAttached = !d->m_isAttached;
|
||||||
updateAttachAction(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlProfilerTool::updateAttachAction(bool isCurrentTool)
|
|
||||||
{
|
|
||||||
if (d->m_isAttached)
|
|
||||||
d->m_attachAction->setText(tr("Detach"));
|
|
||||||
else
|
|
||||||
d->m_attachAction->setText(tr("Attach..."));
|
|
||||||
d->m_attachAction->setEnabled(isCurrentTool);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerTool::tryToConnect()
|
void QmlProfilerTool::tryToConnect()
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ public:
|
|||||||
ToolMode toolMode() const;
|
ToolMode toolMode() const;
|
||||||
|
|
||||||
void extensionsInitialized() {}
|
void extensionsInitialized() {}
|
||||||
void toolSelected();
|
|
||||||
void toolDeselected();
|
|
||||||
|
|
||||||
Analyzer::IAnalyzerEngine *createEngine(const Analyzer::AnalyzerStartParameters &sp,
|
Analyzer::IAnalyzerEngine *createEngine(const Analyzer::AnalyzerStartParameters &sp,
|
||||||
ProjectExplorer::RunConfiguration *runConfiguration = 0);
|
ProjectExplorer::RunConfiguration *runConfiguration = 0);
|
||||||
@@ -88,7 +86,6 @@ private slots:
|
|||||||
void connectionStateChanged();
|
void connectionStateChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateAttachAction(bool isCurrentTool);
|
|
||||||
void connectToClient();
|
void connectToClient();
|
||||||
void updateRecordingState();
|
void updateRecordingState();
|
||||||
void ensureWidgets();
|
void ensureWidgets();
|
||||||
|
|||||||
Reference in New Issue
Block a user