mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Use nullptr + add explicit keyword
Test Plan: compile Reviewers: #dolphin, broulik Reviewed By: broulik Subscribers: #dolphin Differential Revision: https://phabricator.kde.org/D8637
This commit is contained in:
parent
d1acb1d56e
commit
ff3f476ed8
|
@ -68,7 +68,7 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent,
|
||||||
m_baseUrl(baseUrl),
|
m_baseUrl(baseUrl),
|
||||||
m_baseFileItem(0),
|
m_baseFileItem(0),
|
||||||
m_selectedItems(),
|
m_selectedItems(),
|
||||||
m_selectedItemsProperties(0),
|
m_selectedItemsProperties(nullptr),
|
||||||
m_context(NoContext),
|
m_context(NoContext),
|
||||||
m_copyToMenu(parent),
|
m_copyToMenu(parent),
|
||||||
m_customActions(),
|
m_customActions(),
|
||||||
|
@ -84,7 +84,7 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent,
|
||||||
DolphinContextMenu::~DolphinContextMenu()
|
DolphinContextMenu::~DolphinContextMenu()
|
||||||
{
|
{
|
||||||
delete m_selectedItemsProperties;
|
delete m_selectedItemsProperties;
|
||||||
m_selectedItemsProperties = 0;
|
m_selectedItemsProperties = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinContextMenu::setCustomActions(const QList<QAction*>& actions)
|
void DolphinContextMenu::setCustomActions(const QList<QAction*>& actions)
|
||||||
|
@ -195,10 +195,10 @@ void DolphinContextMenu::openItemContextMenu()
|
||||||
{
|
{
|
||||||
Q_ASSERT(!m_fileInfo.isNull());
|
Q_ASSERT(!m_fileInfo.isNull());
|
||||||
|
|
||||||
QAction* openParentAction = 0;
|
QAction* openParentAction = nullptr;
|
||||||
QAction* openParentInNewWindowAction = 0;
|
QAction* openParentInNewWindowAction = nullptr;
|
||||||
QAction* openParentInNewTabAction = 0;
|
QAction* openParentInNewTabAction = nullptr;
|
||||||
QAction* addToPlacesAction = 0;
|
QAction* addToPlacesAction = nullptr;
|
||||||
const KFileItemListProperties& selectedItemsProps = selectedItemsProperties();
|
const KFileItemListProperties& selectedItemsProps = selectedItemsProperties();
|
||||||
|
|
||||||
if (m_selectedItems.count() == 1) {
|
if (m_selectedItems.count() == 1) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ class DolphinDockTitleBar : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DolphinDockTitleBar(QWidget* parent = 0) : QWidget(parent) {}
|
explicit DolphinDockTitleBar(QWidget* parent = nullptr) : QWidget(parent) {}
|
||||||
virtual ~DolphinDockTitleBar() {}
|
virtual ~DolphinDockTitleBar() {}
|
||||||
|
|
||||||
QSize minimumSizeHint() const Q_DECL_OVERRIDE
|
QSize minimumSizeHint() const Q_DECL_OVERRIDE
|
||||||
|
@ -53,7 +53,7 @@ public:
|
||||||
DolphinDockWidget::DolphinDockWidget(const QString& title, QWidget* parent, Qt::WindowFlags flags) :
|
DolphinDockWidget::DolphinDockWidget(const QString& title, QWidget* parent, Qt::WindowFlags flags) :
|
||||||
QDockWidget(title, parent, flags),
|
QDockWidget(title, parent, flags),
|
||||||
m_locked(false),
|
m_locked(false),
|
||||||
m_dockTitleBar(0)
|
m_dockTitleBar(nullptr)
|
||||||
{
|
{
|
||||||
setFeatures(DefaultDockWidgetFeatures);
|
setFeatures(DefaultDockWidgetFeatures);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ DolphinDockWidget::DolphinDockWidget(const QString& title, QWidget* parent, Qt::
|
||||||
DolphinDockWidget::DolphinDockWidget(QWidget* parent, Qt::WindowFlags flags) :
|
DolphinDockWidget::DolphinDockWidget(QWidget* parent, Qt::WindowFlags flags) :
|
||||||
QDockWidget(parent, flags),
|
QDockWidget(parent, flags),
|
||||||
m_locked(false),
|
m_locked(false),
|
||||||
m_dockTitleBar(0)
|
m_dockTitleBar(nullptr)
|
||||||
{
|
{
|
||||||
setFeatures(DefaultDockWidgetFeatures);
|
setFeatures(DefaultDockWidgetFeatures);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ void DolphinDockWidget::setLocked(bool lock)
|
||||||
setTitleBarWidget(m_dockTitleBar);
|
setTitleBarWidget(m_dockTitleBar);
|
||||||
setFeatures(QDockWidget::NoDockWidgetFeatures);
|
setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||||
} else {
|
} else {
|
||||||
setTitleBarWidget(0);
|
setTitleBarWidget(nullptr);
|
||||||
setFeatures(DefaultDockWidgetFeatures);
|
setFeatures(DefaultDockWidgetFeatures);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,8 @@
|
||||||
FoldersPanel::FoldersPanel(QWidget* parent) :
|
FoldersPanel::FoldersPanel(QWidget* parent) :
|
||||||
Panel(parent),
|
Panel(parent),
|
||||||
m_updateCurrentItem(false),
|
m_updateCurrentItem(false),
|
||||||
m_controller(0),
|
m_controller(nullptr),
|
||||||
m_model(0)
|
m_model(nullptr)
|
||||||
{
|
{
|
||||||
setLayoutDirection(Qt::LeftToRight);
|
setLayoutDirection(Qt::LeftToRight);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ FoldersPanel::~FoldersPanel()
|
||||||
|
|
||||||
if (m_controller) {
|
if (m_controller) {
|
||||||
KItemListView* view = m_controller->view();
|
KItemListView* view = m_controller->view();
|
||||||
m_controller->setView(0);
|
m_controller->setView(nullptr);
|
||||||
delete view;
|
delete view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ class FoldersPanel : public Panel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FoldersPanel(QWidget* parent = 0);
|
explicit FoldersPanel(QWidget* parent = nullptr);
|
||||||
virtual ~FoldersPanel();
|
virtual ~FoldersPanel();
|
||||||
|
|
||||||
void setShowHiddenFiles(bool show);
|
void setShowHiddenFiles(bool show);
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
|
|
||||||
FileMetaDataConfigurationDialog::FileMetaDataConfigurationDialog(QWidget* parent) :
|
FileMetaDataConfigurationDialog::FileMetaDataConfigurationDialog(QWidget* parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
m_descriptionLabel(0),
|
m_descriptionLabel(nullptr),
|
||||||
m_configWidget(0)
|
m_configWidget(nullptr)
|
||||||
|
|
||||||
{
|
{
|
||||||
setWindowTitle(i18nc("@title:window", "Configure Shown Data"));
|
setWindowTitle(i18nc("@title:window", "Configure Shown Data"));
|
||||||
|
|
|
@ -32,16 +32,16 @@
|
||||||
InformationPanel::InformationPanel(QWidget* parent) :
|
InformationPanel::InformationPanel(QWidget* parent) :
|
||||||
Panel(parent),
|
Panel(parent),
|
||||||
m_initialized(false),
|
m_initialized(false),
|
||||||
m_infoTimer(0),
|
m_infoTimer(nullptr),
|
||||||
m_urlChangedTimer(0),
|
m_urlChangedTimer(nullptr),
|
||||||
m_resetUrlTimer(0),
|
m_resetUrlTimer(nullptr),
|
||||||
m_shownUrl(),
|
m_shownUrl(),
|
||||||
m_urlCandidate(),
|
m_urlCandidate(),
|
||||||
m_invalidUrlCandidate(),
|
m_invalidUrlCandidate(),
|
||||||
m_fileItem(),
|
m_fileItem(),
|
||||||
m_selection(),
|
m_selection(),
|
||||||
m_folderStatJob(0),
|
m_folderStatJob(nullptr),
|
||||||
m_content(0)
|
m_content(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class InformationPanel : public Panel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit InformationPanel(QWidget* parent = 0);
|
explicit InformationPanel(QWidget* parent = nullptr);
|
||||||
virtual ~InformationPanel();
|
virtual ~InformationPanel();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
|
@ -41,7 +41,7 @@ class EmbeddedVideoPlayer : public Phonon::VideoWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EmbeddedVideoPlayer(QWidget *parent = 0) :
|
EmbeddedVideoPlayer(QWidget *parent = nullptr) :
|
||||||
Phonon::VideoWidget(parent)
|
Phonon::VideoWidget(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -64,13 +64,13 @@ class EmbeddedVideoPlayer : public Phonon::VideoWidget
|
||||||
PhononWidget::PhononWidget(QWidget *parent)
|
PhononWidget::PhononWidget(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
m_url(),
|
m_url(),
|
||||||
m_playButton(0),
|
m_playButton(nullptr),
|
||||||
m_stopButton(0),
|
m_stopButton(nullptr),
|
||||||
m_topLayout(0),
|
m_topLayout(nullptr),
|
||||||
m_media(0),
|
m_media(nullptr),
|
||||||
m_seekSlider(0),
|
m_seekSlider(nullptr),
|
||||||
m_audioOutput(0),
|
m_audioOutput(nullptr),
|
||||||
m_videoPlayer(0)
|
m_videoPlayer(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@ PlacesItem::PlacesItem(const KBookmark& bookmark, PlacesItem* parent) :
|
||||||
m_volume(),
|
m_volume(),
|
||||||
m_disc(),
|
m_disc(),
|
||||||
m_mtp(),
|
m_mtp(),
|
||||||
m_signalHandler(0),
|
m_signalHandler(nullptr),
|
||||||
m_trashDirLister(0),
|
m_trashDirLister(nullptr),
|
||||||
m_bookmark()
|
m_bookmark()
|
||||||
{
|
{
|
||||||
m_signalHandler = new PlacesItemSignalHandler(this);
|
m_signalHandler = new PlacesItemSignalHandler(this);
|
||||||
|
|
|
@ -47,7 +47,7 @@ class PlacesItemSignalHandler: public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PlacesItemSignalHandler(PlacesItem* item, QObject* parent = 0);
|
explicit PlacesItemSignalHandler(PlacesItem* item, QObject* parent = nullptr);
|
||||||
virtual ~PlacesItemSignalHandler();
|
virtual ~PlacesItemSignalHandler();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
|
@ -58,13 +58,14 @@
|
||||||
|
|
||||||
PlacesPanel::PlacesPanel(QWidget* parent) :
|
PlacesPanel::PlacesPanel(QWidget* parent) :
|
||||||
Panel(parent),
|
Panel(parent),
|
||||||
m_controller(0),
|
m_controller(nullptr),
|
||||||
m_model(0),
|
m_model(nullptr),
|
||||||
|
m_view(nullptr),
|
||||||
m_storageSetupFailedUrl(),
|
m_storageSetupFailedUrl(),
|
||||||
m_triggerStorageSetupButton(),
|
m_triggerStorageSetupButton(),
|
||||||
m_itemDropEventIndex(-1),
|
m_itemDropEventIndex(-1),
|
||||||
m_itemDropEventMimeData(0),
|
m_itemDropEventMimeData(nullptr),
|
||||||
m_itemDropEvent(0)
|
m_itemDropEvent(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ class PlacesPanel : public Panel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PlacesPanel(QWidget* parent);
|
explicit PlacesPanel(QWidget* parent);
|
||||||
virtual ~PlacesPanel();
|
virtual ~PlacesPanel();
|
||||||
void proceedWithTearDown();
|
void proceedWithTearDown();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class PlacesView : public KStandardItemListView
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PlacesView(QGraphicsWidget* parent = 0);
|
explicit PlacesView(QGraphicsWidget* parent = nullptr);
|
||||||
|
|
||||||
void setIconSize(int size);
|
void setIconSize(int size);
|
||||||
int iconSize() const;
|
int iconSize() const;
|
||||||
|
|
|
@ -45,7 +45,7 @@ class TerminalPanel : public Panel
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TerminalPanel(QWidget* parent = 0);
|
explicit TerminalPanel(QWidget* parent = nullptr);
|
||||||
virtual ~TerminalPanel();
|
virtual ~TerminalPanel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,23 +29,23 @@
|
||||||
|
|
||||||
DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) :
|
DolphinFacetsWidget::DolphinFacetsWidget(QWidget* parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
m_folders(0),
|
m_folders(nullptr),
|
||||||
m_documents(0),
|
m_documents(nullptr),
|
||||||
m_images(0),
|
m_images(nullptr),
|
||||||
m_audio(0),
|
m_audio(nullptr),
|
||||||
m_videos(0),
|
m_videos(nullptr),
|
||||||
m_anytime(0),
|
m_anytime(nullptr),
|
||||||
m_today(0),
|
m_today(nullptr),
|
||||||
m_yesterday(0),
|
m_yesterday(nullptr),
|
||||||
m_thisWeek(0),
|
m_thisWeek(nullptr),
|
||||||
m_thisMonth(0),
|
m_thisMonth(nullptr),
|
||||||
m_thisYear(0),
|
m_thisYear(nullptr),
|
||||||
m_anyRating(0),
|
m_anyRating(nullptr),
|
||||||
m_oneOrMore(0),
|
m_oneOrMore(nullptr),
|
||||||
m_twoOrMore(0),
|
m_twoOrMore(nullptr),
|
||||||
m_threeOrMore(0),
|
m_threeOrMore(nullptr),
|
||||||
m_fourOrMore(0),
|
m_fourOrMore(nullptr),
|
||||||
m_maxRating(0)
|
m_maxRating(nullptr)
|
||||||
{
|
{
|
||||||
QButtonGroup* filetypeGroup = new QButtonGroup(this);
|
QButtonGroup* filetypeGroup = new QButtonGroup(this);
|
||||||
m_anyType = createRadioButton(i18nc("@option:check", "Any"), filetypeGroup);
|
m_anyType = createRadioButton(i18nc("@option:check", "Any"), filetypeGroup);
|
||||||
|
|
|
@ -47,7 +47,7 @@ class DolphinFacetsWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DolphinFacetsWidget(QWidget* parent = 0);
|
explicit DolphinFacetsWidget(QWidget* parent = nullptr);
|
||||||
virtual ~DolphinFacetsWidget();
|
virtual ~DolphinFacetsWidget();
|
||||||
|
|
||||||
QString ratingTerm() const;
|
QString ratingTerm() const;
|
||||||
|
|
|
@ -34,15 +34,15 @@
|
||||||
BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
|
BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
|
||||||
SettingsPageBase(parent),
|
SettingsPageBase(parent),
|
||||||
m_url(url),
|
m_url(url),
|
||||||
m_localViewProps(0),
|
m_localViewProps(nullptr),
|
||||||
m_globalViewProps(0),
|
m_globalViewProps(nullptr),
|
||||||
m_showToolTips(0),
|
m_showToolTips(nullptr),
|
||||||
m_showSelectionToggle(0),
|
m_showSelectionToggle(nullptr),
|
||||||
m_naturalSorting(0),
|
m_naturalSorting(nullptr),
|
||||||
m_caseSensitiveSorting(0),
|
m_caseSensitiveSorting(nullptr),
|
||||||
m_caseInsensitiveSorting(0),
|
m_caseInsensitiveSorting(nullptr),
|
||||||
m_renameInline(0),
|
m_renameInline(nullptr),
|
||||||
m_useTabForSplitViewSwitch(0)
|
m_useTabForSplitViewSwitch(nullptr)
|
||||||
{
|
{
|
||||||
QVBoxLayout* topLayout = new QVBoxLayout(this);
|
QVBoxLayout* topLayout = new QVBoxLayout(this);
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
|
|
||||||
StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) :
|
StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) :
|
||||||
SettingsPageBase(parent),
|
SettingsPageBase(parent),
|
||||||
m_showZoomSlider(0),
|
m_showZoomSlider(nullptr),
|
||||||
m_showSpaceInfo(0)
|
m_showSpaceInfo(nullptr)
|
||||||
{
|
{
|
||||||
m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), this);
|
m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), this);
|
||||||
m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), this);
|
m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), this);
|
||||||
|
|
|
@ -42,12 +42,12 @@
|
||||||
StartupSettingsPage::StartupSettingsPage(const QUrl& url, QWidget* parent) :
|
StartupSettingsPage::StartupSettingsPage(const QUrl& url, QWidget* parent) :
|
||||||
SettingsPageBase(parent),
|
SettingsPageBase(parent),
|
||||||
m_url(url),
|
m_url(url),
|
||||||
m_homeUrl(0),
|
m_homeUrl(nullptr),
|
||||||
m_splitView(0),
|
m_splitView(nullptr),
|
||||||
m_editableUrl(0),
|
m_editableUrl(nullptr),
|
||||||
m_showFullPath(0),
|
m_showFullPath(nullptr),
|
||||||
m_filterBar(0),
|
m_filterBar(nullptr),
|
||||||
m_showFullPathInTitlebar(0)
|
m_showFullPathInTitlebar(nullptr)
|
||||||
{
|
{
|
||||||
QVBoxLayout* topLayout = new QVBoxLayout(this);
|
QVBoxLayout* topLayout = new QVBoxLayout(this);
|
||||||
QWidget* vBox = new QWidget(this);
|
QWidget* vBox = new QWidget(this);
|
||||||
|
|
Loading…
Reference in a new issue