diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -68,7 +68,7 @@ m_baseUrl(baseUrl), m_baseFileItem(0), m_selectedItems(), - m_selectedItemsProperties(0), + m_selectedItemsProperties(nullptr), m_context(NoContext), m_copyToMenu(parent), m_customActions(), @@ -84,7 +84,7 @@ DolphinContextMenu::~DolphinContextMenu() { delete m_selectedItemsProperties; - m_selectedItemsProperties = 0; + m_selectedItemsProperties = nullptr; } void DolphinContextMenu::setCustomActions(const QList& actions) @@ -195,10 +195,10 @@ { Q_ASSERT(!m_fileInfo.isNull()); - QAction* openParentAction = 0; - QAction* openParentInNewWindowAction = 0; - QAction* openParentInNewTabAction = 0; - QAction* addToPlacesAction = 0; + QAction* openParentAction = nullptr; + QAction* openParentInNewWindowAction = nullptr; + QAction* openParentInNewTabAction = nullptr; + QAction* addToPlacesAction = nullptr; const KFileItemListProperties& selectedItemsProps = selectedItemsProperties(); if (m_selectedItems.count() == 1) { diff --git a/src/dolphindockwidget.cpp b/src/dolphindockwidget.cpp --- a/src/dolphindockwidget.cpp +++ b/src/dolphindockwidget.cpp @@ -35,7 +35,7 @@ Q_OBJECT public: - DolphinDockTitleBar(QWidget* parent = 0) : QWidget(parent) {} + explicit DolphinDockTitleBar(QWidget* parent = nullptr) : QWidget(parent) {} virtual ~DolphinDockTitleBar() {} QSize minimumSizeHint() const Q_DECL_OVERRIDE @@ -53,15 +53,15 @@ DolphinDockWidget::DolphinDockWidget(const QString& title, QWidget* parent, Qt::WindowFlags flags) : QDockWidget(title, parent, flags), m_locked(false), - m_dockTitleBar(0) + m_dockTitleBar(nullptr) { setFeatures(DefaultDockWidgetFeatures); } DolphinDockWidget::DolphinDockWidget(QWidget* parent, Qt::WindowFlags flags) : QDockWidget(parent, flags), m_locked(false), - m_dockTitleBar(0) + m_dockTitleBar(nullptr) { setFeatures(DefaultDockWidgetFeatures); } @@ -82,7 +82,7 @@ setTitleBarWidget(m_dockTitleBar); setFeatures(QDockWidget::NoDockWidgetFeatures); } else { - setTitleBarWidget(0); + setTitleBarWidget(nullptr); setFeatures(DefaultDockWidgetFeatures); } } diff --git a/src/panels/folders/folderspanel.h b/src/panels/folders/folderspanel.h --- a/src/panels/folders/folderspanel.h +++ b/src/panels/folders/folderspanel.h @@ -39,7 +39,7 @@ Q_OBJECT public: - FoldersPanel(QWidget* parent = 0); + explicit FoldersPanel(QWidget* parent = nullptr); virtual ~FoldersPanel(); void setShowHiddenFiles(bool show); diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -55,8 +55,8 @@ FoldersPanel::FoldersPanel(QWidget* parent) : Panel(parent), m_updateCurrentItem(false), - m_controller(0), - m_model(0) + m_controller(nullptr), + m_model(nullptr) { setLayoutDirection(Qt::LeftToRight); } @@ -67,7 +67,7 @@ if (m_controller) { KItemListView* view = m_controller->view(); - m_controller->setView(0); + m_controller->setView(nullptr); delete view; } } diff --git a/src/panels/information/filemetadataconfigurationdialog.cpp b/src/panels/information/filemetadataconfigurationdialog.cpp --- a/src/panels/information/filemetadataconfigurationdialog.cpp +++ b/src/panels/information/filemetadataconfigurationdialog.cpp @@ -35,8 +35,8 @@ FileMetaDataConfigurationDialog::FileMetaDataConfigurationDialog(QWidget* parent) : QDialog(parent), - m_descriptionLabel(0), - m_configWidget(0) + m_descriptionLabel(nullptr), + m_configWidget(nullptr) { setWindowTitle(i18nc("@title:window", "Configure Shown Data")); diff --git a/src/panels/information/informationpanel.h b/src/panels/information/informationpanel.h --- a/src/panels/information/informationpanel.h +++ b/src/panels/information/informationpanel.h @@ -36,7 +36,7 @@ Q_OBJECT public: - explicit InformationPanel(QWidget* parent = 0); + explicit InformationPanel(QWidget* parent = nullptr); virtual ~InformationPanel(); signals: diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -32,16 +32,16 @@ InformationPanel::InformationPanel(QWidget* parent) : Panel(parent), m_initialized(false), - m_infoTimer(0), - m_urlChangedTimer(0), - m_resetUrlTimer(0), + m_infoTimer(nullptr), + m_urlChangedTimer(nullptr), + m_resetUrlTimer(nullptr), m_shownUrl(), m_urlCandidate(), m_invalidUrlCandidate(), m_fileItem(), m_selection(), - m_folderStatJob(0), - m_content(0) + m_folderStatJob(nullptr), + m_content(nullptr) { } diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -41,7 +41,7 @@ Q_OBJECT public: - EmbeddedVideoPlayer(QWidget *parent = 0) : + EmbeddedVideoPlayer(QWidget *parent = nullptr) : Phonon::VideoWidget(parent) { } @@ -64,13 +64,13 @@ PhononWidget::PhononWidget(QWidget *parent) : QWidget(parent), m_url(), - m_playButton(0), - m_stopButton(0), - m_topLayout(0), - m_media(0), - m_seekSlider(0), - m_audioOutput(0), - m_videoPlayer(0) + m_playButton(nullptr), + m_stopButton(nullptr), + m_topLayout(nullptr), + m_media(nullptr), + m_seekSlider(nullptr), + m_audioOutput(nullptr), + m_videoPlayer(nullptr) { } diff --git a/src/panels/places/placesitem.cpp b/src/panels/places/placesitem.cpp --- a/src/panels/places/placesitem.cpp +++ b/src/panels/places/placesitem.cpp @@ -37,8 +37,8 @@ m_volume(), m_disc(), m_mtp(), - m_signalHandler(0), - m_trashDirLister(0), + m_signalHandler(nullptr), + m_trashDirLister(nullptr), m_bookmark() { m_signalHandler = new PlacesItemSignalHandler(this); diff --git a/src/panels/places/placesitemsignalhandler.h b/src/panels/places/placesitemsignalhandler.h --- a/src/panels/places/placesitemsignalhandler.h +++ b/src/panels/places/placesitemsignalhandler.h @@ -47,7 +47,7 @@ Q_OBJECT public: - explicit PlacesItemSignalHandler(PlacesItem* item, QObject* parent = 0); + explicit PlacesItemSignalHandler(PlacesItem* item, QObject* parent = nullptr); virtual ~PlacesItemSignalHandler(); public slots: diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h --- a/src/panels/places/placespanel.h +++ b/src/panels/places/placespanel.h @@ -39,7 +39,7 @@ Q_OBJECT public: - PlacesPanel(QWidget* parent); + explicit PlacesPanel(QWidget* parent); virtual ~PlacesPanel(); void proceedWithTearDown(); diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -58,13 +58,14 @@ PlacesPanel::PlacesPanel(QWidget* parent) : Panel(parent), - m_controller(0), - m_model(0), + m_controller(nullptr), + m_model(nullptr), + m_view(nullptr), m_storageSetupFailedUrl(), m_triggerStorageSetupButton(), m_itemDropEventIndex(-1), - m_itemDropEventMimeData(0), - m_itemDropEvent(0) + m_itemDropEventMimeData(nullptr), + m_itemDropEvent(nullptr) { } diff --git a/src/panels/places/placesview.h b/src/panels/places/placesview.h --- a/src/panels/places/placesview.h +++ b/src/panels/places/placesview.h @@ -32,7 +32,7 @@ Q_OBJECT public: - explicit PlacesView(QGraphicsWidget* parent = 0); + explicit PlacesView(QGraphicsWidget* parent = nullptr); void setIconSize(int size); int iconSize() const; diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h --- a/src/panels/terminal/terminalpanel.h +++ b/src/panels/terminal/terminalpanel.h @@ -45,7 +45,7 @@ Q_OBJECT public: - TerminalPanel(QWidget* parent = 0); + explicit TerminalPanel(QWidget* parent = nullptr); virtual ~TerminalPanel(); /** diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -47,7 +47,7 @@ Q_OBJECT public: - explicit DolphinFacetsWidget(QWidget* parent = 0); + explicit DolphinFacetsWidget(QWidget* parent = nullptr); virtual ~DolphinFacetsWidget(); QString ratingTerm() const; diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -29,23 +29,23 @@ DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) : QWidget(parent), - m_folders(0), - m_documents(0), - m_images(0), - m_audio(0), - m_videos(0), - m_anytime(0), - m_today(0), - m_yesterday(0), - m_thisWeek(0), - m_thisMonth(0), - m_thisYear(0), - m_anyRating(0), - m_oneOrMore(0), - m_twoOrMore(0), - m_threeOrMore(0), - m_fourOrMore(0), - m_maxRating(0) + m_folders(nullptr), + m_documents(nullptr), + m_images(nullptr), + m_audio(nullptr), + m_videos(nullptr), + m_anytime(nullptr), + m_today(nullptr), + m_yesterday(nullptr), + m_thisWeek(nullptr), + m_thisMonth(nullptr), + m_thisYear(nullptr), + m_anyRating(nullptr), + m_oneOrMore(nullptr), + m_twoOrMore(nullptr), + m_threeOrMore(nullptr), + m_fourOrMore(nullptr), + m_maxRating(nullptr) { QButtonGroup* filetypeGroup = new QButtonGroup(this); m_anyType = createRadioButton(i18nc("@option:check", "Any"), filetypeGroup); diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -34,15 +34,15 @@ BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) : SettingsPageBase(parent), m_url(url), - m_localViewProps(0), - m_globalViewProps(0), - m_showToolTips(0), - m_showSelectionToggle(0), - m_naturalSorting(0), - m_caseSensitiveSorting(0), - m_caseInsensitiveSorting(0), - m_renameInline(0), - m_useTabForSplitViewSwitch(0) + m_localViewProps(nullptr), + m_globalViewProps(nullptr), + m_showToolTips(nullptr), + m_showSelectionToggle(nullptr), + m_naturalSorting(nullptr), + m_caseSensitiveSorting(nullptr), + m_caseInsensitiveSorting(nullptr), + m_renameInline(nullptr), + m_useTabForSplitViewSwitch(nullptr) { QVBoxLayout* topLayout = new QVBoxLayout(this); diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp --- a/src/settings/general/statusbarsettingspage.cpp +++ b/src/settings/general/statusbarsettingspage.cpp @@ -28,8 +28,8 @@ StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) : SettingsPageBase(parent), - m_showZoomSlider(0), - m_showSpaceInfo(0) + m_showZoomSlider(nullptr), + m_showSpaceInfo(nullptr) { m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), this); m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), this); diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp --- a/src/settings/startup/startupsettingspage.cpp +++ b/src/settings/startup/startupsettingspage.cpp @@ -42,12 +42,12 @@ StartupSettingsPage::StartupSettingsPage(const QUrl& url, QWidget* parent) : SettingsPageBase(parent), m_url(url), - m_homeUrl(0), - m_splitView(0), - m_editableUrl(0), - m_showFullPath(0), - m_filterBar(0), - m_showFullPathInTitlebar(0) + m_homeUrl(nullptr), + m_splitView(nullptr), + m_editableUrl(nullptr), + m_showFullPath(nullptr), + m_filterBar(nullptr), + m_showFullPathInTitlebar(nullptr) { QVBoxLayout* topLayout = new QVBoxLayout(this); QWidget* vBox = new QWidget(this);