From 89f1c0bf53a3f6c92ff94b0bc94099ab9db4d692 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 11 Sep 2015 13:43:23 +0200 Subject: [PATCH] QmlProfiler: Remove some dead code Change-Id: I2efd48a4dc13cc3996eda994eb4a046c101ad3e9 Reviewed-by: Joerg Bornemann --- .../qmlprofiler/qmlprofilerclientmanager.cpp | 14 +++++--------- src/plugins/qmlprofiler/qmlprofilereventview.cpp | 10 ---------- src/plugins/qmlprofiler/qmlprofilereventview.h | 6 ------ src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | 12 ------------ src/plugins/qmlprofiler/qmlprofilerruncontrol.h | 2 -- 5 files changed, 5 insertions(+), 39 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp index 0a903dcd9fb..670b20ceb4e 100644 --- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp @@ -311,12 +311,6 @@ void QmlProfilerClientManager::qmlComplete(qint64 maximumTime) d->modelManager->acquiringDone(); } -void QmlProfilerClientManager::stopClientsRecording() -{ - if (d->qmlclientplugin) - d->qmlclientplugin.data()->setRecording(false); -} - void QmlProfilerClientManager::registerProfilerStateManager( QmlProfilerStateManager *profilerState ) { if (d->profilerState) { @@ -342,10 +336,12 @@ void QmlProfilerClientManager::profilerStateChanged() QTC_ASSERT(d->profilerState, return); switch (d->profilerState->currentState()) { case QmlProfilerStateManager::AppStopRequested : - if (d->profilerState->serverRecording()) - stopClientsRecording(); - else + if (d->profilerState->serverRecording()) { + if (d->qmlclientplugin) + d->qmlclientplugin.data()->setRecording(false); + } else { d->profilerState->setCurrentState(QmlProfilerStateManager::AppReadyToStop); + } break; default: break; diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.cpp b/src/plugins/qmlprofiler/qmlprofilereventview.cpp index 3e235127dfa..ee076ddc0c4 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilereventview.cpp @@ -189,8 +189,6 @@ QmlProfilerEventsWidget::QmlProfilerEventsWidget(QWidget *parent, setObjectName(QLatin1String("QmlProfilerEventsView")); d->modelProxy = new QmlProfilerEventsModelProxy(profilerModelManager, this); - connect(profilerModelManager, SIGNAL(stateChanged()), - this, SLOT(profilerDataModelStateChanged())); d->m_eventTree = new QmlProfilerEventsMainView(this, d->modelProxy); connect(d->m_eventTree, SIGNAL(gotoSourceLocation(QString,int,int)), this, SIGNAL(gotoSourceLocation(QString,int,int))); @@ -236,10 +234,6 @@ QmlProfilerEventsWidget::~QmlProfilerEventsWidget() delete d; } -void QmlProfilerEventsWidget::profilerDataModelStateChanged() -{ -} - void QmlProfilerEventsWidget::clear() { d->m_eventTree->clear(); @@ -441,10 +435,6 @@ QmlProfilerEventsMainView::~QmlProfilerEventsMainView() delete d; } -void QmlProfilerEventsMainView::profilerDataModelStateChanged() -{ -} - void QmlProfilerEventsMainView::setFieldViewable(Fields field, bool show) { if (field < MaxFields) { diff --git a/src/plugins/qmlprofiler/qmlprofilereventview.h b/src/plugins/qmlprofiler/qmlprofilereventview.h index f1c389695ac..91ad6b57c5f 100644 --- a/src/plugins/qmlprofiler/qmlprofilereventview.h +++ b/src/plugins/qmlprofiler/qmlprofilereventview.h @@ -109,9 +109,6 @@ public slots: void selectBySourceLocation(const QString &filename, int line, int column); void onVisibleFeaturesChanged(quint64 features); -private slots: - void profilerDataModelStateChanged(); - protected: void contextMenuEvent(QContextMenuEvent *ev); virtual void resizeEvent(QResizeEvent *event); @@ -157,9 +154,6 @@ public slots: void buildModel(); void updateNotes(int typeIndex); -private slots: - void profilerDataModelStateChanged(); - private: void selectItem(const QStandardItem *item); void setHeaderLabels(); diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 166df98147b..e6e5303c4c1 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -232,18 +232,6 @@ void QmlProfilerRunControl::wrongSetupMessageBoxFinished(int button) } } -void QmlProfilerRunControl::showNonmodalWarning(const QString &warningMsg) -{ - QMessageBox *noExecWarning = new QMessageBox(ICore::mainWindow()); - noExecWarning->setIcon(QMessageBox::Warning); - noExecWarning->setWindowTitle(tr("QML Profiler")); - noExecWarning->setText(warningMsg); - noExecWarning->setStandardButtons(QMessageBox::Ok); - noExecWarning->setDefaultButton(QMessageBox::Ok); - noExecWarning->setModal(false); - noExecWarning->show(); -} - void QmlProfilerRunControl::notifyRemoteSetupDone(quint16 port) { d->m_noDebugOutputTimer.stop(); diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h index d998d1ac907..b7a575586b7 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.h +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.h @@ -49,8 +49,6 @@ public: void registerProfilerStateManager( QmlProfilerStateManager *profilerState ); - static void showNonmodalWarning(const QString &warningMsg); - void notifyRemoteSetupDone(quint16 port); signals: