forked from qt-creator/qt-creator
Core: Allow to globally unsuppress an info
Change-Id: Ie7af913e28a323e4ad391a35cfd65abd084cfd99 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -139,10 +139,13 @@ void InfoBar::clear()
|
||||
void InfoBar::globallySuppressInfo(Id id)
|
||||
{
|
||||
globallySuppressed.insert(id);
|
||||
QStringList list;
|
||||
foreach (Id i, globallySuppressed)
|
||||
list << QLatin1String(i.name());
|
||||
ICore::settings()->setValue(QLatin1String(C_SUPPRESSED_WARNINGS), list);
|
||||
writeGloballySuppressedToSettings();
|
||||
}
|
||||
|
||||
void InfoBar::globallyUnsuppressInfo(Id id)
|
||||
{
|
||||
globallySuppressed.remove(id);
|
||||
writeGloballySuppressedToSettings();
|
||||
}
|
||||
|
||||
void InfoBar::initializeGloballySuppressed()
|
||||
@@ -163,6 +166,14 @@ bool InfoBar::anyGloballySuppressed()
|
||||
return !globallySuppressed.isEmpty();
|
||||
}
|
||||
|
||||
void InfoBar::writeGloballySuppressedToSettings()
|
||||
{
|
||||
QStringList list;
|
||||
foreach (Id i, globallySuppressed)
|
||||
list << QLatin1String(i.name());
|
||||
ICore::settings()->setValue(QLatin1String(C_SUPPRESSED_WARNINGS), list);
|
||||
}
|
||||
|
||||
|
||||
InfoBarDisplay::InfoBarDisplay(QObject *parent)
|
||||
: QObject(parent)
|
||||
|
||||
Reference in New Issue
Block a user