File indexing completed on 2025-01-05 04:59:44

0001 /*
0002  * SPDX-FileCopyrightText: 2014 Kevin Ottens <ervin@kde.org>
0003  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004  */
0005 
0006 
0007 
0008 #ifndef PRESENTATION_METATYPES_H
0009 #define PRESENTATION_METATYPES_H
0010 
0011 #include <QAbstractItemModel>
0012 #include <QMetaType>
0013 #include <QSharedPointer>
0014 
0015 typedef QSharedPointer<QObject> QObjectPtr;
0016 typedef QList<QObjectPtr> QObjectPtrList;
0017 
0018 namespace Presentation {
0019 
0020 namespace MetaTypes
0021 {
0022     void registerAll();
0023 }
0024 
0025 }
0026 
0027 // cppcheck's parser somehow confuses it for a C-cast
0028 // cppcheck-suppress cstyleCast
0029 Q_DECLARE_METATYPE(QAbstractItemModel*)
0030 
0031 Q_DECLARE_METATYPE(QObjectPtr)
0032 Q_DECLARE_METATYPE(QObjectPtrList)
0033 
0034 #endif // PRESENTATION_METATYPES_H