Port away from Controller::saveWindowGeometry
This commit is contained in:
@@ -338,11 +338,6 @@ void Controller::setActiveConnection(NeoChatConnection *connection)
|
|||||||
Q_EMIT activeConnectionChanged();
|
Q_EMIT activeConnectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller::saveWindowGeometry()
|
|
||||||
{
|
|
||||||
WindowController::instance().saveGeometry();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Controller::forceRefreshTextDocument(QQuickTextDocument *textDocument, QQuickItem *item)
|
void Controller::forceRefreshTextDocument(QQuickTextDocument *textDocument, QQuickItem *item)
|
||||||
{
|
{
|
||||||
// HACK: Workaround bug QTBUG 93281
|
// HACK: Workaround bug QTBUG 93281
|
||||||
|
|||||||
@@ -136,7 +136,4 @@ Q_SIGNALS:
|
|||||||
void activeConnectionChanged();
|
void activeConnectionChanged();
|
||||||
void userConsentRequired(QUrl url);
|
void userConsentRequired(QUrl url);
|
||||||
void accountsLoadingChanged();
|
void accountsLoadingChanged();
|
||||||
|
|
||||||
public Q_SLOTS:
|
|
||||||
void saveWindowGeometry();
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ Kirigami.ApplicationWindow {
|
|||||||
Timer {
|
Timer {
|
||||||
id: saveWindowGeometryTimer
|
id: saveWindowGeometryTimer
|
||||||
interval: 1000
|
interval: 1000
|
||||||
onTriggered: Controller.saveWindowGeometry()
|
onTriggered: WindowController.saveGeometry()
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
@@ -94,7 +94,7 @@ Kirigami.ApplicationWindow {
|
|||||||
enabled: false // Disable on startup to avoid writing wrong values if the window is hidden
|
enabled: false // Disable on startup to avoid writing wrong values if the window is hidden
|
||||||
target: root
|
target: root
|
||||||
|
|
||||||
function onClosing() { Controller.saveWindowGeometry(); }
|
function onClosing() { WindowController.saveGeometry(); }
|
||||||
function onWidthChanged() { saveWindowGeometryTimer.restart(); }
|
function onWidthChanged() { saveWindowGeometryTimer.restart(); }
|
||||||
function onHeightChanged() { saveWindowGeometryTimer.restart(); }
|
function onHeightChanged() { saveWindowGeometryTimer.restart(); }
|
||||||
function onXChanged() { saveWindowGeometryTimer.restart(); }
|
function onXChanged() { saveWindowGeometryTimer.restart(); }
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Save the current window geometry.
|
* @brief Save the current window geometry.
|
||||||
*/
|
*/
|
||||||
void saveGeometry();
|
Q_INVOKABLE void saveGeometry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Show the window and raise to the top.
|
* @brief Show the window and raise to the top.
|
||||||
|
|||||||
Reference in New Issue
Block a user