2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
2014-10-01 13:21:18 +02:00
|
|
|
** conditions see http://www.qt.io/licensing. For further information
|
|
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2012-10-02 09:12:39 +02:00
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2012-02-24 10:47:17 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
#include "qmlprofilertraceview.h"
|
|
|
|
|
#include "qmlprofilertool.h"
|
|
|
|
|
#include "qmlprofilerstatemanager.h"
|
2013-08-08 13:28:08 +02:00
|
|
|
#include "qmlprofilermodelmanager.h"
|
|
|
|
|
#include "timelinemodelaggregator.h"
|
2014-11-04 14:41:32 +01:00
|
|
|
#include "qmlprofilernotesmodel.h"
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
// Needed for the load&save actions in the context menu
|
|
|
|
|
#include <analyzerbase/ianalyzertool.h>
|
|
|
|
|
|
2013-08-08 13:28:08 +02:00
|
|
|
// Communication with the other views (limit events to range)
|
2012-02-24 10:47:17 +01:00
|
|
|
#include "qmlprofilerviewmanager.h"
|
2014-10-14 16:44:45 +02:00
|
|
|
#include "timelinezoomcontrol.h"
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
#include <utils/styledbar.h>
|
|
|
|
|
|
2013-09-16 14:33:07 +02:00
|
|
|
#include <QQmlContext>
|
2012-02-24 10:47:17 +01:00
|
|
|
#include <QToolButton>
|
|
|
|
|
#include <QEvent>
|
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
#include <QGraphicsObject>
|
|
|
|
|
#include <QScrollBar>
|
|
|
|
|
#include <QSlider>
|
|
|
|
|
#include <QMenu>
|
2013-09-16 14:33:07 +02:00
|
|
|
#include <QQuickItem>
|
2014-02-21 18:34:05 +01:00
|
|
|
#include <QApplication>
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
|
|
2012-04-18 12:06:10 +02:00
|
|
|
using namespace QmlDebug;
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
namespace QmlProfiler {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
|
|
|
|
class QmlProfilerTraceView::QmlProfilerTraceViewPrivate
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QmlProfilerTraceViewPrivate(QmlProfilerTraceView *qq) : q(qq) {}
|
2013-09-16 14:33:07 +02:00
|
|
|
~QmlProfilerTraceViewPrivate()
|
|
|
|
|
{
|
|
|
|
|
delete m_mainView;
|
|
|
|
|
}
|
|
|
|
|
|
2012-02-24 10:47:17 +01:00
|
|
|
QmlProfilerTraceView *q;
|
|
|
|
|
|
|
|
|
|
QmlProfilerStateManager *m_profilerState;
|
|
|
|
|
Analyzer::IAnalyzerTool *m_profilerTool;
|
|
|
|
|
QmlProfilerViewManager *m_viewContainer;
|
|
|
|
|
|
|
|
|
|
QSize m_sizeHint;
|
|
|
|
|
|
2013-09-03 14:06:31 +02:00
|
|
|
QQuickView *m_mainView;
|
2013-08-08 13:28:08 +02:00
|
|
|
QmlProfilerModelManager *m_modelManager;
|
|
|
|
|
TimelineModelAggregator *m_modelProxy;
|
|
|
|
|
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2014-10-14 16:44:45 +02:00
|
|
|
TimelineZoomControl *m_zoomControl;
|
2012-02-24 10:47:17 +01:00
|
|
|
};
|
|
|
|
|
|
2013-08-08 13:28:08 +02:00
|
|
|
QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, Analyzer::IAnalyzerTool *profilerTool, QmlProfilerViewManager *container, QmlProfilerModelManager *modelManager, QmlProfilerStateManager *profilerState)
|
2012-02-24 10:47:17 +01:00
|
|
|
: QWidget(parent), d(new QmlProfilerTraceViewPrivate(this))
|
|
|
|
|
{
|
2012-11-26 21:18:13 +02:00
|
|
|
setObjectName(QLatin1String("QML Profiler"));
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2014-10-14 16:44:45 +02:00
|
|
|
d->m_zoomControl = new TimelineZoomControl(this);
|
|
|
|
|
connect(modelManager->traceTime(), &QmlProfilerTraceTime::timeChanged,
|
|
|
|
|
d->m_zoomControl, &TimelineZoomControl::setTrace);
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
QVBoxLayout *groupLayout = new QVBoxLayout;
|
|
|
|
|
groupLayout->setContentsMargins(0, 0, 0, 0);
|
|
|
|
|
groupLayout->setSpacing(0);
|
|
|
|
|
|
2014-11-04 14:41:32 +01:00
|
|
|
qmlRegisterType<QmlProfilerNotesModel>();
|
|
|
|
|
|
2014-02-21 18:34:05 +01:00
|
|
|
d->m_mainView = new QmlProfilerQuickView(this);
|
2013-10-30 13:49:01 +01:00
|
|
|
d->m_mainView->setResizeMode(QQuickView::SizeRootObjectToView);
|
2013-09-16 14:33:07 +02:00
|
|
|
QWidget *mainViewContainer = QWidget::createWindowContainer(d->m_mainView);
|
2014-01-10 11:54:29 +01:00
|
|
|
mainViewContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2014-06-04 18:23:07 +02:00
|
|
|
enableToolbar(false);
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2013-09-16 14:33:07 +02:00
|
|
|
groupLayout->addWidget(mainViewContainer);
|
2012-02-24 10:47:17 +01:00
|
|
|
setLayout(groupLayout);
|
|
|
|
|
|
|
|
|
|
d->m_profilerTool = profilerTool;
|
|
|
|
|
d->m_viewContainer = container;
|
2013-08-08 13:28:08 +02:00
|
|
|
d->m_modelManager = modelManager;
|
|
|
|
|
d->m_modelProxy = new TimelineModelAggregator(this);
|
|
|
|
|
d->m_modelProxy->setModelManager(modelManager);
|
|
|
|
|
connect(d->m_modelManager, SIGNAL(stateChanged()),
|
2012-02-24 10:47:17 +01:00
|
|
|
this, SLOT(profilerDataModelStateChanged()));
|
2013-08-08 13:28:08 +02:00
|
|
|
d->m_mainView->rootContext()->setContextProperty(QLatin1String("qmlProfilerModelProxy"),
|
|
|
|
|
d->m_modelProxy);
|
2012-02-24 10:47:17 +01:00
|
|
|
d->m_profilerState = profilerState;
|
|
|
|
|
|
|
|
|
|
// Minimum height: 5 rows of 20 pixels + scrollbar of 50 pixels + 20 pixels margin
|
|
|
|
|
setMinimumHeight(170);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QmlProfilerTraceView::~QmlProfilerTraceView()
|
|
|
|
|
{
|
|
|
|
|
delete d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
|
|
|
|
// Initialize widgets
|
|
|
|
|
void QmlProfilerTraceView::reset()
|
|
|
|
|
{
|
2012-11-26 21:18:13 +02:00
|
|
|
d->m_mainView->rootContext()->setContextProperty(QLatin1String("zoomControl"), d->m_zoomControl);
|
|
|
|
|
d->m_mainView->setSource(QUrl(QLatin1String("qrc:/qmlprofiler/MainView.qml")));
|
2012-12-30 12:01:41 +01:00
|
|
|
|
2013-10-30 13:49:01 +01:00
|
|
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
2012-12-30 12:01:41 +01:00
|
|
|
connect(rootObject, SIGNAL(updateCursorPosition()), this, SLOT(updateCursorPosition()));
|
2012-02-24 10:47:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
|
|
|
|
bool QmlProfilerTraceView::hasValidSelection() const
|
|
|
|
|
{
|
2013-09-16 14:33:07 +02:00
|
|
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
2012-12-30 12:01:41 +01:00
|
|
|
if (rootObject)
|
|
|
|
|
return rootObject->property("selectionRangeReady").toBool();
|
2012-02-24 10:47:17 +01:00
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-04 18:23:07 +02:00
|
|
|
void QmlProfilerTraceView::enableToolbar(bool enable)
|
|
|
|
|
{
|
|
|
|
|
QMetaObject::invokeMethod(d->m_mainView->rootObject(), "enableButtonsBar",
|
|
|
|
|
Q_ARG(QVariant,QVariant(enable)));
|
|
|
|
|
}
|
|
|
|
|
|
2012-02-24 10:47:17 +01:00
|
|
|
qint64 QmlProfilerTraceView::selectionStart() const
|
|
|
|
|
{
|
2013-09-16 14:33:07 +02:00
|
|
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
2012-12-30 12:01:41 +01:00
|
|
|
if (rootObject)
|
|
|
|
|
return rootObject->property("selectionRangeStart").toLongLong();
|
2012-02-24 10:47:17 +01:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
qint64 QmlProfilerTraceView::selectionEnd() const
|
|
|
|
|
{
|
2013-09-16 14:33:07 +02:00
|
|
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
2012-12-30 12:01:41 +01:00
|
|
|
if (rootObject)
|
|
|
|
|
return rootObject->property("selectionRangeEnd").toLongLong();
|
2012-02-24 10:47:17 +01:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-25 17:10:25 +01:00
|
|
|
void QmlProfilerTraceView::clear()
|
2012-02-24 10:47:17 +01:00
|
|
|
{
|
2014-03-25 17:10:25 +01:00
|
|
|
QMetaObject::invokeMethod(d->m_mainView->rootObject(), "clear");
|
2012-02-24 10:47:17 +01:00
|
|
|
}
|
|
|
|
|
|
2014-08-29 16:32:42 +02:00
|
|
|
void QmlProfilerTraceView::selectByTypeId(int typeId)
|
2012-02-24 10:47:17 +01:00
|
|
|
{
|
2013-09-16 14:33:07 +02:00
|
|
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
2014-06-12 13:08:08 +02:00
|
|
|
if (!rootObject)
|
|
|
|
|
return;
|
2014-10-28 12:56:53 +01:00
|
|
|
QMetaObject::invokeMethod(rootObject, "selectByTypeId", Q_ARG(QVariant,QVariant(typeId)));
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
|
|
|
|
|
2014-04-03 11:15:56 +02:00
|
|
|
void QmlProfilerTraceView::selectBySourceLocation(const QString &filename, int line, int column)
|
2013-08-08 13:28:08 +02:00
|
|
|
{
|
2014-06-12 13:08:08 +02:00
|
|
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
|
|
|
|
if (!rootObject)
|
|
|
|
|
return;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2014-06-12 13:08:08 +02:00
|
|
|
for (int modelIndex = 0; modelIndex < d->m_modelProxy->modelCount(); ++modelIndex) {
|
2014-08-29 16:32:42 +02:00
|
|
|
int typeId = d->m_modelProxy->selectionIdForLocation(modelIndex, filename, line, column);
|
|
|
|
|
if (typeId != -1) {
|
|
|
|
|
QMetaObject::invokeMethod(rootObject, "selectBySelectionId",
|
2014-06-12 13:08:08 +02:00
|
|
|
Q_ARG(QVariant,QVariant(modelIndex)),
|
2014-08-29 16:32:42 +02:00
|
|
|
Q_ARG(QVariant,QVariant(typeId)));
|
2014-06-12 13:08:08 +02:00
|
|
|
return;
|
|
|
|
|
}
|
2013-08-08 13:28:08 +02:00
|
|
|
}
|
2012-02-24 10:47:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
|
|
|
|
// Goto source location
|
|
|
|
|
void QmlProfilerTraceView::updateCursorPosition()
|
|
|
|
|
{
|
2013-09-16 14:33:07 +02:00
|
|
|
QQuickItem *rootObject = d->m_mainView->rootObject();
|
2014-09-29 16:24:34 +02:00
|
|
|
QString file = rootObject->property("fileName").toString();
|
|
|
|
|
if (!file.isEmpty())
|
|
|
|
|
emit gotoSourceLocation(file, rootObject->property("lineNumber").toInt(),
|
|
|
|
|
rootObject->property("columnNumber").toInt());
|
|
|
|
|
|
|
|
|
|
emit typeSelected(rootObject->property("typeId").toInt());
|
2012-02-24 10:47:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////
|
|
|
|
|
void QmlProfilerTraceView::resizeEvent(QResizeEvent *event)
|
|
|
|
|
{
|
2012-05-16 12:16:45 +02:00
|
|
|
QWidget::resizeEvent(event);
|
|
|
|
|
emit resized();
|
2012-02-24 10:47:17 +01:00
|
|
|
}
|
|
|
|
|
|
2014-03-28 16:06:07 +01:00
|
|
|
void QmlProfilerTraceView::mousePressEvent(QMouseEvent *event)
|
|
|
|
|
{
|
|
|
|
|
d->m_zoomControl->setWindowLocked(true);
|
|
|
|
|
QWidget::mousePressEvent(event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QmlProfilerTraceView::mouseReleaseEvent(QMouseEvent *event)
|
|
|
|
|
{
|
|
|
|
|
d->m_zoomControl->setWindowLocked(false);
|
|
|
|
|
QWidget::mouseReleaseEvent(event);
|
|
|
|
|
}
|
|
|
|
|
|
2012-02-24 10:47:17 +01:00
|
|
|
////////////////////////////////////////////////////////////////
|
|
|
|
|
// Context menu
|
|
|
|
|
void QmlProfilerTraceView::contextMenuEvent(QContextMenuEvent *ev)
|
2014-02-21 18:34:05 +01:00
|
|
|
{
|
|
|
|
|
showContextMenu(ev->globalPos());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void QmlProfilerTraceView::showContextMenu(QPoint position)
|
2012-02-24 10:47:17 +01:00
|
|
|
{
|
|
|
|
|
QMenu menu;
|
|
|
|
|
QAction *viewAllAction = 0;
|
|
|
|
|
|
|
|
|
|
QmlProfilerTool *profilerTool = qobject_cast<QmlProfilerTool *>(d->m_profilerTool);
|
|
|
|
|
|
2012-12-30 12:01:41 +01:00
|
|
|
if (profilerTool)
|
|
|
|
|
menu.addActions(profilerTool->profilerContextMenuActions());
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
menu.addSeparator();
|
2012-12-30 12:01:41 +01:00
|
|
|
|
|
|
|
|
QAction *getLocalStatsAction = menu.addAction(tr("Limit Events Pane to Current Range"));
|
2012-02-24 10:47:17 +01:00
|
|
|
if (!d->m_viewContainer->hasValidSelection())
|
|
|
|
|
getLocalStatsAction->setEnabled(false);
|
2012-12-30 12:01:41 +01:00
|
|
|
|
2014-03-06 16:12:02 +01:00
|
|
|
QAction *getGlobalStatsAction = menu.addAction(tr("Show Full Range in Events Pane"));
|
2012-02-24 10:47:17 +01:00
|
|
|
if (d->m_viewContainer->hasGlobalStats())
|
|
|
|
|
getGlobalStatsAction->setEnabled(false);
|
|
|
|
|
|
2013-08-08 13:28:08 +02:00
|
|
|
if (!d->m_modelProxy->isEmpty()) {
|
2012-02-24 10:47:17 +01:00
|
|
|
menu.addSeparator();
|
|
|
|
|
viewAllAction = menu.addAction(tr("Reset Zoom"));
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-21 18:34:05 +01:00
|
|
|
QAction *selectedAction = menu.exec(position);
|
2012-02-24 10:47:17 +01:00
|
|
|
|
|
|
|
|
if (selectedAction) {
|
|
|
|
|
if (selectedAction == viewAllAction) {
|
2014-10-14 16:44:45 +02:00
|
|
|
d->m_zoomControl->setRange(d->m_zoomControl->traceStart(),
|
|
|
|
|
d->m_zoomControl->traceEnd());
|
2012-02-24 10:47:17 +01:00
|
|
|
}
|
|
|
|
|
if (selectedAction == getLocalStatsAction) {
|
|
|
|
|
d->m_viewContainer->getStatisticsInRange(
|
|
|
|
|
d->m_viewContainer->selectionStart(),
|
|
|
|
|
d->m_viewContainer->selectionEnd());
|
|
|
|
|
}
|
2013-11-11 22:20:47 +02:00
|
|
|
if (selectedAction == getGlobalStatsAction)
|
2013-08-08 13:28:08 +02:00
|
|
|
d->m_viewContainer->getStatisticsInRange(-1, -1);
|
2012-02-24 10:47:17 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////
|
|
|
|
|
// Profiler State
|
|
|
|
|
void QmlProfilerTraceView::profilerDataModelStateChanged()
|
|
|
|
|
{
|
2013-08-08 13:28:08 +02:00
|
|
|
switch (d->m_modelManager->state()) {
|
2013-12-09 12:11:48 +01:00
|
|
|
case QmlProfilerDataState::Empty: break;
|
|
|
|
|
case QmlProfilerDataState::ClearingData:
|
2014-01-09 17:23:41 +01:00
|
|
|
d->m_mainView->hide();
|
2014-06-04 18:23:07 +02:00
|
|
|
enableToolbar(false);
|
2012-02-24 10:47:17 +01:00
|
|
|
break;
|
2013-08-08 13:28:08 +02:00
|
|
|
case QmlProfilerDataState::AcquiringData: break;
|
|
|
|
|
case QmlProfilerDataState::ProcessingData: break;
|
|
|
|
|
case QmlProfilerDataState::Done:
|
2014-06-04 18:23:07 +02:00
|
|
|
enableToolbar(true);
|
2014-01-09 17:23:41 +01:00
|
|
|
d->m_mainView->show();
|
2012-02-24 10:47:17 +01:00
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-21 18:34:05 +01:00
|
|
|
bool QmlProfilerQuickView::event(QEvent *ev)
|
|
|
|
|
{
|
|
|
|
|
// We assume context menus can only be triggered by mouse press, mouse release, or
|
|
|
|
|
// pre-synthesized events from the window system.
|
|
|
|
|
|
|
|
|
|
bool relayed = false;
|
|
|
|
|
switch (ev->type()) {
|
|
|
|
|
case QEvent::ContextMenu:
|
|
|
|
|
// In the case of mouse clicks the active popup gets automatically closed before they show
|
|
|
|
|
// up here. That's not necessarily the case with keyboard triggered context menu events, so
|
|
|
|
|
// we just ignore them if there is a popup already. Also, the event's pos() and globalPos()
|
|
|
|
|
// don't make much sense in this case, so we just put the menu in the upper left corner.
|
|
|
|
|
if (QApplication::activePopupWidget() == 0) {
|
|
|
|
|
ev->accept();
|
|
|
|
|
parent->showContextMenu(parent->mapToGlobal(QPoint(0,0)));
|
|
|
|
|
relayed = true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2014-08-26 15:25:30 +02:00
|
|
|
case QEvent::MouseMove:
|
2014-02-21 18:34:05 +01:00
|
|
|
case QEvent::MouseButtonPress:
|
|
|
|
|
case QEvent::MouseButtonRelease: {
|
|
|
|
|
QMouseEvent *orig = static_cast<QMouseEvent *>(ev);
|
|
|
|
|
QCoreApplication::instance()->postEvent(parent->window()->windowHandle(),
|
|
|
|
|
new QMouseEvent(orig->type(), parent->window()->mapFromGlobal(orig->globalPos()),
|
|
|
|
|
orig->button(), orig->buttons(), orig->modifiers()));
|
|
|
|
|
relayed = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QQuickView will eat mouse events even if they're not accepted by any QML construct. So we
|
|
|
|
|
// ignore the return value of event() above.
|
|
|
|
|
return QQuickView::event(ev) || relayed;
|
|
|
|
|
}
|
|
|
|
|
|
2012-02-24 10:47:17 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace QmlProfiler
|