fix cinst stuff, not happy
This commit is contained in:
parent
cf1d34af11
commit
6e0ac042d0
|
@ -67,6 +67,11 @@ SnoreCore *SnorePlugin::snore()
|
||||||
return m_snore.data();
|
return m_snore.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SnoreCore *SnorePlugin::snore() const
|
||||||
|
{
|
||||||
|
return m_snore.data();
|
||||||
|
}
|
||||||
|
|
||||||
QVariant SnorePlugin::value(const QString &key) const
|
QVariant SnorePlugin::value(const QString &key) const
|
||||||
{
|
{
|
||||||
return snore()->settings()->value(normaliseKey(key));
|
return snore()->settings()->value(normaliseKey(key));
|
||||||
|
@ -86,7 +91,7 @@ void SnorePlugin::setDefaultValue(const QString &key, const QVariant &value, con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SnorePlugin::normaliseKey(const QString &key)
|
QString SnorePlugin::normaliseKey(const QString &key) const
|
||||||
{
|
{
|
||||||
return QString("%1/%2").arg(m_name, key);
|
return QString("%1/%2").arg(m_name, key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,8 @@ public:
|
||||||
virtual bool deinitialize();
|
virtual bool deinitialize();
|
||||||
bool isInitialized();
|
bool isInitialized();
|
||||||
SnoreCore *snore();
|
SnoreCore *snore();
|
||||||
|
const SnoreCore *snore() const;
|
||||||
|
|
||||||
const QString &name() const;
|
const QString &name() const;
|
||||||
|
|
||||||
QVariant value(const QString &key) const;
|
QVariant value(const QString &key) const;
|
||||||
|
@ -60,7 +62,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SnorePlugin() {}
|
SnorePlugin() {}
|
||||||
QString normaliseKey(const QString &key);
|
QString normaliseKey(const QString &key) const;
|
||||||
|
|
||||||
QString m_name;
|
QString m_name;
|
||||||
bool m_initialized;
|
bool m_initialized;
|
||||||
|
|
|
@ -232,6 +232,11 @@ QSettings *SnoreCore::settings()
|
||||||
return d->m_settings;
|
return d->m_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QSettings *SnoreCore::settings() const{
|
||||||
|
Q_D(const SnoreCore);
|
||||||
|
return d->m_settings;
|
||||||
|
}
|
||||||
|
|
||||||
const QHash<QString, QString> &SnoreCore::settingsDescription() const
|
const QHash<QString, QString> &SnoreCore::settingsDescription() const
|
||||||
{
|
{
|
||||||
Q_D(const SnoreCore);
|
Q_D(const SnoreCore);
|
||||||
|
|
|
@ -167,6 +167,7 @@ public:
|
||||||
* @return a pointer to the global settings
|
* @return a pointer to the global settings
|
||||||
*/
|
*/
|
||||||
QSettings *settings();
|
QSettings *settings();
|
||||||
|
const QSettings *settings() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a hashmap containing the documentation of the settings keys.
|
* @return a hashmap containing the documentation of the settings keys.
|
||||||
|
|
Loading…
Reference in New Issue