forked from qt-creator/qt-creator
QmlProfiler: Remove dead code
No need to keep properties around that aren't read anywhere. Change-Id: Ie9300ad646466a6a2368f644a420d8654891805f Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -60,12 +60,6 @@ Rectangle {
|
|||||||
|
|
||||||
signal changeToolTip(string text)
|
signal changeToolTip(string text)
|
||||||
|
|
||||||
property bool recordingEnabled: false
|
|
||||||
property bool appKilled : false
|
|
||||||
|
|
||||||
property date recordingStartDate
|
|
||||||
property real elapsedTime
|
|
||||||
|
|
||||||
color: "#dcdcdc"
|
color: "#dcdcdc"
|
||||||
|
|
||||||
// ***** connections with external objects
|
// ***** connections with external objects
|
||||||
@@ -114,7 +108,6 @@ Rectangle {
|
|||||||
|
|
||||||
function clearData() {
|
function clearData() {
|
||||||
view.clearData();
|
view.clearData();
|
||||||
appKilled = false;
|
|
||||||
hideRangeDetails();
|
hideRangeDetails();
|
||||||
selectionRangeMode = false;
|
selectionRangeMode = false;
|
||||||
updateRangeButton();
|
updateRangeButton();
|
||||||
@@ -128,7 +121,6 @@ Rectangle {
|
|||||||
|
|
||||||
function clearAll() {
|
function clearAll() {
|
||||||
clearDisplay();
|
clearDisplay();
|
||||||
elapsedTime = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function nextEvent() {
|
function nextEvent() {
|
||||||
@@ -221,15 +213,6 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onRecordingEnabledChanged: {
|
|
||||||
if (recordingEnabled) {
|
|
||||||
recordingStartDate = new Date();
|
|
||||||
elapsedTime = 0;
|
|
||||||
} else {
|
|
||||||
elapsedTime = (new Date() - recordingStartDate)/1000.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
id: labelsflick
|
id: labelsflick
|
||||||
flickableDirection: Flickable.VerticalFlick
|
flickableDirection: Flickable.VerticalFlick
|
||||||
|
|||||||
@@ -157,12 +157,6 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerT
|
|||||||
d->m_modelProxy);
|
d->m_modelProxy);
|
||||||
|
|
||||||
d->m_profilerState = profilerState;
|
d->m_profilerState = profilerState;
|
||||||
connect(d->m_profilerState, SIGNAL(stateChanged()),
|
|
||||||
this, SLOT(profilerStateChanged()));
|
|
||||||
connect(d->m_profilerState, SIGNAL(clientRecordingChanged()),
|
|
||||||
this, SLOT(clientRecordingChanged()));
|
|
||||||
connect(d->m_profilerState, SIGNAL(serverRecordingChanged()),
|
|
||||||
this, SLOT(serverRecordingChanged()));
|
|
||||||
|
|
||||||
// Minimum height: 5 rows of 20 pixels + scrollbar of 50 pixels + 20 pixels margin
|
// Minimum height: 5 rows of 20 pixels + scrollbar of 50 pixels + 20 pixels margin
|
||||||
setMinimumHeight(170);
|
setMinimumHeight(170);
|
||||||
@@ -455,21 +449,6 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
|
||||||
// Tell QML the state of the profiler
|
|
||||||
void QmlProfilerTraceView::setRecording(bool recording)
|
|
||||||
{
|
|
||||||
QQuickItem *rootObject = d->m_mainView->rootObject();
|
|
||||||
if (rootObject)
|
|
||||||
rootObject->setProperty("recordingEnabled", QVariant(recording));
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlProfilerTraceView::setAppKilled()
|
|
||||||
{
|
|
||||||
QQuickItem *rootObject = d->m_mainView->rootObject();
|
|
||||||
if (rootObject)
|
|
||||||
rootObject->setProperty("appKilled",QVariant(true));
|
|
||||||
}
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
// Profiler State
|
// Profiler State
|
||||||
void QmlProfilerTraceView::profilerDataModelStateChanged()
|
void QmlProfilerTraceView::profilerDataModelStateChanged()
|
||||||
@@ -491,30 +470,6 @@ void QmlProfilerTraceView::profilerDataModelStateChanged()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerTraceView::profilerStateChanged()
|
|
||||||
{
|
|
||||||
switch (d->m_profilerState->currentState()) {
|
|
||||||
case QmlProfilerStateManager::AppKilled : {
|
|
||||||
if (d->m_modelManager->state() == QmlProfilerDataState::AcquiringData)
|
|
||||||
setAppKilled();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
// no special action needed for other states
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlProfilerTraceView::clientRecordingChanged()
|
|
||||||
{
|
|
||||||
// nothing yet
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlProfilerTraceView::serverRecordingChanged()
|
|
||||||
{
|
|
||||||
setRecording(d->m_profilerState->serverRecording());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QmlProfilerQuickView::event(QEvent *ev)
|
bool QmlProfilerQuickView::event(QEvent *ev)
|
||||||
{
|
{
|
||||||
// We assume context menus can only be triggered by mouse press, mouse release, or
|
// We assume context menus can only be triggered by mouse press, mouse release, or
|
||||||
|
|||||||
@@ -99,9 +99,6 @@ protected:
|
|||||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void profilerStateChanged();
|
|
||||||
void clientRecordingChanged();
|
|
||||||
void serverRecordingChanged();
|
|
||||||
void setZoomSliderEnabled(bool enabled);
|
void setZoomSliderEnabled(bool enabled);
|
||||||
void setZoomSliderVisible(bool visible);
|
void setZoomSliderVisible(bool visible);
|
||||||
|
|
||||||
@@ -121,9 +118,6 @@ signals:
|
|||||||
private:
|
private:
|
||||||
QWidget *createToolbar();
|
QWidget *createToolbar();
|
||||||
|
|
||||||
void setRecording(bool recording);
|
|
||||||
void setAppKilled();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class QmlProfilerTraceViewPrivate;
|
class QmlProfilerTraceViewPrivate;
|
||||||
QmlProfilerTraceViewPrivate *d;
|
QmlProfilerTraceViewPrivate *d;
|
||||||
|
|||||||
Reference in New Issue
Block a user