Commit b4336e9d authored by Volker Krause's avatar Volker Krause
Browse files

Port away from KStatefulBrush::brush(const QWidget*)

Soon to be deprecated, use the QPalette overload instead.
parent 88447830
Pipeline #67373 passed with stage
in 15 minutes and 52 seconds
...@@ -45,7 +45,7 @@ void AddressLineEdit::verifyAddress() ...@@ -45,7 +45,7 @@ void AddressLineEdit::verifyAddress()
// Fix check multi address // Fix check multi address
if (mNegativeBackground.isEmpty()) { if (mNegativeBackground.isEmpty()) {
KStatefulBrush bgBrush = KStatefulBrush(KColorScheme::View, KColorScheme::NegativeText); KStatefulBrush bgBrush = KStatefulBrush(KColorScheme::View, KColorScheme::NegativeText);
mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(this).color().name()); mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(palette()).color().name());
} }
if (mEmailIsInvalid) { if (mEmailIsInvalid) {
styleSheet = mNegativeBackground; styleSheet = mNegativeBackground;
......
...@@ -146,9 +146,9 @@ void FindBarBase::setFoundMatch(bool match) ...@@ -146,9 +146,9 @@ void FindBarBase::setFoundMatch(bool match)
if (!mSearch->text().isEmpty()) { if (!mSearch->text().isEmpty()) {
if (mNegativeBackground.isEmpty()) { if (mNegativeBackground.isEmpty()) {
KStatefulBrush bgBrush(KColorScheme::View, KColorScheme::PositiveBackground); KStatefulBrush bgBrush(KColorScheme::View, KColorScheme::PositiveBackground);
mPositiveBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch).color().name()); mPositiveBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch->palette()).color().name());
bgBrush = KStatefulBrush(KColorScheme::View, KColorScheme::NegativeBackground); bgBrush = KStatefulBrush(KColorScheme::View, KColorScheme::NegativeBackground);
mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch).color().name()); mNegativeBackground = QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(mSearch->palette()).color().name());
} }
if (match) { if (match) {
styleSheet = mPositiveBackground; styleSheet = mPositiveBackground;
......
...@@ -17,7 +17,7 @@ void VacationMailLineEdit::setInvalidEmail(bool state) ...@@ -17,7 +17,7 @@ void VacationMailLineEdit::setInvalidEmail(bool state)
{ {
if (state) { if (state) {
const KStatefulBrush bgBrush(KColorScheme::View, KColorScheme::NegativeBackground); const KStatefulBrush bgBrush(KColorScheme::View, KColorScheme::NegativeBackground);
setStyleSheet(QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(this).color().name())); setStyleSheet(QStringLiteral("QLineEdit{ background-color:%1 }").arg(bgBrush.brush(palette()).color().name()));
} else { } else {
setStyleSheet(QString()); setStyleSheet(QString());
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment