Commit d06ed0a4 authored by Martin Koller's avatar Martin Koller
Browse files

make sure clearing the recent files also removes it from the config file

parent 2cb4c366
......@@ -95,7 +95,8 @@ void kpMainWindow::setupFileMenuActions ()
d->actionNew = KStandardAction::openNew (this, SLOT (slotNew ()), ac);
d->actionOpen = KStandardAction::open (this, SLOT (slotOpen ()), ac);
d->actionOpenRecent = KStandardAction::openRecent (this, SLOT (slotOpenRecent (const QUrl &)), ac);
d->actionOpenRecent = KStandardAction::openRecent(this, &kpMainWindow::slotOpenRecent, ac);
connect(d->actionOpenRecent, &KRecentFilesAction::recentListCleared, this, &kpMainWindow::slotRecentListCleared);
d->actionOpenRecent->loadEntries (KSharedConfig::openConfig ()->group (kpSettingsGroupRecentFiles));
#if DEBUG_KP_MAIN_WINDOW
qCDebug(kpLogMainWindow) << "\trecent URLs=" << d->actionOpenRecent->items ();
......@@ -522,6 +523,13 @@ void kpMainWindow::slotOpenRecent (const QUrl &url)
//---------------------------------------------------------------------
void kpMainWindow::slotRecentListCleared()
{
d->actionOpenRecent->saveEntries(KSharedConfig::openConfig()->group(kpSettingsGroupRecentFiles));
}
//---------------------------------------------------------------------
#if HAVE_KSANE
// private slot
void kpMainWindow::slotScan ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment