mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
MainWindow cleanups.
All MainWindow child widgets use constructors with 'parent' parameter that allows parent widget to delete them at its destruction. Some other MainWindow cleanup code replaced to destructor. Application manages MainWindow instance and remove it when aboutToQuit() signal emitted.
This commit is contained in:
parent
0c50a8b98b
commit
458b216b74
5 changed files with 70 additions and 131 deletions
|
@ -48,7 +48,6 @@ class Application : public BaseApplication
|
|||
|
||||
public:
|
||||
Application(const QString &id, int &argc, char **argv);
|
||||
~Application();
|
||||
|
||||
#if (defined(Q_OS_WIN) && !defined(DISABLE_GUI))
|
||||
bool isRunning();
|
||||
|
@ -66,11 +65,12 @@ protected:
|
|||
|
||||
private slots:
|
||||
void processMessage(const QString &message);
|
||||
void cleanup();
|
||||
|
||||
private:
|
||||
bool m_running;
|
||||
#ifndef DISABLE_GUI
|
||||
MainWindow *m_window;
|
||||
QPointer<MainWindow> m_window;
|
||||
#endif
|
||||
QTranslator m_qtTranslator;
|
||||
QTranslator m_translator;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue