mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Use Window::Controller to manage MainWindow.
This commit is contained in:
@@ -18,7 +18,7 @@ class MainWindow : public Window::MainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow();
|
||||
explicit MainWindow(not_null<Window::Controller*> controller);
|
||||
|
||||
void psFirstShow();
|
||||
void psInitSysMenu();
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
|
||||
~MainWindow();
|
||||
|
||||
class Private;
|
||||
void updateWindowIcon() override;
|
||||
|
||||
public slots:
|
||||
void psShowTrayMenu();
|
||||
@@ -56,7 +56,6 @@ protected:
|
||||
void handleActiveChangedHook() override;
|
||||
void stateChangedHook(Qt::WindowState state) override;
|
||||
void initHook() override;
|
||||
void updateWindowIcon() override;
|
||||
void titleVisibilityChangedHook() override;
|
||||
void unreadCounterChangedHook() override;
|
||||
|
||||
@@ -83,13 +82,15 @@ protected:
|
||||
void closeWithoutDestroy() override;
|
||||
|
||||
private:
|
||||
class Private;
|
||||
friend class Private;
|
||||
|
||||
void initTouchBar();
|
||||
void hideAndDeactivate();
|
||||
void createGlobalMenu();
|
||||
void updateTitleCounter();
|
||||
void updateIconCounters();
|
||||
|
||||
friend class Private;
|
||||
std::unique_ptr<Private> _private;
|
||||
|
||||
mutable bool psIdle;
|
||||
|
@@ -381,8 +381,9 @@ MainWindow::Private::~Private() {
|
||||
[_observer release];
|
||||
}
|
||||
|
||||
MainWindow::MainWindow()
|
||||
: _private(std::make_unique<Private>(this)) {
|
||||
MainWindow::MainWindow(not_null<Window::Controller*> controller)
|
||||
: Window::MainWindow(controller)
|
||||
, _private(std::make_unique<Private>(this)) {
|
||||
#ifndef OS_MAC_OLD
|
||||
auto forceOpenGL = std::make_unique<QOpenGLWidget>(this);
|
||||
#endif // !OS_MAC_OLD
|
||||
|
Reference in New Issue
Block a user