/*!
* 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
#include <QSparqlConnection>
#include <QSparqlQuery>
#include <QUrl>
+#if defined(QT4)
#include <QDeclarativeInfo>
+#elif defined(QT5)
+#include <QQmlInfo>
+#endif
#include <QSparqlResult>
#include <QScopedPointer>
#include <QSparqlError>
return;
}
- m_connection = new QSparqlConnection("QTRACKER_DIRECT", QSparqlConnectionOptions(), this);
+ if (active) {
+ m_connection = new QSparqlConnection("QTRACKER_DIRECT", QSparqlConnectionOptions(), this);
+ }
+ else {
+ m_connection->deleteLater();
+ m_connection = 0;
+ }
emit activeChanged();
}