diff options
Diffstat (limited to 'examples/helper')
3 files changed, 8 insertions, 45 deletions
diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp index 570f68f3..d8a9336b 100644 --- a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -42,10 +42,10 @@ #include <QtCore/QDir> #include <QtCore/QFileInfo> -#include <QtDeclarative/QDeclarativeComponent> -#include <QtDeclarative/QDeclarativeEngine> -#include <QtDeclarative/QDeclarativeContext> -#include <QtGui/QApplication> +#include <QtQuick1/QDeclarativeComponent> +#include <QtQuick1/QDeclarativeEngine> +#include <QtQuick1/QDeclarativeContext> +#include <QtWidgets/QApplication> #include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN @@ -164,45 +164,8 @@ void QmlApplicationViewer::addImportPath(const QString &path) void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) { -#if defined(Q_OS_SYMBIAN) - // If the version of Qt on the device is < 4.7.2, that attribute won't work - if (orientation != ScreenOrientationAuto) { - const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); - if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { - qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); - return; - } - } -#endif // Q_OS_SYMBIAN - - Qt::WidgetAttribute attribute; - switch (orientation) { -#if QT_VERSION < 0x040702 - // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes - case ScreenOrientationLockPortrait: - attribute = static_cast<Qt::WidgetAttribute>(128); - break; - case ScreenOrientationLockLandscape: - attribute = static_cast<Qt::WidgetAttribute>(129); - break; - default: - case ScreenOrientationAuto: - attribute = static_cast<Qt::WidgetAttribute>(130); - break; -#else // QT_VERSION < 0x040702 - case ScreenOrientationLockPortrait: - attribute = Qt::WA_LockPortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_LockLandscapeOrientation; - break; - default: - case ScreenOrientationAuto: - attribute = Qt::WA_AutoOrientation; - break; -#endif // QT_VERSION < 0x040702 - }; - setAttribute(attribute, true); + // TODO: Needs a Qt5 implmentation + Q_UNUSED(orientation) } void QmlApplicationViewer::showExpanded() diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h index 85c02ab6..d8ef27e0 100644 --- a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h @@ -41,7 +41,7 @@ #ifndef QMLAPPLICATIONVIEWER_H #define QMLAPPLICATIONVIEWER_H -#include <QtDeclarative/QDeclarativeView> +#include <QtQuick1/QDeclarativeView> class QmlApplicationViewer : public QDeclarativeView { diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri index 6809b644..2feb9e0d 100644 --- a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri @@ -4,7 +4,7 @@ # It is recommended not to modify this file, since newer versions of Qt Creator # may offer an updated version of it. -QT += declarative +QT += quick1 SOURCES += $$PWD/qmlapplicationviewer.cpp HEADERS += $$PWD/qmlapplicationviewer.h |