Deprecated QPalette::foreground() Use QPalette::windowText() instead

(cherry picked from commit 8c30246ef36199a32309b8d706163de8bc7b6944)
This commit is contained in:
Yuriy Puchkov
2021-02-22 17:00:33 +02:00
committed by borgmanJeremy
parent 20536a291e
commit 4c93876b32

View File

@@ -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);