don't do a bunch of updates if the prefix remains the same

BUG:263049

svn path=/trunk/KDE/kdelibs/; revision=1214249
This commit is contained in:
Aaron J. Seigo 2011-01-13 19:35:01 +00:00
parent cd4e26f59f
commit fd0ad0eda2

View File

@ -91,6 +91,7 @@ void FocusIndicator::setCustomGeometry(const QRectF &geometry)
void FocusIndicator::setCustomPrefix(const QString &prefix)
{
QString was = m_prefix;
if (!m_prefix.isEmpty() && !m_customPrefix.isEmpty()) {
m_prefix.remove(m_customPrefix);
}
@ -101,6 +102,10 @@ void FocusIndicator::setCustomPrefix(const QString &prefix)
m_prefix.prepend(m_customPrefix);
}
if (m_prefix == was) {
return;
}
m_testPrefix = m_customPrefix % "hover";
if (m_prefix.isEmpty()) {
m_prefix = m_customPrefix % "shadow";