Port away from Controller::saveWindowGeometry

This commit is contained in:
Tobias Fella
2024-01-07 19:38:32 +01:00
parent 51f7de117d
commit 9e2bf0da26
4 changed files with 3 additions and 11 deletions

View File

@@ -338,11 +338,6 @@ void Controller::setActiveConnection(NeoChatConnection *connection)
Q_EMIT activeConnectionChanged();
}
void Controller::saveWindowGeometry()
{
WindowController::instance().saveGeometry();
}
void Controller::forceRefreshTextDocument(QQuickTextDocument *textDocument, QQuickItem *item)
{
// HACK: Workaround bug QTBUG 93281

View File

@@ -136,7 +136,4 @@ Q_SIGNALS:
void activeConnectionChanged();
void userConsentRequired(QUrl url);
void accountsLoadingChanged();
public Q_SLOTS:
void saveWindowGeometry();
};

View File

@@ -86,7 +86,7 @@ Kirigami.ApplicationWindow {
Timer {
id: saveWindowGeometryTimer
interval: 1000
onTriggered: Controller.saveWindowGeometry()
onTriggered: WindowController.saveGeometry()
}
Connections {
@@ -94,7 +94,7 @@ Kirigami.ApplicationWindow {
enabled: false // Disable on startup to avoid writing wrong values if the window is hidden
target: root
function onClosing() { Controller.saveWindowGeometry(); }
function onClosing() { WindowController.saveGeometry(); }
function onWidthChanged() { saveWindowGeometryTimer.restart(); }
function onHeightChanged() { saveWindowGeometryTimer.restart(); }
function onXChanged() { saveWindowGeometryTimer.restart(); }

View File

@@ -52,7 +52,7 @@ public:
/**
* @brief Save the current window geometry.
*/
void saveGeometry();
Q_INVOKABLE void saveGeometry();
/**
* @brief Show the window and raise to the top.