From 4c93876b32c94e016cd6a8f5b910bc85a31e6c38 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Mon, 22 Feb 2021 17:00:33 +0200 Subject: [PATCH] Deprecated QPalette::foreground() Use QPalette::windowText() instead (cherry picked from commit 8c30246ef36199a32309b8d706163de8bc7b6944) --- src/config/generalconf.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/generalconf.cpp b/src/config/generalconf.cpp index e737b0b3..b7df6f03 100644 --- a/src/config/generalconf.cpp +++ b/src/config/generalconf.cpp @@ -370,7 +370,10 @@ void GeneralConf::initSaveAfterCopy() } m_savePath = new QLineEdit(path, this); m_savePath->setDisabled(true); - QString foreground = this->palette().foreground().color().name(); + // #if QT_DEPRECATED_SINCE(5, 13) + // QT_DEPRECATED_X("Use QPalette::windowText() instead") + // inline const QBrush &foreground() const { return windowText(); } + QString foreground = this->palette().windowText().color().name(); m_savePath->setStyleSheet(QStringLiteral("color: %1").arg(foreground)); pathLayout->addWidget(m_savePath);