2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-29 15:36:08 +00:00

Eliminate the need of Q_OBJECT in main_window_linux and main_window_win

This commit is contained in:
Ilya Fedin
2020-08-28 20:14:19 +04:00
committed by John Preston
parent 612e0d4a10
commit 3c8c059447
5 changed files with 69 additions and 67 deletions

View File

@@ -21,8 +21,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Platform {
class MainWindow : public Window::MainWindow {
Q_OBJECT
public:
explicit MainWindow(not_null<Window::Controller*> controller);
@@ -33,43 +31,12 @@ public:
style::color fg,
bool smallIcon) = 0;
void psShowTrayMenu();
static void LibsLoaded();
~MainWindow();
public slots:
void psShowTrayMenu();
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
void onSNIOwnerChanged(
const QString &service,
const QString &oldOwner,
const QString &newOwner);
void onAppMenuOwnerChanged(
const QString &service,
const QString &oldOwner,
const QString &newOwner);
void psLinuxUndo();
void psLinuxRedo();
void psLinuxCut();
void psLinuxCopy();
void psLinuxPaste();
void psLinuxDelete();
void psLinuxSelectAll();
void psLinuxBold();
void psLinuxItalic();
void psLinuxUnderline();
void psLinuxStrikeOut();
void psLinuxMonospace();
void psLinuxClearFormat();
void onVisibleChanged(bool visible);
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
protected:
void initHook() override;
void unreadCounterChangedHook() override;
@@ -100,6 +67,7 @@ private:
void updateIconCounters();
void updateWaylandDecorationColors();
void handleVisibleChanged(bool visible);
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
StatusNotifierItem *_sniTrayIcon = nullptr;
@@ -131,6 +99,31 @@ private:
void setSNITrayIcon(int counter, bool muted);
void attachToSNITrayIcon();
void handleSNIOwnerChanged(
const QString &service,
const QString &oldOwner,
const QString &newOwner);
void handleAppMenuOwnerChanged(
const QString &service,
const QString &oldOwner,
const QString &newOwner);
void psLinuxUndo();
void psLinuxRedo();
void psLinuxCut();
void psLinuxCopy();
void psLinuxPaste();
void psLinuxDelete();
void psLinuxSelectAll();
void psLinuxBold();
void psLinuxItalic();
void psLinuxUnderline();
void psLinuxStrikeOut();
void psLinuxMonospace();
void psLinuxClearFormat();
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
};