Gui: Properly use the standarditemmodel feature
Require it in the headers and exclude the implementation from the build if disabled. Change-Id: Ida3303f8595f47b469e92d68e8bccc3957d943b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
f4b6ea2ae2
commit
dd74f5d347
@ -1,3 +1,5 @@
|
|||||||
|
!qtConfig(standarditemmodel): return()
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
itemmodels/qstandarditemmodel.h \
|
itemmodels/qstandarditemmodel.h \
|
||||||
itemmodels/qstandarditemmodel_p.h \
|
itemmodels/qstandarditemmodel_p.h \
|
||||||
|
@ -39,8 +39,6 @@
|
|||||||
|
|
||||||
#include "qstandarditemmodel.h"
|
#include "qstandarditemmodel.h"
|
||||||
|
|
||||||
#ifndef QT_NO_STANDARDITEMMODEL
|
|
||||||
|
|
||||||
#include <QtCore/qdatetime.h>
|
#include <QtCore/qdatetime.h>
|
||||||
#include <QtCore/qlist.h>
|
#include <QtCore/qlist.h>
|
||||||
#include <QtCore/qmap.h>
|
#include <QtCore/qmap.h>
|
||||||
@ -3259,5 +3257,3 @@ bool QStandardItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#include "moc_qstandarditemmodel.cpp"
|
#include "moc_qstandarditemmodel.cpp"
|
||||||
|
|
||||||
#endif // QT_NO_STANDARDITEMMODEL
|
|
||||||
|
@ -49,11 +49,10 @@
|
|||||||
#include <QtCore/qdatastream.h>
|
#include <QtCore/qdatastream.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(standarditemmodel);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#ifndef QT_NO_STANDARDITEMMODEL
|
|
||||||
|
|
||||||
template <class T> class QList;
|
template <class T> class QList;
|
||||||
|
|
||||||
class QStandardItemModel;
|
class QStandardItemModel;
|
||||||
@ -454,8 +453,6 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &in, QStandardItem &item);
|
|||||||
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &out, const QStandardItem &item);
|
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &out, const QStandardItem &item);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // QT_NO_STANDARDITEMMODEL
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif //QSTANDARDITEMMODEL_H
|
#endif //QSTANDARDITEMMODEL_H
|
||||||
|
@ -54,8 +54,6 @@
|
|||||||
#include <QtGui/private/qtguiglobal_p.h>
|
#include <QtGui/private/qtguiglobal_p.h>
|
||||||
#include "private/qabstractitemmodel_p.h"
|
#include "private/qabstractitemmodel_p.h"
|
||||||
|
|
||||||
#ifndef QT_NO_STANDARDITEMMODEL
|
|
||||||
|
|
||||||
#include <QtCore/qlist.h>
|
#include <QtCore/qlist.h>
|
||||||
#include <QtCore/qpair.h>
|
#include <QtCore/qpair.h>
|
||||||
#include <QtCore/qstack.h>
|
#include <QtCore/qstack.h>
|
||||||
@ -63,6 +61,8 @@
|
|||||||
#include <QtCore/qvector.h>
|
#include <QtCore/qvector.h>
|
||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(standarditemmodel);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QStandardItemData
|
class QStandardItemData
|
||||||
@ -224,6 +224,4 @@ public:
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QT_NO_STANDARDITEMMODEL
|
|
||||||
|
|
||||||
#endif // QSTANDARDITEMMODEL_P_H
|
#endif // QSTANDARDITEMMODEL_P_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user