mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Do not create instance of GeneralSettings just to access static members
This commit is contained in:
parent
784586672d
commit
20370b4c9f
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue