QmlProfiler: Move EventList to qmljsdebugclient library

Change-Id: Icbd24ffeb51db0f098d8fe9c62a0a889a722f760
Reviewed-on: http://codereview.qt.nokia.com/3222
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Kai Koehne
2011-08-18 16:10:33 +02:00
parent 91e22b2e81
commit 749534ea76
10 changed files with 53 additions and 56 deletions

View File

@@ -35,12 +35,12 @@
#include "qmlprofilerplugin.h"
#include "qmlprofilerconstants.h"
#include "qmlprofilerattachdialog.h"
#include "qmlprofilereventlist.h"
#include "qmlprofilereventview.h"
#include "tracewindow.h"
#include "timelineview.h"
#include <qmljsdebugclient/qmlprofilereventlist.h>
#include <qmljsdebugclient/qdeclarativedebugclient.h>
#include <analyzerbase/analyzermanager.h>
@@ -255,6 +255,7 @@ QWidget *QmlProfilerTool::createWidgets()
connect(d->m_traceWindow, SIGNAL(gotoSourceLocation(QString,int)),this, SLOT(gotoSourceLocation(QString,int)));
connect(d->m_traceWindow, SIGNAL(timeChanged(qreal)), this, SLOT(updateTimer(qreal)));
connect(d->m_traceWindow, SIGNAL(contextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
connect(d->m_traceWindow->getEventList(), SIGNAL(error(QString)), this, SLOT(showErrorDialog(QString)));
d->m_eventsView = new QmlProfilerEventsView(mw, d->m_traceWindow->getEventList());
d->m_eventsView->setViewType(QmlProfilerEventsView::EventsView);
@@ -582,3 +583,16 @@ void QmlProfilerTool::showLoadDialog()
QTimer::singleShot(100, d->m_traceWindow->getEventList(), SLOT(load()));
}
}
void QmlProfilerTool::showErrorDialog(const QString &error)
{
Core::ICore *core = Core::ICore::instance();
QMessageBox *errorDialog = new QMessageBox(core->mainWindow());
errorDialog->setIcon(QMessageBox::Warning);
errorDialog->setWindowTitle(tr("QML Profiler"));
errorDialog->setText(error);
errorDialog->setStandardButtons(QMessageBox::Ok);
errorDialog->setDefaultButton(QMessageBox::Ok);
errorDialog->setModal(false);
errorDialog->show();
}