summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Mi <codeminister@publicstatic.de>2014-01-24 16:16:13 (GMT)
committerGregor Mi <codeminister@publicstatic.de>2014-01-24 16:16:13 (GMT)
commitf05f03556d44dd17c169b4eb31df33d452154519 (patch)
treed742549a6323a58da198a37f656ca07b7d294719
parent5bd7d7537fb617c869610b212cf3ad6989e72ada (diff)
apply coding suggestions from REVIEW:115291
-rw-r--r--kate/src/kateconfigdialog.cpp6
-rw-r--r--kate/src/kateconfigdialog.h3
-rw-r--r--kate/src/katemainwindow.cpp4
3 files changed, 6 insertions, 7 deletions
diff --git a/kate/src/kateconfigdialog.cpp b/kate/src/kateconfigdialog.cpp
index c616203..dfa6b39 100644
--- a/kate/src/kateconfigdialog.cpp
+++ b/kate/src/kateconfigdialog.cpp
@@ -149,7 +149,7 @@ KateConfigDialog::KateConfigDialog(KateMainWindow *parent, KTextEditor::View *vi
sessionConfigUi->restoreVC->setChecked( cgGeneral.readEntry("Restore Window Configuration", true) );
connect(sessionConfigUi->restoreVC, SIGNAL(toggled(bool)), this, SLOT(slotChanged()) );
- sessionConfigUi->spinBoxRecentFilesCount->setValue(readRecentFilesMaxCount(config));
+ sessionConfigUi->spinBoxRecentFilesCount->setValue(recentFilesMaxCount());
connect(sessionConfigUi->spinBoxRecentFilesCount, SIGNAL(valueChanged(int)), this, SLOT(slotChanged()));
QString sesStart (cgGeneral.readEntry ("Startup Session", "manual"));
@@ -383,9 +383,9 @@ void KateConfigDialog::slotHelp()
QDesktopServices::openUrl(QUrl(QStringLiteral("help:/")));
}
-int KateConfigDialog::readRecentFilesMaxCount(KSharedConfig::Ptr config)
+int KateConfigDialog::recentFilesMaxCount()
{
- int maxItems = KConfigGroup(config, "General").readEntry("Recent File List Entry Count", 10);
+ int maxItems = KConfigGroup(KSharedConfig::openConfig(), "General").readEntry("Recent File List Entry Count", 10);
return maxItems;
}
diff --git a/kate/src/kateconfigdialog.h b/kate/src/kateconfigdialog.h
index 1d311c9..e3fe77b 100644
--- a/kate/src/kateconfigdialog.h
+++ b/kate/src/kateconfigdialog.h
@@ -29,7 +29,6 @@
#include <KTextEditor/View>
#include <KPageDialog>
-#include <KSharedConfig>
class QCheckBox;
class QSpinBox;
@@ -60,7 +59,7 @@ public: // static
* Reads the value from the given open config. If not present in config yet then
* the default value 10 is used.
*/
- static int readRecentFilesMaxCount(KSharedConfig::Ptr config);
+ static int recentFilesMaxCount();
public:
void addPluginPage(KTextEditor::Plugin *plugin);
diff --git a/kate/src/katemainwindow.cpp b/kate/src/katemainwindow.cpp
index ce3e4a4..59d8752 100644
--- a/kate/src/katemainwindow.cpp
+++ b/kate/src/katemainwindow.cpp
@@ -277,7 +277,7 @@ void KateMainWindow::setupActions()
->setWhatsThis(i18n("Open an existing document for editing"));
m_fileOpenRecent = KStandardAction::openRecent(m_viewManager, SLOT(openUrl(QUrl)), this);
- m_fileOpenRecent->setMaxItems(KateConfigDialog::readRecentFilesMaxCount(KSharedConfig::openConfig()));
+ m_fileOpenRecent->setMaxItems(KateConfigDialog::recentFilesMaxCount());
actionCollection()->addAction(m_fileOpenRecent->objectName(), m_fileOpenRecent);
m_fileOpenRecent->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again."));
@@ -726,7 +726,7 @@ void KateMainWindow::showPluginConfigPage(KTextEditor::ConfigPageInterface *conf
}
if (dlg->exec() == QDialog::Accepted) {
- m_fileOpenRecent->setMaxItems(KateConfigDialog::readRecentFilesMaxCount(KSharedConfig::openConfig()));
+ m_fileOpenRecent->setMaxItems(KateConfigDialog::recentFilesMaxCount());
}
delete dlg;