Skip to content

Commit

Permalink
Merge pull request #7199 from nextcloud/bugfix/startupQmlOnWindows
Browse files Browse the repository at this point in the history
Bugfix/startup qml on windows
  • Loading branch information
mgallien authored Sep 25, 2024
2 parents ca7c7cb + 92f7247 commit ea27b29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<file>src/gui/filedetails/ShareDetailsPage.qml</file>
<file>src/gui/filedetails/ShareeSearchField.qml</file>
<file>src/gui/filedetails/ShareView.qml</file>
<file>src/gui/tray/Window.qml</file>
<file>src/gui/tray/MainWindow.qml</file>
<file>src/gui/tray/UserLine.qml</file>
<file>src/gui/tray/HeaderButton.qml</file>
<file>src/gui/tray/SyncStatus.qml</file>
Expand Down
3 changes: 2 additions & 1 deletion src/gui/systray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ void Systray::setTrayEngine(QQmlApplicationEngine *trayEngine)

_trayEngine->setNetworkAccessManagerFactory(&_accessManagerFactory);

_trayEngine->addImportPath(QCoreApplication::applicationDirPath() + "/qml");
_trayEngine->addImportPath("qrc:/qml/theme");
_trayEngine->addImageProvider("avatars", new ImageProvider);
_trayEngine->addImageProvider(QLatin1String("svgimage-custom-color"), new OCC::Ui::SvgImageProvider);
Expand Down Expand Up @@ -119,7 +120,7 @@ void Systray::create()
_trayEngine->rootContext()->setContextProperty("activityModel", &_fakeActivityModel);
}

QQmlComponent trayWindowComponent(trayEngine(), QStringLiteral("qrc:/qml/src/gui/tray/Window.qml"));
QQmlComponent trayWindowComponent(trayEngine(), QStringLiteral("qrc:/qml/src/gui/tray/MainWindow.qml"));

if(trayWindowComponent.isError()) {
qCWarning(lcSystray) << trayWindowComponent.errorString();
Expand Down
3 changes: 2 additions & 1 deletion src/gui/tray/Window.qml → src/gui/tray/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
* for more details.
*/

import QtQml
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Window
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Qt.labs.platform as NativeDialogs
Expand Down

0 comments on commit ea27b29

Please sign in to comment.