Reparse settings when they change
Change-Id: Ibb13077943330417fa08d23ce1ea60f2aff5defc
This commit is contained in:
parent
81a494b131
commit
d2707e795a
@ -49,7 +49,7 @@ ToolTip::ToolTip(QQuickItem *parent)
|
||||
m_showTimer->setSingleShot(true);
|
||||
connect(m_showTimer, &QTimer::timeout, this, &ToolTip::showToolTip);
|
||||
|
||||
settingsChanged();
|
||||
loadSettings();
|
||||
|
||||
const QString configFile = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + "plasmarc";
|
||||
KDirWatch::self()->addFile(configFile);
|
||||
@ -70,6 +70,11 @@ ToolTip::~ToolTip()
|
||||
}
|
||||
|
||||
void ToolTip::settingsChanged()
|
||||
{
|
||||
KSharedConfig::openConfig("plasmarc")->reparseConfiguration();
|
||||
}
|
||||
|
||||
void ToolTip::loadSettings()
|
||||
{
|
||||
KConfigGroup cfg = KConfigGroup(KSharedConfig::openConfig("plasmarc"), "PlasmaToolTips");
|
||||
m_interval = cfg.readEntry("Delay", 700);
|
||||
|
@ -180,6 +180,7 @@ private Q_SLOTS:
|
||||
void settingsChanged();
|
||||
|
||||
private:
|
||||
void loadSettings();
|
||||
bool m_tooltipsEnabledGlobally;
|
||||
bool m_containsMouse;
|
||||
Plasma::Types::Location m_location;
|
||||
|
Loading…
Reference in New Issue
Block a user