Other: small fixes on devel-facelift

This commit is contained in:
Alexander Bilyak
2021-10-04 17:36:32 +00:00
committed by Jakub
parent d11cf57879
commit 3601adcae6
5 changed files with 7 additions and 122 deletions

View File

@ -21,12 +21,13 @@ package qt
import (
"errors"
"os"
qmlLog "github.com/ProtonMail/proton-bridge/internal/frontend/qt/log"
"github.com/therecipe/qt/core"
"github.com/therecipe/qt/qml"
"github.com/therecipe/qt/quickcontrols2"
"github.com/therecipe/qt/widgets"
"os"
)
func (f *FrontendQt) initiateQtApplication() error {
@ -50,7 +51,6 @@ func (f *FrontendQt) initiateQtApplication() error {
f.qml = NewQMLBackend(f.engine)
f.qml.setup(f)
f.engine.RootContext().SetContextProperty("go", f.qml)
f.engine.AddImportPath("qrc:/qml/")
f.engine.AddPluginPath("qrc:/qml/")
@ -67,5 +67,7 @@ func (f *FrontendQt) initiateQtApplication() error {
return errors.New("QML not loaded properly")
}
f.engine.RootObjects()[0].SetProperty("backend", f.qml.ToVariant())
return nil
}