X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/59e8f22cd5de7cc1811550d8bac6aacc5c36587c..6a09781a3b99bbca2b2c66ee3041208a02ead0ca:/src/settings/viewpropertiesdialog.cpp diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index c5002ff9f..576154f2b 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -27,17 +27,13 @@ #include "dolphin_iconsmodesettings.h" #include "viewpropsprogressinfo.h" -#include -#ifdef HAVE_NEPOMUK -#include -#endif +#include #include #include #include #include #include -#include #include #include @@ -95,9 +91,9 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : QLabel* viewModeLabel = new QLabel(i18nc("@label:listbox", "View mode:"), propsGrid); m_viewMode = new KComboBox(propsGrid); - m_viewMode->addItem(KIcon("view-list-icons"), i18nc("@item:inlistbox", "Icons"), DolphinView::IconsView); - m_viewMode->addItem(KIcon("view-list-details"), i18nc("@item:inlistbox", "Compact"), DolphinView::CompactView); - m_viewMode->addItem(KIcon("view-list-tree"), i18nc("@item:inlistbox", "Details"), DolphinView::DetailsView); + m_viewMode->addItem(QIcon::fromTheme("view-list-icons"), i18nc("@item:inlistbox", "Icons"), DolphinView::IconsView); + m_viewMode->addItem(QIcon::fromTheme("view-list-details"), i18nc("@item:inlistbox", "Compact"), DolphinView::CompactView); + m_viewMode->addItem(QIcon::fromTheme("view-list-tree"), i18nc("@item:inlistbox", "Details"), DolphinView::DetailsView); QLabel* sortingLabel = new QLabel(i18nc("@label:listbox", "Sorting:"), propsGrid); QWidget* sortingBox = new QWidget(propsGrid); @@ -141,25 +137,25 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : topLayout->addWidget(propsBox); - connect(m_viewMode, SIGNAL(currentIndexChanged(int)), - this, SLOT(slotViewModeChanged(int))); - connect(m_sorting, SIGNAL(currentIndexChanged(int)), - this, SLOT(slotSortingChanged(int))); - connect(m_sortOrder, SIGNAL(currentIndexChanged(int)), - this, SLOT(slotSortOrderChanged(int))); - connect(m_additionalInfo, SIGNAL(clicked()), - this, SLOT(configureAdditionalInfo())); - connect(m_sortFoldersFirst, SIGNAL(clicked()), - this, SLOT(slotSortFoldersFirstChanged())); - connect(m_previewsShown, SIGNAL(clicked()), - this, SLOT(slotShowPreviewChanged())); - connect(m_showInGroups, SIGNAL(clicked()), - this, SLOT(slotGroupedSortingChanged())); - connect(m_showHiddenFiles, SIGNAL(clicked()), - this, SLOT(slotShowHiddenFilesChanged())); - - connect(this, SIGNAL(okClicked()), this, SLOT(slotOk())); - connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply())); + connect(m_viewMode, static_cast(&KComboBox::currentIndexChanged), + this, &ViewPropertiesDialog::slotViewModeChanged); + connect(m_sorting, static_cast(&KComboBox::currentIndexChanged), + this, &ViewPropertiesDialog::slotSortingChanged); + connect(m_sortOrder, static_cast(&KComboBox::currentIndexChanged), + this, &ViewPropertiesDialog::slotSortOrderChanged); + connect(m_additionalInfo, &QPushButton::clicked, + this, &ViewPropertiesDialog::configureAdditionalInfo); + connect(m_sortFoldersFirst, &QCheckBox::clicked, + this, &ViewPropertiesDialog::slotSortFoldersFirstChanged); + connect(m_previewsShown, &QCheckBox::clicked, + this, &ViewPropertiesDialog::slotShowPreviewChanged); + connect(m_showInGroups, &QCheckBox::clicked, + this, &ViewPropertiesDialog::slotGroupedSortingChanged); + connect(m_showHiddenFiles, &QCheckBox::clicked, + this, &ViewPropertiesDialog::slotShowHiddenFilesChanged); + + connect(this, &ViewPropertiesDialog::okClicked, this, &ViewPropertiesDialog::slotOk); + connect(this, &ViewPropertiesDialog::applyClicked, this, &ViewPropertiesDialog::slotApply); // Only show the following settings if the view properties are remembered // for each directory: @@ -190,14 +186,14 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : topLayout->addWidget(applyBox); topLayout->addWidget(m_useAsDefault); - connect(m_applyToCurrentFolder, SIGNAL(clicked(bool)), - this, SLOT(markAsDirty(bool))); - connect(m_applyToSubFolders, SIGNAL(clicked(bool)), - this, SLOT(markAsDirty(bool))); - connect(m_applyToAllFolders, SIGNAL(clicked(bool)), - this, SLOT(markAsDirty(bool))); - connect(m_useAsDefault, SIGNAL(clicked(bool)), - this, SLOT(markAsDirty(bool))); + connect(m_applyToCurrentFolder, &QRadioButton::clicked, + this, &ViewPropertiesDialog::markAsDirty); + connect(m_applyToSubFolders, &QRadioButton::clicked, + this, &ViewPropertiesDialog::markAsDirty); + connect(m_applyToAllFolders, &QRadioButton::clicked, + this, &ViewPropertiesDialog::markAsDirty); + connect(m_useAsDefault, &QCheckBox::clicked, + this, &ViewPropertiesDialog::markAsDirty); } main->setLayout(topLayout); @@ -411,4 +407,3 @@ void ViewPropertiesDialog::loadSettings() markAsDirty(false); } -#include "viewpropertiesdialog.moc"