diff --git a/src/debug/lint.cpp b/src/debug/lint.cpp index 1ec0086f..60d8224f 100644 --- a/src/debug/lint.cpp +++ b/src/debug/lint.cpp @@ -7,10 +7,7 @@ #include #include #include -#include #include -#include -#include #include #include diff --git a/src/wayland/popupanchor.cpp b/src/wayland/popupanchor.cpp index b13fb480..81c1cb1d 100644 --- a/src/wayland/popupanchor.cpp +++ b/src/wayland/popupanchor.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "../core/popupanchor.hpp" #include "../core/types.hpp" diff --git a/src/window/popupwindow.cpp b/src/window/popupwindow.cpp index b355238e..df68474f 100644 --- a/src/window/popupwindow.cpp +++ b/src/window/popupwindow.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include @@ -38,12 +38,11 @@ void ProxyPopupWindow::completeWindow() { void ProxyPopupWindow::postCompleteWindow() { this->updateTransientParent(); } void ProxyPopupWindow::setParentWindow(QObject* parent) { - qWarning() << "PopupWindow.parentWindow is deprecated. Use PopupWindow.anchor.window."; + qmlWarning(this) << "PopupWindow.parentWindow is deprecated. Use PopupWindow.anchor.window."; this->mAnchor.setWindow(parent); } QObject* ProxyPopupWindow::parentWindow() const { - qWarning() << "PopupWindow.parentWindow is deprecated. Use PopupWindow.anchor.window."; return this->mAnchor.window(); } @@ -71,7 +70,7 @@ void ProxyPopupWindow::updateTransientParent() { void ProxyPopupWindow::onParentUpdated() { this->updateTransientParent(); } void ProxyPopupWindow::setScreen(QuickshellScreenInfo* /*unused*/) { - qWarning() << "Cannot set screen of popup window, as that is controlled by the parent window"; + qmlWarning(this) << "Cannot set screen of popup window, as that is controlled by the parent window"; } void ProxyPopupWindow::setVisible(bool visible) { @@ -101,7 +100,7 @@ void ProxyPopupWindow::onVisibleChanged() { } void ProxyPopupWindow::setRelativeX(qint32 x) { - qWarning() << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; + qmlWarning(this) << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; auto rect = this->mAnchor.rect(); if (x == rect.x) return; rect.x = x; @@ -109,12 +108,12 @@ void ProxyPopupWindow::setRelativeX(qint32 x) { } qint32 ProxyPopupWindow::relativeX() const { - qWarning() << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; + qmlWarning(this) << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; return this->mAnchor.rect().x; } void ProxyPopupWindow::setRelativeY(qint32 y) { - qWarning() << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; + qmlWarning(this) << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; auto rect = this->mAnchor.rect(); if (y == rect.y) return; rect.y = y; @@ -122,7 +121,7 @@ void ProxyPopupWindow::setRelativeY(qint32 y) { } qint32 ProxyPopupWindow::relativeY() const { - qWarning() << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; + qmlWarning(this) << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; return this->mAnchor.rect().y; } diff --git a/src/window/popupwindow.hpp b/src/window/popupwindow.hpp index bb245eb8..a1e535f7 100644 --- a/src/window/popupwindow.hpp +++ b/src/window/popupwindow.hpp @@ -30,9 +30,9 @@ /// } /// /// PopupWindow { -/// parentWindow: toplevel -/// relativeX: parentWindow.width / 2 - width / 2 -/// relativeY: parentWindow.height +/// anchor.window: toplevel +/// anchor.rect.x: parentWindow.width / 2 - width / 2 +/// anchor.rect.y: parentWindow.height /// width: 500 /// height: 500 /// visible: true