forked from qt-creator/qt-creator
QmlStandaloneApp: Fix template to use new QDeclarativeObserver
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
#include <QtDeclarative/QDeclarativeEngine>
|
||||
#include <QtDeclarative/QDeclarativeContext>
|
||||
|
||||
#if defined(QMLINSPECTOR)
|
||||
#include <qdeclarativeviewobserver.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
|
||||
#include <eikenv.h>
|
||||
#include <eikappui.h>
|
||||
@@ -41,15 +45,14 @@ QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
|
||||
}
|
||||
|
||||
QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
|
||||
#ifdef QMLINSPECTOR
|
||||
QmlViewer::QDeclarativeViewObserver(parent)
|
||||
#else
|
||||
QDeclarativeView(parent)
|
||||
#endif
|
||||
, m_d(new QmlApplicationViewerPrivate)
|
||||
QDeclarativeView(parent),
|
||||
m_d(new QmlApplicationViewerPrivate)
|
||||
{
|
||||
connect(engine(), SIGNAL(quit()), SLOT(close()));
|
||||
setResizeMode(QDeclarativeView::SizeRootObjectToView);
|
||||
#ifdef QMLINSPECTOR
|
||||
new QmlViewer::QDeclarativeViewObserver(this, parent);
|
||||
#endif
|
||||
}
|
||||
|
||||
QmlApplicationViewer::~QmlApplicationViewer()
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
#ifndef QMLAPPLICATIONVIEWER_H
|
||||
#define QMLAPPLICATIONVIEWER_H
|
||||
|
||||
#ifdef QMLINSPECTOR
|
||||
#include <qdeclarativeviewobserver.h>
|
||||
class QmlApplicationViewer : public QmlViewer::QDeclarativeViewObserver
|
||||
#else // QMLINSPECTOR
|
||||
#include <QtDeclarative/QDeclarativeView>
|
||||
|
||||
class QmlApplicationViewer : public QDeclarativeView
|
||||
#endif // QMLINSPECTOR
|
||||
{
|
||||
public:
|
||||
enum Orientation {
|
||||
|
||||
@@ -470,7 +470,7 @@ bool QmlStandaloneApp::updateFiles(const QList<QmlAppGeneratedFileInfo> &list, Q
|
||||
return true;
|
||||
}
|
||||
|
||||
const int QmlStandaloneApp::StubVersion = 5;
|
||||
const int QmlStandaloneApp::StubVersion = 6;
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
Reference in New Issue
Block a user