mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user