as theme already reads the plasmarc file, use it to cache the tooltipdelay as well
This commit is contained in:
parent
d109b43101
commit
0abdaf646d
12
theme.cpp
12
theme.cpp
@ -183,6 +183,7 @@ public:
|
||||
QHash<styles, QString> cachedStyleSheets;
|
||||
QHash<QString, QString> discoveries;
|
||||
QTimer *saveTimer;
|
||||
int toolTipDelay;
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
EffectWatcher *effectWatcher;
|
||||
@ -508,7 +509,11 @@ void ThemePrivate::settingsFileChanged(const QString &file)
|
||||
|
||||
void Theme::settingsChanged()
|
||||
{
|
||||
d->setThemeName(d->config().readEntry("name", ThemePrivate::defaultTheme), false);
|
||||
KConfigGroup cg = d->config();
|
||||
d->setThemeName(cg.readEntry("name", ThemePrivate::defaultTheme), false);
|
||||
cg = KConfigGroup(cg.config(), "PlasmaToolTips");
|
||||
d->toolTipDelay = cg.readEntry("Delay", qreal(0.7));
|
||||
kDebug() << "delay for tooltips is ...." << d->toolTipDelay << "**************";
|
||||
}
|
||||
|
||||
void Theme::setThemeName(const QString &themeName)
|
||||
@ -1082,6 +1087,11 @@ KUrl Theme::homepage() const
|
||||
return brandConfig.readEntry("homepage", KUrl("http://www.kde.org"));
|
||||
}
|
||||
|
||||
int Theme::toolTipDelay() const
|
||||
{
|
||||
return d->toolTipDelay;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include <theme.moc>
|
||||
|
Loading…
Reference in New Issue
Block a user