Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a6db5029 authored by Kevin Funk's avatar Kevin Funk

Modernize: Use nullptr everywhere

parent 464b13f3
......@@ -66,14 +66,14 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent,
m_mainWindow(parent),
m_fileInfo(fileInfo),
m_baseUrl(baseUrl),
m_baseFileItem(0),
m_baseFileItem(nullptr),
m_selectedItems(),
m_selectedItemsProperties(nullptr),
m_context(NoContext),
m_copyToMenu(parent),
m_customActions(),
m_command(None),
m_removeAction(0)
m_removeAction(nullptr)
{
// The context menu either accesses the URLs of the selected items
// or the items itself. To increase the performance both lists are cached.
......@@ -337,7 +337,7 @@ void DolphinContextMenu::openViewportContextMenu()
addAction(m_mainWindow->actionCollection()->action(QStringLiteral("new_tab")));
// Insert 'Add to Places' entry if exactly one item is selected
QAction* addToPlacesAction = 0;
QAction* addToPlacesAction = nullptr;
if (!placeExists(m_mainWindow->activeViewContainer()->url())) {
addToPlacesAction = addAction(QIcon::fromTheme(QStringLiteral("bookmark-new")),
i18nc("@action:inmenu Add current folder to places", "Add to Places"));
......@@ -408,7 +408,7 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties&
if (showDeleteAction && showMoveToTrashAction) {
delete m_removeAction;
m_removeAction = 0;
m_removeAction = nullptr;
addAction(m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash)));
addAction(m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)));
} else if (showDeleteAction && !showMoveToTrashAction) {
......@@ -445,7 +445,7 @@ bool DolphinContextMenu::placeExists(const QUrl& url) const
QAction* DolphinContextMenu::createPasteAction()
{
QAction* action = 0;
QAction* action = nullptr;
const bool isDir = !m_fileInfo.isNull() && m_fileInfo.isDir();
if (isDir && (m_selectedItems.count() == 1)) {
const QMimeData *mimeData = QApplication::clipboard()->mimeData();
......
......@@ -30,8 +30,8 @@ class DolphinDockWidget : public QDockWidget
Q_OBJECT
public:
explicit DolphinDockWidget(const QString& title, QWidget* parent = 0, Qt::WindowFlags flags = 0);
explicit DolphinDockWidget(QWidget* parent = 0, Qt::WindowFlags flags = 0);
explicit DolphinDockWidget(const QString& title, QWidget* parent = nullptr, Qt::WindowFlags flags = nullptr);
explicit DolphinDockWidget(QWidget* parent = nullptr, Qt::WindowFlags flags = nullptr);
~DolphinDockWidget() override;
/**
......
......@@ -90,20 +90,20 @@ namespace {
}
DolphinMainWindow::DolphinMainWindow() :
KXmlGuiWindow(0),
m_newFileMenu(0),
m_tabWidget(0),
m_activeViewContainer(0),
m_actionHandler(0),
m_remoteEncoding(0),
KXmlGuiWindow(nullptr),
m_newFileMenu(nullptr),
m_tabWidget(nullptr),
m_activeViewContainer(nullptr),
m_actionHandler(nullptr),
m_remoteEncoding(nullptr),
m_settingsDialog(),
m_controlButton(0),
m_updateToolBarTimer(0),
m_lastHandleUrlStatJob(0),
m_controlButton(nullptr),
m_updateToolBarTimer(nullptr),
m_lastHandleUrlStatJob(nullptr),
#ifndef Q_OS_WIN
m_terminalPanel(0),
m_terminalPanel(nullptr),
#endif
m_placesPanel(0),
m_placesPanel(nullptr),
m_tearDownFromPlacesRequested(false)
{
Q_INIT_RESOURCE(dolphin);
......@@ -751,7 +751,7 @@ void DolphinMainWindow::editSettings()
void DolphinMainWindow::handleUrl(const QUrl& url)
{
delete m_lastHandleUrlStatJob;
m_lastHandleUrlStatJob = 0;
m_lastHandleUrlStatJob = nullptr;
if (url.isLocalFile() && QFileInfo(url.toLocalFile()).isDir()) {
activeViewContainer()->setUrl(url);
......@@ -771,7 +771,7 @@ void DolphinMainWindow::handleUrl(const QUrl& url)
void DolphinMainWindow::slotHandleUrlStatFinished(KJob* job)
{
m_lastHandleUrlStatJob = 0;
m_lastHandleUrlStatJob = nullptr;
const KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult();
const QUrl url = static_cast<KIO::StatJob*>(job)->url();
if (entry.isDir()) {
......@@ -912,7 +912,7 @@ void DolphinMainWindow::updateToolBar()
void DolphinMainWindow::slotControlButtonDeleted()
{
m_controlButton = 0;
m_controlButton = nullptr;
m_updateToolBarTimer->start();
}
......@@ -1174,7 +1174,7 @@ void DolphinMainWindow::setupActions()
}
// setup 'Settings' menu
KToggleAction* showMenuBar = KStandardAction::showMenubar(0, 0, actionCollection());
KToggleAction* showMenuBar = KStandardAction::showMenubar(nullptr, nullptr, actionCollection());
connect(showMenuBar, &KToggleAction::triggered, // Fixes #286822
this, &DolphinMainWindow::toggleShowMenuBar, Qt::QueuedConnection);
KStandardAction::preferences(this, SLOT(editSettings()), actionCollection());
......@@ -1436,10 +1436,10 @@ void DolphinMainWindow::createControlButton()
void DolphinMainWindow::deleteControlButton()
{
delete m_controlButton;
m_controlButton = 0;
m_controlButton = nullptr;
delete m_updateToolBarTimer;
m_updateToolBarTimer = 0;
m_updateToolBarTimer = nullptr;
}
bool DolphinMainWindow::addActionToMenu(QAction* action, QMenu* menu)
......
......@@ -60,8 +60,8 @@ K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantList& args)
: KParts::ReadOnlyPart(parent)
,m_openTerminalAction(0)
,m_removeAction(0)
,m_openTerminalAction(nullptr)
,m_removeAction(nullptr)
{
Q_UNUSED(args)
setComponentData(*createAboutData(), false);
......@@ -316,7 +316,7 @@ bool DolphinPart::openUrl(const QUrl &url)
QString prettyUrl = visibleUrl.toDisplayString(QUrl::PreferLocalFile);
emit setWindowCaption(prettyUrl);
emit m_extension->setLocationBarUrl(prettyUrl);
emit started(0); // get the wheel to spin
emit started(nullptr); // get the wheel to spin
m_view->setNameFilter(m_nameFilter);
m_view->setUrl(url);
updatePasteAction();
......@@ -431,7 +431,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos,
if (showDeleteAction && showMoveToTrashAction) {
delete m_removeAction;
m_removeAction = 0;
m_removeAction = nullptr;
editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash)));
editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)));
} else if (showDeleteAction && !showMoveToTrashAction) {
......
......@@ -86,7 +86,7 @@ void DolphinRecentTabsMenu::handleAction(QAction* action)
const QByteArray state = action->data().toByteArray();
removeAction(action);
delete action;
action = 0;
action = nullptr;
emit restoreClosedTab(state);
emit closedTabsCountChanged(menu()->actions().size() - 2);
}
......
......@@ -33,7 +33,7 @@ class DolphinTabPage : public QWidget
Q_OBJECT
public:
explicit DolphinTabPage(const QUrl& primaryUrl, const QUrl& secondaryUrl = QUrl(), QWidget* parent = 0);
explicit DolphinTabPage(const QUrl& primaryUrl, const QUrl& secondaryUrl = QUrl(), QWidget* parent = nullptr);
/**
* @return True if primary view is the active view in this tab.
......
......@@ -52,14 +52,14 @@
DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
QWidget(parent),
m_topLayout(0),
m_urlNavigator(0),
m_searchBox(0),
m_messageWidget(0),
m_view(0),
m_filterBar(0),
m_statusBar(0),
m_statusBarTimer(0),
m_topLayout(nullptr),
m_urlNavigator(nullptr),
m_searchBox(nullptr),
m_messageWidget(nullptr),
m_view(nullptr),
m_filterBar(nullptr),
m_statusBar(nullptr),
m_statusBarTimer(nullptr),
m_statusBarTimestamp(),
m_autoGrabFocus(true)
#ifdef KActivities_FOUND
......
......@@ -37,7 +37,7 @@ class FilterBar : public QWidget
Q_OBJECT
public:
explicit FilterBar(QWidget* parent = 0);
explicit FilterBar(QWidget* parent = nullptr);
~FilterBar() override;
/** Called by view container to hide this **/
......
......@@ -49,9 +49,9 @@ namespace {
KFileItemListView::KFileItemListView(QGraphicsWidget* parent) :
KStandardItemListView(parent),
m_modelRolesUpdater(0),
m_updateVisibleIndexRangeTimer(0),
m_updateIconSizeTimer(0)
m_modelRolesUpdater(nullptr),
m_updateVisibleIndexRangeTimer(nullptr),
m_updateIconSizeTimer(nullptr)
{
setAcceptDrops(true);
......@@ -229,7 +229,7 @@ void KFileItemListView::onModelChanged(KItemModelBase* current, KItemModelBase*
KStandardItemListView::onModelChanged(current, previous);
delete m_modelRolesUpdater;
m_modelRolesUpdater = 0;
m_modelRolesUpdater = nullptr;
if (current) {
m_modelRolesUpdater = new KFileItemModelRolesUpdater(static_cast<KFileItemModel*>(current), this);
......
......@@ -41,7 +41,7 @@ class DOLPHIN_EXPORT KFileItemListView : public KStandardItemListView
Q_OBJECT
public:
KFileItemListView(QGraphicsWidget* parent = 0);
KFileItemListView(QGraphicsWidget* parent = nullptr);
~KFileItemListView() override;
void setPreviewsShown(bool show);
......
......@@ -42,7 +42,7 @@
KFileItemModel::KFileItemModel(QObject* parent) :
KItemModelBase("text", parent),
m_dirLister(0),
m_dirLister(nullptr),
m_sortDirsFirst(true),
m_sortRole(NameRole),
m_sortingProgressPercent(-1),
......@@ -52,8 +52,8 @@ KFileItemModel::KFileItemModel(QObject* parent) :
m_filter(),
m_filteredItems(),
m_requestRole(),
m_maximumUpdateIntervalTimer(0),
m_resortAllItemsTimer(0),
m_maximumUpdateIntervalTimer(nullptr),
m_resortAllItemsTimer(nullptr),
m_pendingItemsToInsert(),
m_groups(),
m_expandedDirs(),
......@@ -251,7 +251,7 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const
QList<QUrl> urls;
QList<QUrl> mostLocalUrls;
bool canUseMostLocalUrls = true;
const ItemData* lastAddedItem = 0;
const ItemData* lastAddedItem = nullptr;
for (int index : indexes) {
const ItemData* itemData = m_itemData.at(index);
......@@ -2295,16 +2295,16 @@ const KFileItemModel::RoleInfoMap* KFileItemModel::rolesInfoMap(int& count)
{
static const RoleInfoMap rolesInfoMap[] = {
// | role | roleType | role translation | group translation | requires Baloo | requires indexer
{ 0, NoRole, 0, 0, 0, 0, false, false },
{ "text", NameRole, I18N_NOOP2_NOSTRIP("@label", "Name"), 0, 0, false, false },
{ "size", SizeRole, I18N_NOOP2_NOSTRIP("@label", "Size"), 0, 0, false, false },
{ "modificationtime", ModificationTimeRole, I18N_NOOP2_NOSTRIP("@label", "Modified"), 0, 0, false, false },
{ "creationtime", CreationTimeRole, I18N_NOOP2_NOSTRIP("@label", "Created"), 0, 0, false, false },
{ "accesstime", AccessTimeRole, I18N_NOOP2_NOSTRIP("@label", "Accessed"), 0, 0, false, false },
{ "type", TypeRole, I18N_NOOP2_NOSTRIP("@label", "Type"), 0, 0, false, false },
{ "rating", RatingRole, I18N_NOOP2_NOSTRIP("@label", "Rating"), 0, 0, true, false },
{ "tags", TagsRole, I18N_NOOP2_NOSTRIP("@label", "Tags"), 0, 0, true, false },
{ "comment", CommentRole, I18N_NOOP2_NOSTRIP("@label", "Comment"), 0, 0, true, false },
{ nullptr, NoRole, nullptr, nullptr, nullptr, nullptr, false, false },
{ "text", NameRole, I18N_NOOP2_NOSTRIP("@label", "Name"), nullptr, nullptr, false, false },
{ "size", SizeRole, I18N_NOOP2_NOSTRIP("@label", "Size"), nullptr, nullptr, false, false },
{ "modificationtime", ModificationTimeRole, I18N_NOOP2_NOSTRIP("@label", "Modified"), nullptr, nullptr, false, false },
{ "creationtime", CreationTimeRole, I18N_NOOP2_NOSTRIP("@label", "Created"), nullptr, nullptr, false, false },
{ "accesstime", AccessTimeRole, I18N_NOOP2_NOSTRIP("@label", "Accessed"), nullptr, nullptr, false, false },
{ "type", TypeRole, I18N_NOOP2_NOSTRIP("@label", "Type"), nullptr, nullptr, false, false },
{ "rating", RatingRole, I18N_NOOP2_NOSTRIP("@label", "Rating"), nullptr, nullptr, true, false },
{ "tags", TagsRole, I18N_NOOP2_NOSTRIP("@label", "Tags"), nullptr, nullptr, true, false },
{ "comment", CommentRole, I18N_NOOP2_NOSTRIP("@label", "Comment"), nullptr, nullptr, true, false },
{ "title", TitleRole, I18N_NOOP2_NOSTRIP("@label", "Title"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "wordCount", WordCountRole, I18N_NOOP2_NOSTRIP("@label", "Word Count"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
{ "lineCount", LineCountRole, I18N_NOOP2_NOSTRIP("@label", "Line Count"), I18N_NOOP2_NOSTRIP("@label", "Document"), true, true },
......
......@@ -50,7 +50,7 @@ class DOLPHIN_EXPORT KFileItemModel : public KItemModelBase
Q_OBJECT
public:
explicit KFileItemModel(QObject* parent = 0);
explicit KFileItemModel(QObject* parent = nullptr);
~KFileItemModel() override;
/**
......
......@@ -88,12 +88,12 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO
m_pendingIndexes(),
m_pendingPreviewItems(),
m_previewJob(),
m_recentlyChangedItemsTimer(0),
m_recentlyChangedItemsTimer(nullptr),
m_recentlyChangedItems(),
m_changedItems(),
m_directoryContentsCounter(0)
m_directoryContentsCounter(nullptr)
#ifdef HAVE_BALOO
, m_balooFileMonitor(0)
, m_balooFileMonitor(nullptr)
#endif
{
Q_ASSERT(model);
......@@ -296,7 +296,7 @@ void KFileItemModelRolesUpdater::setRoles(const QSet<QByteArray>& roles)
this, &KFileItemModelRolesUpdater::applyChangedBalooRoles);
} else if (!hasBalooRole && m_balooFileMonitor) {
delete m_balooFileMonitor;
m_balooFileMonitor = 0;
m_balooFileMonitor = nullptr;
}
#endif
......@@ -594,7 +594,7 @@ void KFileItemModelRolesUpdater::slotPreviewFailed(const KFileItem& item)
void KFileItemModelRolesUpdater::slotPreviewJobFinished()
{
m_previewJob = 0;
m_previewJob = nullptr;
if (m_state != PreviewJobRunning) {
return;
......@@ -1138,7 +1138,7 @@ void KFileItemModelRolesUpdater::killPreviewJob()
disconnect(m_previewJob, &KIO::PreviewJob::finished,
this, &KFileItemModelRolesUpdater::slotPreviewJobFinished);
m_previewJob->kill();
m_previewJob = 0;
m_previewJob = nullptr;
m_pendingPreviewItems.clear();
}
}
......
......@@ -94,7 +94,7 @@ class DOLPHIN_EXPORT KFileItemModelRolesUpdater : public QObject
Q_OBJECT
public:
explicit KFileItemModelRolesUpdater(KFileItemModel* model, QObject* parent = 0);
explicit KFileItemModelRolesUpdater(KFileItemModel* model, QObject* parent = nullptr);
~KFileItemModelRolesUpdater() override;
void setIconSize(const QSize& size);
......
......@@ -70,8 +70,8 @@ void KItemListContainerViewport::wheelEvent(QWheelEvent* event)
KItemListContainer::KItemListContainer(KItemListController* controller, QWidget* parent) :
QAbstractScrollArea(parent),
m_controller(controller),
m_horizontalSmoothScroller(0),
m_verticalSmoothScroller(0)
m_horizontalSmoothScroller(nullptr),
m_verticalSmoothScroller(nullptr)
{
Q_ASSERT(controller);
controller->setParent(this);
......@@ -83,10 +83,10 @@ KItemListContainer::KItemListContainer(KItemListController* controller, QWidget*
m_verticalSmoothScroller = new KItemListSmoothScroller(verticalScrollBar(), this);
if (controller->model()) {
slotModelChanged(controller->model(), 0);
slotModelChanged(controller->model(), nullptr);
}
if (controller->view()) {
slotViewChanged(controller->view(), 0);
slotViewChanged(controller->view(), nullptr);
}
connect(controller, &KItemListController::modelChanged,
......@@ -100,7 +100,7 @@ KItemListContainer::~KItemListContainer()
// Don't rely on the QObject-order to delete the controller, otherwise
// the QGraphicsScene might get deleted before the view.
delete m_controller;
m_controller = 0;
m_controller = nullptr;
}
KItemListController* KItemListContainer::controller() const
......@@ -216,8 +216,8 @@ void KItemListContainer::slotViewChanged(KItemListView* current, KItemListView*
disconnect(previous, &KItemListView::maximumItemOffsetChanged,
this, &KItemListContainer::updateItemOffsetScrollBar);
disconnect(previous, &KItemListView::scrollTo, this, &KItemListContainer::scrollTo);
m_horizontalSmoothScroller->setTargetObject(0);
m_verticalSmoothScroller->setTargetObject(0);
m_horizontalSmoothScroller->setTargetObject(nullptr);
m_verticalSmoothScroller->setTargetObject(nullptr);
}
if (current) {
scene->addItem(current);
......@@ -257,8 +257,8 @@ void KItemListContainer::updateScrollOffsetScrollBar()
return;
}
KItemListSmoothScroller* smoothScroller = 0;
QScrollBar* scrollOffsetScrollBar = 0;
KItemListSmoothScroller* smoothScroller = nullptr;
QScrollBar* scrollOffsetScrollBar = nullptr;
int singleStep = 0;
int pageStep = 0;
int maximum = 0;
......@@ -308,8 +308,8 @@ void KItemListContainer::updateItemOffsetScrollBar()
return;
}
KItemListSmoothScroller* smoothScroller = 0;
QScrollBar* itemOffsetScrollBar = 0;
KItemListSmoothScroller* smoothScroller = nullptr;
QScrollBar* itemOffsetScrollBar = nullptr;
int singleStep = 0;
int pageStep = 0;
if (view->scrollOrientation() == Qt::Vertical) {
......
......@@ -50,7 +50,7 @@ public:
* (the parent will be set to the KItemListContainer).
* @param parent Optional parent widget.
*/
explicit KItemListContainer(KItemListController* controller, QWidget* parent = 0);
explicit KItemListContainer(KItemListController* controller, QWidget* parent = nullptr);
~KItemListContainer() override;
KItemListController* controller() const;
......
......@@ -49,13 +49,13 @@ KItemListController::KItemListController(KItemModelBase* model, KItemListView* v
m_selectionBehavior(NoSelection),
m_autoActivationBehavior(ActivationAndExpansion),
m_mouseDoubleClickAction(ActivateItemOnly),
m_model(0),
m_view(0),
m_model(nullptr),
m_view(nullptr),
m_selectionManager(new KItemListSelectionManager(this)),
m_keyboardManager(new KItemListKeyboardSearchManager(this)),
m_pressedIndex(-1),
m_pressedMousePos(),
m_autoActivationTimer(0),
m_autoActivationTimer(nullptr),
m_oldSelection(),
m_keyboardAnchorIndex(-1),
m_keyboardAnchorPos(0)
......@@ -76,10 +76,10 @@ KItemListController::KItemListController(KItemModelBase* model, KItemListView* v
KItemListController::~KItemListController()
{
setView(0);
setView(nullptr);
Q_ASSERT(!m_view);
setModel(0);
setModel(nullptr);
Q_ASSERT(!m_model);
}
......@@ -1216,7 +1216,7 @@ KItemListWidget* KItemListController::hoveredWidget() const
}
}
return 0;
return nullptr;
}
KItemListWidget* KItemListController::widgetForPos(const QPointF& pos) const
......@@ -1233,7 +1233,7 @@ KItemListWidget* KItemListController::widgetForPos(const QPointF& pos) const
}
}
return 0;
return nullptr;
}
void KItemListController::updateKeyboardAnchor()
......
......@@ -88,7 +88,7 @@ public:
* @param view View of the controller. The ownership is passed to the controller.
* @param parent Optional parent object.
*/
KItemListController(KItemModelBase* model, KItemListView* view, QObject* parent = 0);
KItemListController(KItemModelBase* model, KItemListView* view, QObject* parent = nullptr);
~KItemListController() override;
void setModel(KItemModelBase* model);
......
......@@ -29,7 +29,7 @@
#include <QStyleOptionGraphicsItem>
KItemListGroupHeader::KItemListGroupHeader(QGraphicsWidget* parent) :
QGraphicsWidget(parent, 0),
QGraphicsWidget(parent, nullptr),
m_dirtyCache(true),
m_role(),
m_data(),
......
......@@ -42,7 +42,7 @@ class DOLPHIN_EXPORT KItemListGroupHeader : public QGraphicsWidget
Q_OBJECT
public:
KItemListGroupHeader(QGraphicsWidget* parent = 0);
KItemListGroupHeader(QGraphicsWidget* parent = nullptr);
~KItemListGroupHeader() override;
void setRole(const QByteArray& role);
......@@ -65,7 +65,7 @@ public:
void setItemIndex(int index);
int itemIndex() const;
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
protected:
virtual void paintRole(QPainter* painter, const QRectF& roleBounds, const QColor& color) = 0;
......
......@@ -31,7 +31,7 @@ KItemListSelectionManager::KItemListSelectionManager(QObject* parent) :
m_anchorItem(-1),
m_selectedItems(),
m_isAnchoredSelectionActive(false),
m_model(0)
m_model(nullptr)
{
}
......
......@@ -51,7 +51,7 @@ public:
Toggle
};
KItemListSelectionManager(QObject* parent = 0);
KItemListSelectionManager(QObject* parent = nullptr);
~KItemListSelectionManager() override;
void setCurrentItem(int current);
......
......@@ -67,7 +67,7 @@ QAccessibleInterface* accessibleInterfaceFactory(const QString& key, QObject* ob
return new KItemListViewAccessible(view);
}
return 0;
return nullptr;
}
#endif
......@@ -80,30 +80,30 @@ KItemListView::KItemListView(QGraphicsWidget* parent) :
m_activeTransactions(0),
m_endTransactionAnimationHint(Animation),
m_itemSize(),
m_controller(0),
m_model(0),
m_controller(nullptr),
m_model(nullptr),
m_visibleRoles(),
m_widgetCreator(0),
m_groupHeaderCreator(0),
m_widgetCreator(nullptr),
m_groupHeaderCreator(nullptr),
m_styleOption(),
m_visibleItems(),
m_visibleGroups(),
m_visibleCells(),
m_sizeHintResolver(0),
m_layouter(0),
m_animation(0),
m_layoutTimer(0),
m_sizeHintResolver(nullptr),
m_layouter(nullptr),
m_animation(nullptr),
m_layoutTimer(nullptr),
m_oldScrollOffset(0),
m_oldMaximumScrollOffset(0),
m_oldItemOffset(0),
m_oldMaximumItemOffset(0),
m_skipAutoScrollForRubberBand(false),
m_rubberBand(0),
m_rubberBand(nullptr),
m_mousePos(),
m_autoScrollIncrement(0),
m_autoScrollTimer(0),
m_header(0),
m_headerWidget(0),
m_autoScrollTimer(nullptr),
m_header(nullptr),
m_headerWidget(nullptr),
m_dropIndicator()
{
setAcceptHoverEvents(true);
......@@ -141,13 +141,13 @@ KItemListView::~KItemListView()
// widgetCreator(). So it is mandatory to delete the group headers
// first.
delete m_groupHeaderCreator;
m_groupHeaderCreator = 0;
m_groupHeaderCreator = nullptr;
delete m_widgetCreator;
m_widgetCreator = 0;
m_widgetCreator = nullptr;
delete m_sizeHintResolver;
m_sizeHintResolver = 0;
m_sizeHintResolver = nullptr;
}
void KItemListView::setScrollOffset(qreal offset)
......@@ -270,13 +270,13 @@ void KItemListView::setAutoScroll(bool enabled)
m_autoScrollTimer->start(InitialAutoScrollDelay);
} else if (!enabled && m_autoScrollTimer) {
delete m_autoScrollTimer;
m_autoScrollTimer = 0;
m_autoScrollTimer = nullptr;
}
}
bool KItemListView::autoScroll() const
{
return m_autoScrollTimer != 0;