Created
February 4, 2013 21:37
-
-
Save rafaelbrandao/4709929 to your computer and use it in GitHub Desktop.
snowshoe needs to explicitly add an import path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/desktop/BrowserWindow.cpp b/src/desktop/BrowserWindow.cpp | |
index ccf284e..f91a854 100644 | |
--- a/src/desktop/BrowserWindow.cpp | |
+++ b/src/desktop/BrowserWindow.cpp | |
@@ -33,6 +33,7 @@ | |
#include <QtQml/QQmlProperty> | |
#include <QtQuick/QQuickItem> | |
#include <QtGui/private/qguiapplication_p.h> | |
+#include <QDebug> | |
BrowserWindow::BrowserWindow(const QStringList& arguments) | |
: m_urlsFromCommandLine(arguments) | |
@@ -151,6 +152,9 @@ void BrowserWindow::setupDeclarativeEnvironment() | |
context->setContextProperty("UrlTools", new UrlTools(this)); | |
context->setContextProperty("StateTracker", &m_stateTracker); | |
+ QString importPath = qgetenv("QML_IMPORT_PATH"); | |
+ qDebug() << "Snowshoe desktop version is using the import path version: " << importPath; | |
+ engine()->addImportPath(importPath); | |
QObject::connect(engine(), SIGNAL(quit()), qApp, SLOT(quit())); | |
setResizeMode(QQuickView::SizeRootObjectToView); | |
diff --git a/src/mobile/BrowserWindowMobile.cpp b/src/mobile/BrowserWindowMobile.cpp | |
index 82f36aa..ba8319d 100644 | |
--- a/src/mobile/BrowserWindowMobile.cpp | |
+++ b/src/mobile/BrowserWindowMobile.cpp | |
@@ -26,6 +26,7 @@ | |
#include <QtQml/QQmlContext> | |
#include <QtQml/QQmlEngine> | |
#include <QtQuick/QQuickItem> | |
+#include <QDebug> | |
BrowserWindowMobile::BrowserWindowMobile() | |
: m_browserView(0) | |
@@ -47,6 +48,10 @@ void BrowserWindowMobile::setupDeclarativeEnvironment() | |
context->setContextProperty("TabsModel", new TabsModel(this)); | |
context->setContextProperty("UrlTools", new UrlTools(this)); | |
+ QString importPath = qgetenv("QML_IMPORT_PATH"); | |
+ qDebug() << "Snowshoe mobile version is using the import path version: " << importPath; | |
+ engine()->addImportPath(importPath); | |
+ | |
QObject::connect(engine(), SIGNAL(quit()), qApp, SLOT(quit())); | |
setResizeMode(QQuickView::SizeRootObjectToView); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment