Fix tests segfault

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-10-19 01:10:04 +03:00
parent f60d6e4d48
commit 2030041fcc
6 changed files with 32 additions and 26 deletions

View File

@ -81,6 +81,12 @@ class Index;
#endif
#define APPLICATION (static_cast<Application*>(QCoreApplication::instance()))
// Used for checking if is a test
#if defined(APPLICATION_DYN)
#undef APPLICATION_DYN
#endif
#define APPLICATION_DYN (dynamic_cast<Application*>(QCoreApplication::instance()))
class Application : public QApplication {
// friends for the purpose of limiting access to deprecated stuff
Q_OBJECT