Changelog for 0.0.8
[harmattan/cameraplus] / declarative / plugin.h
index 013ab67..0bb4fae 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
 #ifndef PLUGIN_H
 #define PLUGIN_H
 
+#if defined(QT4)
 #include <QDeclarativeExtensionPlugin>
+#elif defined(QT5)
+#include <QQmlExtensionPlugin>
+#endif
 
+#if defined(QT4)
 class Plugin : public QDeclarativeExtensionPlugin {
+#elif defined(QT5)
+class Plugin : public QQmlExtensionPlugin {
+#endif
+
   Q_OBJECT
 
+#if defined(QT5)
+  Q_PLUGIN_METADATA(IID "QtCamera");
+#endif
+
 public:
   Plugin(QObject *parent = 0);
   ~Plugin();
 
+#if defined(QT4)
   void initializeEngine(QDeclarativeEngine *engine, const char *uri);
+#elif defined(QT5)
+  void initializeEngine(QQmlEngine *engine, const char *uri);
+#endif
+
   void registerTypes(const char *uri);
 };