Commit 73973641 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

scripting: Deprecate WorkspaceWrapper::screenResized

The WorkspaceWrapper::screenResized() signal relies on the QDesktopWidget
class, which is deprecated. Another issue with that signal is that it
uses integers to represent screens. We need to minimize the amount of int
based screen api and prefer more QScreen or AbstractOutput APIs because
the former get completely broken if the output layout changes.

Since we gain not a lot from porting WorkspaceWrapper::screenResized()
away from QDesktopWidget to something else and we don't use this signal
in any of our scripts, this change deprecates the screenResized signal
in favor of manual tracking of QScreen::geometryChanged signal.
parent d987b94e
......@@ -53,6 +53,7 @@ WorkspaceWrapper::WorkspaceWrapper(QObject* parent) : QObject(parent)
emit numberScreensChanged(currentCount);
// TODO Plasma 6: Remove it.
connect(QApplication::desktop(), &QDesktopWidget::resized, this, &WorkspaceWrapper::screenResized);
const QList<AbstractClient *> clients = ws->allClientList();
......@@ -117,6 +117,8 @@ Q_SIGNALS:
* This signal is emitted when the size of @p screen changes.
* Don't forget to fetch an updated client area.
* @deprecated Use QScreen::geometryChanged signal instead.
void screenResized(int screen);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment