summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJiDe Zhang <zhangjide@uniontech.com>2022-07-02 13:08:21 +0800
committerLiang Qi <liang.qi@qt.io>2022-07-05 05:05:36 +0000
commit32d8cb010545f5f221689bd7f9a80281f62ad89d (patch)
tree511f1e7d6ca72772874a736684a2042e9ebb3949 /examples
parent354d9c40314c1d5d9db73e1e11c1f43ca654f00a (diff)
Use QColor::fromString instead of some deprecated functions
It's a follow-up of a series changes from 78b6876974d2cea087cb229257097052dad5fcf7 in qtbase. Pick-to: 6.4 Change-Id: I4ad19b07489630a4648b5d6ca4a8c074ed88827b Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/wayland/custom-extension/cpp-client/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/wayland/custom-extension/cpp-client/main.cpp b/examples/wayland/custom-extension/cpp-client/main.cpp
index 6b6fa7069..d3feae404 100644
--- a/examples/wayland/custom-extension/cpp-client/main.cpp
+++ b/examples/wayland/custom-extension/cpp-client/main.cpp
@@ -77,13 +77,13 @@ protected:
QPainter p(this);
p.setFont(m_font);
p.fillRect(QRect(0,0,width(),height()),Qt::gray);
- p.fillRect(rect1, QColor("#C0FFEE"));
+ p.fillRect(rect1, QColor::fromString("#C0FFEE"));
p.drawText(rect1, Qt::TextWordWrap, "Press here to send spin request.");
- p.fillRect(rect2, QColor("#decaff"));
+ p.fillRect(rect2, QColor::fromString("#decaff"));
p.drawText(rect2, Qt::TextWordWrap, "Press here to send bounce request.");
- p.fillRect(rect3, QColor("#7EA"));
+ p.fillRect(rect3, QColor::fromString("#7EA"));
p.drawText(rect3, Qt::TextWordWrap, "Create new window.");
- p.fillRect(rect4, QColor("#7EABA6"));
+ p.fillRect(rect4, QColor::fromString("#7EABA6"));
p.drawText(rect4, Qt::TextWordWrap, "Create custom object.");
}