Notify about update right after the start

This commit is contained in:
Michal Horejsek
2021-02-01 13:22:26 +01:00
parent 6d9d5f35ca
commit bcef1c36ba
4 changed files with 15 additions and 12 deletions

View File

@ -109,10 +109,6 @@ func New(
// Loop function for Import-Export interface. It runs QtExecute in main thread
// with no additional function.
func (f *FrontendQt) Loop() (err error) {
go func() {
defer f.panicHandler.HandlePanic()
f.watchEvents()
}()
err = f.QtExecute(func(f *FrontendQt) error { return nil })
return err
}
@ -247,6 +243,11 @@ func (f *FrontendQt) QtExecute(Procedure func(*FrontendQt) error) error {
f.Qml.SetIsAutoUpdate(false)
}
go func() {
defer f.panicHandler.HandlePanic()
f.watchEvents()
}()
// Loop
if ret := gui.QGuiApplication_Exec(); ret != 0 {
//err := errors.New(errors.ErrQApplication, "Event loop ended with return value: %v", string(ret))