mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-24 07:20:20 +00:00
Make constHints reuse hints(), set the hint for silent when hints are used and not when they are created.
This commit is contained in:
parent
778d769fda
commit
4a9c2123b7
@ -91,12 +91,13 @@ bool Application::isValid() const
|
||||
|
||||
Hint &Application::hints()
|
||||
{
|
||||
d->m_hint.setValue("silent", SnoreCore::instance().settingsValue(QLatin1String("Silent"), LOCAL_SETTING));
|
||||
return d->m_hint;
|
||||
}
|
||||
|
||||
const Hint &Application::constHints() const
|
||||
{
|
||||
return d->m_hint;
|
||||
return const_cast<Hint&>(const_cast<Application*>(this)->hints());
|
||||
}
|
||||
|
||||
QDebug operator<< (QDebug debug, const Snore::Application &app)
|
||||
|
@ -34,7 +34,6 @@ ApplicationData::ApplicationData(const QString &key, const QString &name, const
|
||||
|
||||
m_hint.setValue("pushover-token", QLatin1String("aFB1TPCyZkkr7mubCGEKy5vJEWak9t"));
|
||||
m_hint.setValue("use-markup", false);
|
||||
m_hint.setValue("silent", SnoreCore::instance().settingsValue(QLatin1String("Silent"), LOCAL_SETTING));
|
||||
}
|
||||
|
||||
ApplicationData::~ApplicationData()
|
||||
|
@ -139,7 +139,7 @@ Hint &Notification::hints()
|
||||
|
||||
const Hint &Notification::constHints() const
|
||||
{
|
||||
return d->m_hints;
|
||||
return const_cast<Hint&>(const_cast<Notification*>(this)->hints());
|
||||
}
|
||||
|
||||
bool Notification::isValid() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user