1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-03 07:19:03 +01:00

Merge pull request #523

8c17a8c fix build with scanner (MoroccanMalinois)
This commit is contained in:
Riccardo Spagni 2017-03-03 16:28:31 +02:00
commit e4bb7bed98
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -189,6 +189,10 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty("defaultAccountName", accountName);
engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath());
// Load main window (context properties needs to be defined obove this line)
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
QObject *rootObject = engine.rootObjects().first();
bool builtWithScanner = false;
#ifdef WITH_SCANNER
builtWithScanner = true;
@ -199,10 +203,6 @@ int main(int argc, char *argv[])
#endif
engine.rootContext()->setContextProperty("builtWithScanner", builtWithScanner);
// Load main window (context properties needs to be defined obove this line)
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
QObject *rootObject = engine.rootObjects().first();
QObject::connect(eventFilter, SIGNAL(sequencePressed(QVariant,QVariant)), rootObject, SLOT(sequencePressed(QVariant,QVariant)));
QObject::connect(eventFilter, SIGNAL(sequenceReleased(QVariant,QVariant)), rootObject, SLOT(sequenceReleased(QVariant,QVariant)));
QObject::connect(eventFilter, SIGNAL(mousePressed(QVariant,QVariant,QVariant)), rootObject, SLOT(mousePressed(QVariant,QVariant,QVariant)));