┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorAlexander Lohnau <[email protected]>2020-12-11 20:05:15 +0100
committerAlexander Lohnau <[email protected]>2020-12-11 20:06:51 +0100
commit20370b4c9fe1958b9f222c86bfa39439a7847545 (patch)
tree7fcedf1345314fe36c0f810642b86aeadca17ed1 /src/dolphinmainwindow.cpp
parent784586672df099955635950a736ece6994fa9cfb (diff)
Do not create instance of GeneralSettings just to access static members
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index beec95c6c..27949fb17 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -134,10 +134,9 @@ DolphinMainWindow::DolphinMainWindow() :
connect(undoManager, &KIO::FileUndoManager::jobRecordingFinished,
this, &DolphinMainWindow::showCommand);
- GeneralSettings* generalSettings = GeneralSettings::self();
- const bool firstRun = (generalSettings->version() < 200);
+ const bool firstRun = (GeneralSettings::version() < 200);
if (firstRun) {
- generalSettings->setViewPropsTimestamp(QDateTime::currentDateTime());
+ GeneralSettings::setViewPropsTimestamp(QDateTime::currentDateTime());
}
setAcceptDrops(true);
@@ -174,7 +173,7 @@ DolphinMainWindow::DolphinMainWindow() :
this, &DolphinMainWindow::updatePasteAction);
QAction* toggleFilterBarAction = actionCollection()->action(QStringLiteral("toggle_filter"));
- toggleFilterBarAction->setChecked(generalSettings->filterBar());
+ toggleFilterBarAction->setChecked(GeneralSettings::filterBar());
if (firstRun) {
menuBar()->setVisible(false);