Example #1
0
void UpdateInfoPlugin::saveSettings()
{
    SettingsDatabase *settings = ICore::settingsDatabase();
    if (settings) {
        settings->beginTransaction();
        settings->beginGroup(QLatin1String("Updater"));
        settings->setValue(QLatin1String("Application"), d->updaterProgram);
        settings->setValue(QLatin1String("LastDayChecked"), d->m_lastDayChecked);
        settings->setValue(QLatin1String("RunUiArgument"), d->updaterRunUiArgument);
        settings->setValue(QLatin1String("CheckOnlyArgument"), d->updaterCheckOnlyArgument);
        settings->setValue(QLatin1String("ScheduledUpdateTime"), d->m_scheduledUpdateTime);
        settings->endGroup();
        settings->endTransaction();
    }
}
Example #2
0
void Locator::saveSettings()
{
    if (m_settingsInitialized) {
        SettingsDatabase *s = ICore::settingsDatabase();
        s->beginTransaction();
        s->beginGroup(QLatin1String("QuickOpen"));
        s->remove(QString());
        s->setValue(QLatin1String("RefreshInterval"), refreshInterval());
        foreach (ILocatorFilter *filter, m_filters) {
            if (!m_customFilters.contains(filter))
                s->setValue(filter->id().toString(), filter->saveState());
        }
        s->beginGroup(QLatin1String("CustomFilters"));
        int i = 0;
        foreach (ILocatorFilter *filter, m_customFilters) {
            s->setValue(QLatin1String("directory") + QString::number(i),
                        filter->saveState());
            ++i;
        }
        s->endGroup();
        s->endGroup();
        s->endTransaction();
    }