Commit 20370b4c authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Do not create instance of GeneralSettings just to access static members

parent 78458667
Pipeline #43819 passed with stage
in 6 minutes and 52 seconds
...@@ -134,10 +134,9 @@ DolphinMainWindow::DolphinMainWindow() : ...@@ -134,10 +134,9 @@ DolphinMainWindow::DolphinMainWindow() :
connect(undoManager, &KIO::FileUndoManager::jobRecordingFinished, connect(undoManager, &KIO::FileUndoManager::jobRecordingFinished,
this, &DolphinMainWindow::showCommand); this, &DolphinMainWindow::showCommand);
GeneralSettings* generalSettings = GeneralSettings::self(); const bool firstRun = (GeneralSettings::version() < 200);
const bool firstRun = (generalSettings->version() < 200);
if (firstRun) { if (firstRun) {
generalSettings->setViewPropsTimestamp(QDateTime::currentDateTime()); GeneralSettings::setViewPropsTimestamp(QDateTime::currentDateTime());
} }
setAcceptDrops(true); setAcceptDrops(true);
...@@ -174,7 +173,7 @@ DolphinMainWindow::DolphinMainWindow() : ...@@ -174,7 +173,7 @@ DolphinMainWindow::DolphinMainWindow() :
this, &DolphinMainWindow::updatePasteAction); this, &DolphinMainWindow::updatePasteAction);
QAction* toggleFilterBarAction = actionCollection()->action(QStringLiteral("toggle_filter")); QAction* toggleFilterBarAction = actionCollection()->action(QStringLiteral("toggle_filter"));
toggleFilterBarAction->setChecked(generalSettings->filterBar()); toggleFilterBarAction->setChecked(GeneralSettings::filterBar());
if (firstRun) { if (firstRun) {
menuBar()->setVisible(false); menuBar()->setVisible(false);
......
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