Changeset View
Changeset View
Standalone View
Standalone View
src/qml/experimental/baloomonitorplugin.cpp
Show All 13 Lines | |||||
14 | * You should have received a copy of the GNU Library General Public | 14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include "baloomonitorplugin.h" | 20 | #include "baloomonitorplugin.h" | ||
21 | #include "monitor.h" | 21 | #include "monitor.h" | ||
22 | #include "indexerstate.h" | ||||
22 | 23 | | |||
23 | #include <QtQml> | 24 | #include <QtQml> | ||
24 | 25 | | |||
25 | void BalooMonitorPlugin::registerTypes(const char *uri) | 26 | void BalooMonitorPlugin::registerTypes(const char *uri) | ||
26 | { | 27 | { | ||
27 | Q_ASSERT(uri == QLatin1String("org.kde.baloo.experimental")); | 28 | Q_ASSERT(uri == QLatin1String("org.kde.baloo.experimental")); | ||
28 | 29 | | |||
29 | qmlRegisterType<Baloo::Monitor>(uri, 0, 1, "Monitor"); | 30 | qmlRegisterType<Baloo::Monitor>(uri, 0, 1, "Monitor"); | ||
31 | qmlRegisterUncreatableMetaObject(Baloo::staticMetaObject, uri, 0, 1, "Baloo", "Error: only enums"); | ||||
broulik: I have to also add a
```
qRegisterMetaType<Baloo::IndexerState>();
```
in order to be able to… | |||||
30 | } | 32 | } | ||
31 | |
I have to also add a
in order to be able to use that type in a Q_PROPERTY. How odd.