-
This commit is contained in:
@@ -24,6 +24,17 @@ uint64_t current_ms() {
|
||||
|
||||
Rktwebview_qt *handler = nullptr;
|
||||
|
||||
void destroyApp()
|
||||
{
|
||||
if (handler != nullptr) {
|
||||
QCoreApplication *app = QApplication::instance();
|
||||
if (app != nullptr) {
|
||||
app->exit(0);
|
||||
delete app;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rkt_webview_cleanup()
|
||||
{
|
||||
if (handler != nullptr) {
|
||||
@@ -58,6 +69,7 @@ void rkt_webview_init()
|
||||
//fprintf(stderr, "init: handler = %p\n", handler);
|
||||
handler = new Rktwebview_qt();
|
||||
//fprintf(stderr, "init: handler = %p\n", handler);
|
||||
atexit(destroyApp);
|
||||
}
|
||||
|
||||
if (handler->app() == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user