|
3 | 3 | #include <qlogging.h> |
4 | 4 | #include <qnamespace.h> |
5 | 5 | #include <qobject.h> |
6 | | -#include <qquickwindow.h> |
| 6 | +#include <qqmlinfo.h> |
7 | 7 | #include <qtypes.h> |
8 | 8 | #include <qwindow.h> |
9 | 9 |
|
@@ -38,12 +38,11 @@ void ProxyPopupWindow::completeWindow() { |
38 | 38 | void ProxyPopupWindow::postCompleteWindow() { this->updateTransientParent(); } |
39 | 39 |
|
40 | 40 | void ProxyPopupWindow::setParentWindow(QObject* parent) { |
41 | | - qWarning() << "PopupWindow.parentWindow is deprecated. Use PopupWindow.anchor.window."; |
| 41 | + qmlWarning(this) << "PopupWindow.parentWindow is deprecated. Use PopupWindow.anchor.window."; |
42 | 42 | this->mAnchor.setWindow(parent); |
43 | 43 | } |
44 | 44 |
|
45 | 45 | QObject* ProxyPopupWindow::parentWindow() const { |
46 | | - qWarning() << "PopupWindow.parentWindow is deprecated. Use PopupWindow.anchor.window."; |
47 | 46 | return this->mAnchor.window(); |
48 | 47 | } |
49 | 48 |
|
@@ -71,7 +70,7 @@ void ProxyPopupWindow::updateTransientParent() { |
71 | 70 | void ProxyPopupWindow::onParentUpdated() { this->updateTransientParent(); } |
72 | 71 |
|
73 | 72 | void ProxyPopupWindow::setScreen(QuickshellScreenInfo* /*unused*/) { |
74 | | - qWarning() << "Cannot set screen of popup window, as that is controlled by the parent window"; |
| 73 | + qmlWarning(this) << "Cannot set screen of popup window, as that is controlled by the parent window"; |
75 | 74 | } |
76 | 75 |
|
77 | 76 | void ProxyPopupWindow::setVisible(bool visible) { |
@@ -101,28 +100,28 @@ void ProxyPopupWindow::onVisibleChanged() { |
101 | 100 | } |
102 | 101 |
|
103 | 102 | void ProxyPopupWindow::setRelativeX(qint32 x) { |
104 | | - qWarning() << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; |
| 103 | + qmlWarning(this) << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; |
105 | 104 | auto rect = this->mAnchor.rect(); |
106 | 105 | if (x == rect.x) return; |
107 | 106 | rect.x = x; |
108 | 107 | this->mAnchor.setRect(rect); |
109 | 108 | } |
110 | 109 |
|
111 | 110 | qint32 ProxyPopupWindow::relativeX() const { |
112 | | - qWarning() << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; |
| 111 | + qmlWarning(this) << "PopupWindow.relativeX is deprecated. Use PopupWindow.anchor.rect.x."; |
113 | 112 | return this->mAnchor.rect().x; |
114 | 113 | } |
115 | 114 |
|
116 | 115 | void ProxyPopupWindow::setRelativeY(qint32 y) { |
117 | | - qWarning() << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; |
| 116 | + qmlWarning(this) << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; |
118 | 117 | auto rect = this->mAnchor.rect(); |
119 | 118 | if (y == rect.y) return; |
120 | 119 | rect.y = y; |
121 | 120 | this->mAnchor.setRect(rect); |
122 | 121 | } |
123 | 122 |
|
124 | 123 | qint32 ProxyPopupWindow::relativeY() const { |
125 | | - qWarning() << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; |
| 124 | + qmlWarning(this) << "PopupWindow.relativeY is deprecated. Use PopupWindow.anchor.rect.y."; |
126 | 125 | return this->mAnchor.rect().y; |
127 | 126 | } |
128 | 127 |
|
|
0 commit comments