From 70579cf5f1b82460443b764aef1f2d2b23732acd Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Thu, 22 Nov 2012 17:29:53 +0100 Subject: 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 --- .../app/mainwindow.cpp | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp (limited to 'tests/auto/declarative/qdeclarativedebugobservermode/app/mainwindow.cpp') 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 +#include + +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 errors = m_view->errors(); + foreach (const QDeclarativeError &error, errors) { + qWarning() << error.toString(); + } + return false; + } + return true; +} -- cgit v1.2.3