[SailfishDevel] Why this error now?
sfietkonstantin at free.fr
sfietkonstantin at free.fr
Tue Jul 8 12:16:13 UTC 2014
A wild guess:
When debugging, you have QML debug enabled, that causes including of <QtQuick>, that itself includes the <QQmlContext> header ?
----- Mail original -----
De: "Chris Walker" <cdw_nokiaqt at the-walker-household.co.uk>
À: devel at lists.sailfishos.org
Envoyé: Mardi 8 Juillet 2014 14:13:01
Objet: [SailfishDevel] Why this error now?
I'm trying to deploy my app to my phone and on the emulator it works -
in debug mode. But as soon as I switch to release mode, it keels over.
Here's the cpp code where it fails :-
#ifdef QT_QML_DEBUG
#include <QtQuick>
#endif
#include <QGuiApplication>
#include <QQuickView>
#include <sailfishapp.h>
#include "DatabaseManager.h"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc,
argv)); QScopedPointer<QQuickView> view(SailfishApp::createView());
DatabaseManager* db = new DatabaseManager();
db->open();
view->rootContext()->setContextProperty("db", db);
view->setSource(SailfishApp::pathTo("qml/beertent.qml"));
view->show();
return app->exec();
}
The error is invalid use of incomplete type 'struct QQmlContext'
I can easily fix it by adding #include <QQmlContext> and it all then
works as expected but my query is this. Why does it work in debug mode
with no errors but fails in release mode?
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
More information about the Devel
mailing list