diff options
author | Aurindam Jana <aurindam.jana@digia.com> | 2012-11-22 17:29:53 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-27 17:03:35 +0100 |
commit | 70579cf5f1b82460443b764aef1f2d2b23732acd (patch) | |
tree | f1ebdf69b9346dae6b3daef348d85cf5215fe052 /tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp | |
parent | ed0616b199dde58c8c87097dce31128dd0bfb5b8 (diff) |
QtQuick1: Fix ObserverMode
Although ObserverMode was enabled, the messages to the plugin
were not delivered and hence the feature did not work.
Change-Id: I58ec83a4ee727b32833c011a4942cde0cd6a02c8
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp b/tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp new file mode 100644 index 00000000..d6399d81 --- /dev/null +++ b/tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp @@ -0,0 +1,27 @@ +#include "mainwindow.h" + +#include <QDeclarativeError> +#include <QDebug> + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent) +{ +} + +MainWindow::~MainWindow() +{ + delete m_view; +} + +bool MainWindow::loadQML(const QUrl &source) +{ + m_view = new QDeclarativeView(source, this); + if (m_view->status() == QDeclarativeView::Error) { + QList<QDeclarativeError> errors = m_view->errors(); + foreach (const QDeclarativeError &error, errors) { + qWarning() << error.toString(); + } + return false; + } + return true; +} |