From a7d02916ff844f6b86e54ed269bf14b470803e0c Mon Sep 17 00:00:00 2001 From: Karl Robillard Date: Thu, 29 Feb 2024 15:12:29 -0500 Subject: [PATCH] guiqt.cpp: Replace gQApp with Qt provided qApp. --- src/platform/guiqt.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/platform/guiqt.cpp b/src/platform/guiqt.cpp index dcb1f13b..ad794935 100644 --- a/src/platform/guiqt.cpp +++ b/src/platform/guiqt.cpp @@ -20,12 +20,6 @@ #include -#include - -// FOR TESTING -#include - - namespace SolveSpace { namespace Platform { @@ -950,10 +944,8 @@ void OpenInBrowser(const std::string& url) { } } -QApplication* gQApp; - std::vector InitGui(int argc, char** argv) { - gQApp = new QApplication(argc, argv); + new QApplication(argc, argv); std::vector args = SolveSpace::Platform::InitCli(argc, argv); return args; } @@ -967,18 +959,17 @@ void RunGui() { std::cout << "failed to open qss" << std::endl; } else { QString StyleSheet = QLatin1String(File.readAll()); - gQApp->setStyleSheet(StyleSheet); + qApp->setStyleSheet(StyleSheet); } - gQApp->exec(); + qApp->exec(); } void ExitGui() { -// gQApp->exit; - gQApp->quit(); + qApp->quit(); } void ClearGui() { - delete gQApp; + delete qApp; } }