From 57ba98d24f3cb953b59aa33fd7c433b82d47722f Mon Sep 17 00:00:00 2001 From: Debao Zhang <dbzhang800@gmail.com> Date: Sun, 22 Apr 2012 00:11:33 -0700 Subject: [PATCH] Stop using deperacated header files. Change-Id: I0c600fe57dc9e6a61d348cd6f4fc7dcf21fa2b70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> --- src/qdeclarativefolderlistmodel.cpp | 2 +- src/qdeclarativefolderlistmodel.h | 6 +++--- src/qdesktopitem.h | 2 +- src/qrangemodel.h | 2 +- src/qstyleplugin.cpp | 17 +++++++---------- src/qstyleplugin.h | 6 +++--- src/qtsplitterbase.h | 2 +- src/src.pro | 2 +- 8 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/qdeclarativefolderlistmodel.cpp b/src/qdeclarativefolderlistmodel.cpp index b1c6fb418..62c66a6a2 100644 --- a/src/qdeclarativefolderlistmodel.cpp +++ b/src/qdeclarativefolderlistmodel.cpp @@ -43,7 +43,7 @@ #include "qdeclarativefolderlistmodel.h" #include <QtWidgets/QDirModel> #include <QDebug> -#include <qdeclarativecontext.h> +#include <qqmlcontext.h> #ifndef QT_NO_DIRMODEL diff --git a/src/qdeclarativefolderlistmodel.h b/src/qdeclarativefolderlistmodel.h index 53ea3f1b1..599329113 100644 --- a/src/qdeclarativefolderlistmodel.h +++ b/src/qdeclarativefolderlistmodel.h @@ -42,7 +42,7 @@ #ifndef QDECLARATIVEFOLDERLISTMODEL_H #define QDECLARATIVEFOLDERLISTMODEL_H -#include <qdeclarative.h> +#include <qqml.h> #include <QStringList> #include <QUrl> #include <QAbstractListModel> @@ -58,10 +58,10 @@ class QModelIndex; class QDeclarativeFolderListModelPrivate; -class QDeclarativeFolderListModel : public QAbstractListModel, public QDeclarativeParserStatus +class QDeclarativeFolderListModel : public QAbstractListModel, public QQmlParserStatus { Q_OBJECT - Q_INTERFACES(QDeclarativeParserStatus) + Q_INTERFACES(QQmlParserStatus) Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged) Q_PROPERTY(QUrl parentFolder READ parentFolder NOTIFY folderChanged) diff --git a/src/qdesktopitem.h b/src/qdesktopitem.h index 6ab222935..44a6feeac 100644 --- a/src/qdesktopitem.h +++ b/src/qdesktopitem.h @@ -28,7 +28,7 @@ #define QDESKTOPITEM_H #include <QtWidgets/QDesktopWidget> -#include <QtDeclarative> +#include <QtQml> class QDesktopItem : public QObject { diff --git a/src/qrangemodel.h b/src/qrangemodel.h index 66f759814..d22c492ca 100644 --- a/src/qrangemodel.h +++ b/src/qrangemodel.h @@ -30,7 +30,7 @@ #include <QtCore/qobject.h> //#include <QtGui/qgraphicsitem.h> #include <QtWidgets/qabstractslider.h> -#include <QtDeclarative/qdeclarative.h> +#include <QtQml/qqml.h> class QRangeModelPrivate; diff --git a/src/qstyleplugin.cpp b/src/qstyleplugin.cpp index e1f748942..c2d8b6e3b 100644 --- a/src/qstyleplugin.cpp +++ b/src/qstyleplugin.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include <qdeclarative.h> +#include <qqml.h> #include "qstyleplugin.h" #include "qstyleitem.h" #include "qrangemodel.h" @@ -46,22 +46,19 @@ #include "qcursorarea.h" #include "qtooltiparea.h" #include "qtsplitterbase.h" -#include <qdeclarativeextensionplugin.h> +#include <qqmlextensionplugin.h> -#include <qdeclarativeengine.h> -#include <qdeclarative.h> -//#include <qdeclarativeitem.h> -#include <qdeclarativeimageprovider.h> -//x#include <qdeclarativeview.h> +#include <qqmlengine.h> +#include <qquickimageprovider.h> #include <QtWidgets/QApplication> #include <QImage> // Load icons from desktop theme -class DesktopIconProvider : public QDeclarativeImageProvider +class DesktopIconProvider : public QQuickImageProvider { public: DesktopIconProvider() - : QDeclarativeImageProvider(QDeclarativeImageProvider::Pixmap) + : QQuickImageProvider(QQuickImageProvider::Pixmap) { } @@ -92,7 +89,7 @@ void StylePlugin::registerTypes(const char *uri) qmlRegisterUncreatableType<QDesktopItem>(uri, 0,2,"Desktop", QLatin1String("Do not create objects of type Desktop")); } -void StylePlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri) +void StylePlugin::initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(uri); engine->addImageProvider("desktoptheme", new DesktopIconProvider); diff --git a/src/qstyleplugin.h b/src/qstyleplugin.h index 28a08b1b8..99decb21d 100644 --- a/src/qstyleplugin.h +++ b/src/qstyleplugin.h @@ -40,18 +40,18 @@ #ifndef STYLEPLUGIN_H #define STYLEPLUGIN_H -#include <QDeclarativeExtensionPlugin> +#include <QQmlExtensionPlugin> #include <QtCore/QTimer> #include <QtWidgets/QFileSystemModel> #include "qdeclarativefolderlistmodel.h" -class StylePlugin : public QDeclarativeExtensionPlugin +class StylePlugin : public QQmlExtensionPlugin { Q_OBJECT public: void registerTypes(const char *uri); - void initializeEngine(QDeclarativeEngine *engine, const char *uri); + void initializeEngine(QQmlEngine *engine, const char *uri); }; #endif // STYLEPLUGIN_H diff --git a/src/qtsplitterbase.h b/src/qtsplitterbase.h index c5507e2f1..603d88183 100644 --- a/src/qtsplitterbase.h +++ b/src/qtsplitterbase.h @@ -1,7 +1,7 @@ #ifndef QTSPLITTERBASE_H #define QTSPLITTERBASE_H -#include <QtDeclarative> +#include <QtQml> #include <QtQuick> diff --git a/src/src.pro b/src/src.pro index c3448d8b0..90f4ff0ad 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += qml QT += quick QT += script QT += widgets -- GitLab