mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
qt: rebuild (call runtime.LockOSThread in QApplication ctors)
This commit is contained in:
parent
fe6e9ce30b
commit
5955fdb6ef
@ -61,6 +61,9 @@ func NewQApplication(args []string) *QApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QApplication_new(argc, &argv[0])
|
||||
return newQApplication(ret)
|
||||
}
|
||||
@ -74,6 +77,9 @@ func NewQApplication2(args []string, param3 int) *QApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QApplication_new2(argc, &argv[0], (C.int)(param3))
|
||||
return newQApplication(ret)
|
||||
}
|
||||
|
@ -59,6 +59,9 @@ func NewQCoreApplication(args []string) *QCoreApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QCoreApplication_new(argc, &argv[0])
|
||||
return newQCoreApplication(ret)
|
||||
}
|
||||
@ -72,6 +75,9 @@ func NewQCoreApplication2(args []string, param3 int) *QCoreApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3))
|
||||
return newQCoreApplication(ret)
|
||||
}
|
||||
|
@ -53,6 +53,9 @@ func NewQGuiApplication(args []string) *QGuiApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QGuiApplication_new(argc, &argv[0])
|
||||
return newQGuiApplication(ret)
|
||||
}
|
||||
@ -66,6 +69,9 @@ func NewQGuiApplication2(args []string, param3 int) *QGuiApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3))
|
||||
return newQGuiApplication(ret)
|
||||
}
|
||||
|
@ -53,6 +53,9 @@ func NewQApplication(args []string) *QApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QApplication_new(argc, &argv[0])
|
||||
return newQApplication(ret)
|
||||
}
|
||||
@ -66,6 +69,9 @@ func NewQApplication2(args []string, param3 int) *QApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QApplication_new2(argc, &argv[0], (C.int)(param3))
|
||||
return newQApplication(ret)
|
||||
}
|
||||
|
@ -59,6 +59,9 @@ func NewQCoreApplication(args []string) *QCoreApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QCoreApplication_new(argc, &argv[0])
|
||||
return newQCoreApplication(ret)
|
||||
}
|
||||
@ -72,6 +75,9 @@ func NewQCoreApplication2(args []string, param3 int) *QCoreApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3))
|
||||
return newQCoreApplication(ret)
|
||||
}
|
||||
|
@ -53,6 +53,9 @@ func NewQGuiApplication(args []string) *QGuiApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QGuiApplication_new(argc, &argv[0])
|
||||
return newQGuiApplication(ret)
|
||||
}
|
||||
@ -66,6 +69,9 @@ func NewQGuiApplication2(args []string, param3 int) *QGuiApplication {
|
||||
for i := range args {
|
||||
argv[i] = C.CString(args[i])
|
||||
}
|
||||
|
||||
runtime.LockOSThread() // Prevent Go from migrating the main Qt thread
|
||||
|
||||
ret := C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3))
|
||||
return newQGuiApplication(ret)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user