mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
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);
|