Error window
This commit is contained in:
parent
09c7d158d1
commit
77fd361c62
@ -1,7 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
@ -31,18 +30,6 @@ func run() error {
|
|||||||
db := utils.NewDatabase()
|
db := utils.NewDatabase()
|
||||||
err := utils.DBSanityCheck(db)
|
err := utils.DBSanityCheck(db)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
engine := qml.NewEngine()
|
|
||||||
component, e := engine.LoadString("local", qmlErr)
|
|
||||||
if e != nil {
|
|
||||||
fmt.Println("err:", err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
win := component.CreateWindow(nil)
|
|
||||||
win.Root().ObjectByName("label").Set("text", err.Error())
|
|
||||||
win.Show()
|
|
||||||
win.Wait()
|
|
||||||
|
|
||||||
ErrorWindow(err)
|
ErrorWindow(err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user