diff options
author | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2010-05-31 10:23:12 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2010-05-31 10:23:12 (GMT) |
commit | 3860340918846b5b156ba8e018d12cfe90461208 (patch) | |
tree | 2df5c1950fab67941da4e171afe915f538320a6e | |
parent | 3026f8ce811e8cebc48e49f732344cc13e107cc6 (diff) | |
download | Qt-3860340918846b5b156ba8e018d12cfe90461208.zip Qt-3860340918846b5b156ba8e018d12cfe90461208.tar.gz Qt-3860340918846b5b156ba8e018d12cfe90461208.tar.bz2 |
Fix QT_NO_DIRMODEL build error in QtDeclarative.
Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
Merge-request: 652
Merge-request: 652
Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
-rw-r--r-- | src/imports/folderlistmodel/plugin.cpp | 2 | ||||
-rw-r--r-- | src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp | 4 | ||||
-rw-r--r-- | src/imports/folderlistmodel/qdeclarativefolderlistmodel.h | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/imports/folderlistmodel/plugin.cpp b/src/imports/folderlistmodel/plugin.cpp index 555df3c..1ec6106 100644 --- a/src/imports/folderlistmodel/plugin.cpp +++ b/src/imports/folderlistmodel/plugin.cpp @@ -53,7 +53,9 @@ public: virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.folderlistmodel")); +#ifndef QT_NO_DIRMODEL qmlRegisterType<QDeclarativeFolderListModel>(uri,1,0,"FolderListModel"); +#endif } }; //![class decl] diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index fccb9d4..9cf81ca 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -45,6 +45,8 @@ #include <QDebug> #include <qdeclarativecontext.h> +#ifndef QT_NO_DIRMODEL + QT_BEGIN_NAMESPACE class QDeclarativeFolderListModelPrivate @@ -397,3 +399,5 @@ void QDeclarativeFolderListModel::setShowOnlyReadable(bool on) //![code] QT_END_NAMESPACE + +#endif // QT_NO_DIRMODEL diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h index ea7d701..1bab5f84 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h @@ -47,6 +47,8 @@ #include <QUrl> #include <QAbstractListModel> +#ifndef QT_NO_DIRMODEL + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -152,4 +154,6 @@ QML_DECLARE_TYPE(QDeclarativeFolderListModel) QT_END_HEADER +#endif // QT_NO_DIRMODEL + #endif // QDECLARATIVEFOLDERLISTMODEL_H |