File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
20
20
#include < QApplication>
21
+ #include < QPointer>
21
22
22
23
#include < libaudcore/i18n.h>
23
24
#include < libaudcore/plugin.h>
29
30
#include " main_window.h"
30
31
#include " settings.h"
31
32
33
+ static QPointer<MainWindow> window;
34
+
32
35
class QtUI : public audqt ::QtIfacePlugin
33
36
{
34
- private:
35
- MainWindow * window = nullptr ;
36
-
37
37
public:
38
38
constexpr QtUI ()
39
39
: audqt::QtIfacePlugin(
@@ -50,12 +50,7 @@ class QtUI : public audqt::QtIfacePlugin
50
50
return true ;
51
51
}
52
52
53
- void cleanup ()
54
- {
55
- delete window;
56
- window = nullptr ;
57
- audqt::cleanup ();
58
- }
53
+ void cleanup () { audqt::cleanup (); }
59
54
60
55
void run () { audqt::run (); }
61
56
@@ -73,11 +68,7 @@ class QtUI : public audqt::QtIfacePlugin
73
68
}
74
69
}
75
70
76
- void quit ()
77
- {
78
- window->deleteLater ();
79
- window = nullptr ;
80
- }
71
+ void quit () { window->deleteLater (); }
81
72
};
82
73
83
74
EXPORT QtUI aud_plugin_instance;
You can’t perform that action at this time.
0 commit comments