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.
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"));
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) {
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();
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;
/**
}
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);
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);
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()) {
void DolphinMainWindow::slotControlButtonDeleted()
{
- m_controlButton = 0;
+ m_controlButton = nullptr;
m_updateToolBarTimer->start();
}
}
// 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());
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)
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);
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();
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) {
const QByteArray state = action->data().toByteArray();
removeAction(action);
delete action;
- action = 0;
+ action = nullptr;
emit restoreClosedTab(state);
emit closedTabsCountChanged(menu()->actions().size() - 2);
}
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.
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
Q_OBJECT
public:
- explicit FilterBar(QWidget* parent = 0);
+ explicit FilterBar(QWidget* parent = nullptr);
~FilterBar() override;
/** Called by view container to hide this **/
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);
KStandardItemListView::onModelChanged(current, previous);
delete m_modelRolesUpdater;
- m_modelRolesUpdater = 0;
+ m_modelRolesUpdater = nullptr;
if (current) {
m_modelRolesUpdater = new KFileItemModelRolesUpdater(static_cast<KFileItemModel*>(current), this);
Q_OBJECT
public:
- KFileItemListView(QGraphicsWidget* parent = 0);
+ KFileItemListView(QGraphicsWidget* parent = nullptr);
~KFileItemListView() override;
void setPreviewsShown(bool show);
KFileItemModel::KFileItemModel(QObject* parent) :
KItemModelBase("text", parent),
- m_dirLister(0),
+ m_dirLister(nullptr),
m_sortDirsFirst(true),
m_sortRole(NameRole),
m_sortingProgressPercent(-1),
m_filter(),
m_filteredItems(),
m_requestRole(),
- m_maximumUpdateIntervalTimer(0),
- m_resortAllItemsTimer(0),
+ m_maximumUpdateIntervalTimer(nullptr),
+ m_resortAllItemsTimer(nullptr),
m_pendingItemsToInsert(),
m_groups(),
m_expandedDirs(),
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);
{
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 },
Q_OBJECT
public:
- explicit KFileItemModel(QObject* parent = 0);
+ explicit KFileItemModel(QObject* parent = nullptr);
~KFileItemModel() override;
/**
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);
this, &KFileItemModelRolesUpdater::applyChangedBalooRoles);
} else if (!hasBalooRole && m_balooFileMonitor) {
delete m_balooFileMonitor;
- m_balooFileMonitor = 0;
+ m_balooFileMonitor = nullptr;
}
#endif
void KFileItemModelRolesUpdater::slotPreviewJobFinished()
{
- m_previewJob = 0;
+ m_previewJob = nullptr;
if (m_state != PreviewJobRunning) {
return;
disconnect(m_previewJob, &KIO::PreviewJob::finished,
this, &KFileItemModelRolesUpdater::slotPreviewJobFinished);
m_previewJob->kill();
- m_previewJob = 0;
+ m_previewJob = nullptr;
m_pendingPreviewItems.clear();
}
}
Q_OBJECT
public:
- explicit KFileItemModelRolesUpdater(KFileItemModel* model, QObject* parent = 0);
+ explicit KFileItemModelRolesUpdater(KFileItemModel* model, QObject* parent = nullptr);
~KFileItemModelRolesUpdater() override;
void setIconSize(const QSize& size);
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);
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,
// 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
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);
return;
}
- KItemListSmoothScroller* smoothScroller = 0;
- QScrollBar* scrollOffsetScrollBar = 0;
+ KItemListSmoothScroller* smoothScroller = nullptr;
+ QScrollBar* scrollOffsetScrollBar = nullptr;
int singleStep = 0;
int pageStep = 0;
int maximum = 0;
return;
}
- KItemListSmoothScroller* smoothScroller = 0;
- QScrollBar* itemOffsetScrollBar = 0;
+ KItemListSmoothScroller* smoothScroller = nullptr;
+ QScrollBar* itemOffsetScrollBar = nullptr;
int singleStep = 0;
int pageStep = 0;
if (view->scrollOrientation() == Qt::Vertical) {
* (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;
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)
KItemListController::~KItemListController()
{
- setView(0);
+ setView(nullptr);
Q_ASSERT(!m_view);
- setModel(0);
+ setModel(nullptr);
Q_ASSERT(!m_model);
}
}
}
- return 0;
+ return nullptr;
}
KItemListWidget* KItemListController::widgetForPos(const QPointF& pos) const
}
}
- return 0;
+ return nullptr;
}
void KItemListController::updateKeyboardAnchor()
* @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);
#include <QStyleOptionGraphicsItem>
KItemListGroupHeader::KItemListGroupHeader(QGraphicsWidget* parent) :
- QGraphicsWidget(parent, 0),
+ QGraphicsWidget(parent, nullptr),
m_dirtyCache(true),
m_role(),
m_data(),
Q_OBJECT
public:
- KItemListGroupHeader(QGraphicsWidget* parent = 0);
+ KItemListGroupHeader(QGraphicsWidget* parent = nullptr);
~KItemListGroupHeader() override;
void setRole(const QByteArray& role);
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;
m_anchorItem(-1),
m_selectedItems(),
m_isAnchoredSelectionActive(false),
- m_model(0)
+ m_model(nullptr)
{
}
Toggle
};
- KItemListSelectionManager(QObject* parent = 0);
+ KItemListSelectionManager(QObject* parent = nullptr);
~KItemListSelectionManager() override;
void setCurrentItem(int current);
return new KItemListViewAccessible(view);
}
- return 0;
+ return nullptr;
}
#endif
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);
// 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)
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;
+ return m_autoScrollTimer != nullptr;
}
void KItemListView::setEnabledSelectionToggles(bool enabled)
KItemListWidget* item = m_visibleItems.value(indexes.first());
QGraphicsView* graphicsView = scene()->views()[0];
if (item && graphicsView) {
- pixmap = item->createDragPixmap(0, graphicsView);
+ pixmap = item->createDragPixmap(nullptr, graphicsView);
}
} else {
// TODO: Not implemented yet. Probably extend the interface
KItemListWidgetCreatorBase* KItemListView::defaultWidgetCreator() const
{
- return 0;
+ return nullptr;
}
KItemListGroupHeaderCreatorBase* KItemListView::defaultGroupHeaderCreator() const
{
- return 0;
+ return nullptr;
}
void KItemListView::initializeItemListWidget(KItemListWidget* item)
{
KItemListGroupHeader* header = m_visibleGroups.value(widget);
if (header) {
- header->setParentItem(0);
+ header->setParentItem(nullptr);
groupHeaderCreator()->recycle(header);
m_visibleGroups.remove(widget);
disconnect(widget, &KItemListWidget::geometryChanged, this, &KItemListView::slotGeometryOfGroupHeaderParentChanged);
const int parents = m_model->expandedParentsCount(lastIndex + 1);
for (int i = lastIndex; i >= firstIndex; --i) {
if (m_model->expandedParentsCount(i) != parents) {
- widget = 0;
+ widget = nullptr;
break;
}
}
QGraphicsWidget* KItemListCreatorBase::popRecycleableWidget()
{
if (m_recycleableWidgets.isEmpty()) {
- return 0;
+ return nullptr;
}
QGraphicsWidget* widget = m_recycleableWidgets.takeLast();
void KItemListWidgetCreatorBase::recycle(KItemListWidget* widget)
{
- widget->setParentItem(0);
+ widget->setParentItem(nullptr);
widget->setOpacity(1.0);
pushRecycleableWidget(widget);
}
Q_PROPERTY(qreal itemOffset READ itemOffset WRITE setItemOffset)
public:
- KItemListView(QGraphicsWidget* parent = 0);
+ KItemListView(QGraphicsWidget* parent = nullptr);
~KItemListView() override;
/**
*/
void editRole(int index, const QByteArray& role);
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
signals:
void scrollOrientationChanged(Qt::Orientation current, Qt::Orientation previous);
if (type == QAccessible::TableInterface) {
return static_cast<QAccessibleTableInterface*>(this);
}
- return Q_NULLPTR;
+ return nullptr;
}
void KItemListViewAccessible::modelReset()
QAccessibleInterface* KItemListViewAccessible::cell(int index) const
{
if (index < 0 || index >= view()->model()->count()) {
- return 0;
+ return nullptr;
}
if (m_cells.size() <= index) {
QAccessibleInterface* KItemListViewAccessible::caption() const
{
- return 0;
+ return nullptr;
}
QString KItemListViewAccessible::columnDescription(int) const
QAccessibleInterface* KItemListViewAccessible::summary() const
{
- return 0;
+ return nullptr;
}
bool KItemListViewAccessible::isColumnSelected(int) const
QAccessibleInterface* KItemListViewAccessible::parent() const
{
// FIXME: return KItemListContainerAccessible here
- return Q_NULLPTR;
+ return nullptr;
}
int KItemListViewAccessible::childCount() const
if (index >= 0 && index < childCount()) {
return cell(index);
}
- return Q_NULLPTR;
+ return nullptr;
}
// Table Cell
if (type == QAccessible::TableCellInterface) {
return static_cast<QAccessibleTableCellInterface*>(this);
}
- return Q_NULLPTR;
+ return nullptr;
}
int KItemListAccessibleCell::columnExtent() const
QAccessibleInterface* KItemListAccessibleCell::child(int) const
{
- return Q_NULLPTR;
+ return nullptr;
}
bool KItemListAccessibleCell::isValid() const
QAccessibleInterface* KItemListAccessibleCell::childAt(int, int) const
{
- return Q_NULLPTR;
+ return nullptr;
}
int KItemListAccessibleCell::childCount() const
QObject* KItemListAccessibleCell::object() const
{
- return 0;
+ return nullptr;
}
// Container Interface
if (index == 0) {
return QAccessible::queryAccessibleInterface(container()->controller()->view());
}
- return Q_NULLPTR;
+ return nullptr;
}
const KItemListContainer* KItemListContainerAccessible::container() const
}
KItemListWidget::KItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent) :
- QGraphicsWidget(parent, 0),
+ QGraphicsWidget(parent, nullptr),
m_informant(informant),
m_index(-1),
m_selected(false),
m_styleOption(),
m_siblingsInfo(),
m_hoverOpacity(0),
- m_hoverCache(0),
- m_hoverAnimation(0),
- m_selectionToggle(0),
+ m_hoverCache(nullptr),
+ m_hoverAnimation(nullptr),
+ m_selectionToggle(nullptr),
m_editedRole()
{
}
{
if (m_index != index) {
delete m_selectionToggle;
- m_selectionToggle = 0;
+ m_selectionToggle = nullptr;
if (m_hoverAnimation) {
m_hoverAnimation->stop();
{
if (!m_hovered && m_selectionToggle) {
m_selectionToggle->deleteLater();
- m_selectionToggle = 0;
+ m_selectionToggle = nullptr;
}
}
if (m_hoverOpacity <= 0.0) {
delete m_hoverCache;
- m_hoverCache = 0;
+ m_hoverCache = nullptr;
}
update();
void KItemListWidget::clearHoverCache()
{
delete m_hoverCache;
- m_hoverCache = 0;
+ m_hoverCache = nullptr;
}
void KItemListWidget::drawItemStyleOption(QPainter* painter, QWidget* widget, QStyle::State styleState)
* to show the data of the custom model provided by KItemListWidget::data().
* @reimp
*/
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
void setVisibleRoles(const QList<QByteArray>& roles);
QList<QByteArray> visibleRoles() const;
* @return Pixmap that is used when dragging an item. Per default the current state of the
* widget is returned as pixmap.
*/
- virtual QPixmap createDragPixmap(const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ virtual QPixmap createDragPixmap(const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr);
signals:
void roleEditingCanceled(int index, const QByteArray& role, const QVariant& value);
QMimeData* KItemModelBase::createMimeData(const KItemSet& indexes) const
{
Q_UNUSED(indexes);
- return 0;
+ return nullptr;
}
int KItemModelBase::indexForKeyboardSearch(const QString& text, int startFromIndex) const
Q_OBJECT
public:
- KItemModelBase(QObject* parent = 0);
- explicit KItemModelBase(const QByteArray& sortRole, QObject* parent = 0);
+ KItemModelBase(QObject* parent = nullptr);
+ explicit KItemModelBase(const QByteArray& sortRole, QObject* parent = nullptr);
~KItemModelBase() override;
/** @return The number of items. */
KStandardItem::KStandardItem(KStandardItem* parent) :
m_parent(parent),
m_children(),
- m_model(0),
+ m_model(nullptr),
m_data()
{
}
KStandardItem::KStandardItem(const QString& text, KStandardItem* parent) :
m_parent(parent),
m_children(),
- m_model(0),
+ m_model(nullptr),
m_data()
{
setText(text);
KStandardItem::KStandardItem(const QString& icon, const QString& text, KStandardItem* parent) :
m_parent(parent),
m_children(),
- m_model(0),
+ m_model(nullptr),
m_data()
{
setIcon(icon);
{
public:
- explicit KStandardItem(KStandardItem* parent = 0);
- explicit KStandardItem(const QString& text, KStandardItem* parent = 0);
- KStandardItem(const QString& icon, const QString& text, KStandardItem* parent = 0);
+ explicit KStandardItem(KStandardItem* parent = nullptr);
+ explicit KStandardItem(const QString& text, KStandardItem* parent = nullptr);
+ KStandardItem(const QString& icon, const QString& text, KStandardItem* parent = nullptr);
KStandardItem(const KStandardItem& item);
virtual ~KStandardItem();
Q_OBJECT
public:
- KStandardItemListGroupHeader(QGraphicsWidget* parent = 0);
+ KStandardItemListGroupHeader(QGraphicsWidget* parent = nullptr);
~KStandardItemListGroupHeader() override;
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
protected:
void paintRole(QPainter* painter, const QRectF& roleBounds, const QColor& color) override;
DetailsLayout
};
- KStandardItemListView(QGraphicsWidget* parent = 0);
+ KStandardItemListView(QGraphicsWidget* parent = nullptr);
~KStandardItemListView() override;
void setItemLayout(ItemLayout layout);
m_additionalInfoTextColor(),
m_overlay(),
m_rating(),
- m_roleEditor(0),
- m_oldRoleEditor(0)
+ m_roleEditor(nullptr),
+ m_oldRoleEditor(nullptr)
{
}
}
m_oldRoleEditor = m_roleEditor;
m_roleEditor->hide();
- m_roleEditor = 0;
+ m_roleEditor = nullptr;
}
return;
}
}
m_oldRoleEditor = m_roleEditor;
m_roleEditor->hide();
- m_roleEditor = 0;
+ m_roleEditor = nullptr;
}
QPixmap KStandardItemListWidget::pixmapForIcon(const QString& name, const QStringList& overlays, int size, QIcon::Mode mode)
void setSupportsItemExpanding(bool supportsItemExpanding);
bool supportsItemExpanding() const;
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
QRectF iconRect() const override;
QRectF textRect() const override;
QRectF selectionRect() const override;
QRectF expansionToggleRect() const override;
QRectF selectionToggleRect() const override;
- QPixmap createDragPixmap(const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
+ QPixmap createDragPixmap(const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
static KItemListWidgetInformant* createInformant();
m_indexesForItems.remove(oldItem);
delete oldItem;
- oldItem = 0;
+ oldItem = nullptr;
m_items[index] = item;
m_indexesForItems.insert(item, index);
onItemRemoved(index, item);
delete item;
- item = 0;
+ item = nullptr;
emit itemsRemoved(KItemRangeList() << KItemRange(index, 1));
KStandardItem* KStandardItemModel::item(int index) const
{
if (index < 0 || index >= m_items.count()) {
- return 0;
+ return nullptr;
}
return m_items[index];
}
QMimeData* KStandardItemModel::createMimeData(const KItemSet& indexes) const
{
Q_UNUSED(indexes);
- return 0;
+ return nullptr;
}
int KStandardItemModel::indexForKeyboardSearch(const QString& text, int startFromIndex) const
Q_OBJECT
public:
- explicit KStandardItemModel(QObject* parent = 0);
+ explicit KStandardItemModel(QObject* parent = nullptr);
~KStandardItemModel() override;
/**
QObject(parent),
m_model(model),
m_queue(),
- m_worker(0),
+ m_worker(nullptr),
m_workerIsBusy(false),
- m_dirWatcher(0),
+ m_dirWatcher(nullptr),
m_watchedDirs()
{
connect(m_model, &KFileItemModel::itemsRemoved,
m_workerThread->quit();
m_workerThread->wait();
delete m_workerThread;
- m_workerThread = 0;
+ m_workerThread = nullptr;
// The worker thread has finished running now, so it's safe to delete
// m_worker. deleteLater() would not work at all because the event loop
}
}
-QThread* KDirectoryContentsCounter::m_workerThread = 0;
+QThread* KDirectoryContentsCounter::m_workerThread = nullptr;
int KDirectoryContentsCounter::m_workersCount = 0;
Q_OBJECT
public:
- explicit KDirectoryContentsCounter(KFileItemModel* model, QObject* parent = 0);
+ explicit KDirectoryContentsCounter(KFileItemModel* model, QObject* parent = nullptr);
~KDirectoryContentsCounter() override;
/**
DIR* dir = ::opendir(QFile::encodeName(path));
if (dir) { // krazy:exclude=syscalls
count = 0;
- struct dirent *dirEntry = 0;
+ struct dirent *dirEntry = nullptr;
while ((dirEntry = ::readdir(dir))) {
if (dirEntry->d_name[0] == '.') {
if (dirEntry->d_name[1] == '\0' || !countHiddenFiles) {
};
Q_DECLARE_FLAGS(Options, Option)
- explicit KDirectoryContentsCounterWorker(QObject* parent = 0);
+ explicit KDirectoryContentsCounterWorker(QObject* parent = nullptr);
/**
* Counts the items inside the directory \a path using the options
}
KFileItemClipboard::KFileItemClipboard() :
- QObject(0),
+ QObject(nullptr),
m_cutItems()
{
updateCutItems();
KFileItemModelDirLister::KFileItemModelDirLister(QObject* parent) :
KDirLister(parent)
{
- setAutoErrorHandlingEnabled(false, 0);
+ setAutoErrorHandlingEnabled(false, nullptr);
}
KFileItemModelDirLister::~KFileItemModelDirLister()
Q_OBJECT
public:
- KFileItemModelDirLister(QObject* parent = 0);
+ KFileItemModelDirLister(QObject* parent = nullptr);
~KFileItemModelDirLister() override;
signals:
KFileItemModelFilter::KFileItemModelFilter() :
m_useRegExp(false),
- m_regExp(0),
+ m_regExp(nullptr),
m_lowerCasePattern(),
m_pattern()
{
KFileItemModelFilter::~KFileItemModelFilter()
{
delete m_regExp;
- m_regExp = 0;
+ m_regExp = nullptr;
}
void KFileItemModelFilter::setPattern(const QString& filter)
KItemListHeaderWidget::KItemListHeaderWidget(QGraphicsWidget* parent) :
QGraphicsWidget(parent),
m_automaticColumnResizing(true),
- m_model(0),
+ m_model(nullptr),
m_offset(0),
m_columns(),
m_columnWidths(),
Q_OBJECT
public:
- KItemListHeaderWidget(QGraphicsWidget* parent = 0);
+ KItemListHeaderWidget(QGraphicsWidget* parent = nullptr);
~KItemListHeaderWidget() override;
void setModel(KItemModelBase* model);
qreal minimumColumnWidth() const;
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
signals:
/**
const QByteArray& role,
const QRectF& rect,
int orderIndex,
- QWidget* widget = 0) const;
+ QWidget* widget = nullptr) const;
void updatePressedRoleIndex(const QPointF& pos);
void updateHoveredRoleIndex(const QPointF& pos);
public:
- KItemListKeyboardSearchManager(QObject* parent = 0);
+ KItemListKeyboardSearchManager(QObject* parent = nullptr);
~KItemListKeyboardSearchManager() override;
/**
Q_OBJECT
public:
- explicit KItemListRubberBand(QObject* parent = 0);
+ explicit KItemListRubberBand(QObject* parent = nullptr);
~KItemListRubberBand() override;
void setStartPosition(const QPointF& pos);
KItemListSelectionToggle::KItemListSelectionToggle(QGraphicsItem* parent) :
- QGraphicsWidget(parent, 0),
+ QGraphicsWidget(parent, nullptr),
m_checked(false),
m_hovered(false)
{
void setHovered(bool hovered);
- void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
protected:
void resizeEvent(QGraphicsSceneResizeEvent* event) override;
m_scrollBarPressed(false),
m_smoothScrolling(true),
m_scrollBar(scrollBar),
- m_animation(0)
+ m_animation(nullptr)
{
m_animation = new QPropertyAnimation(this);
const int duration = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animate, nullptr, m_scrollBar) ? 100 : 1;
public:
explicit KItemListSmoothScroller(QScrollBar* scrollBar,
- QObject* parent = 0);
+ QObject* parent = nullptr);
~KItemListSmoothScroller() override;
void setScrollBar(QScrollBar* scrollBar);
{
stop(widget, type);
- QPropertyAnimation* propertyAnim = 0;
+ QPropertyAnimation* propertyAnim = nullptr;
const int animationDuration = widget->style()->styleHint(QStyle::SH_Widget_Animate) ? 200 : 1;
switch (type) {
ResizeAnimation
};
- KItemListViewAnimation(QObject* parent = 0);
+ KItemListViewAnimation(QObject* parent = nullptr);
~KItemListViewAnimation() override;
void setScrollOrientation(Qt::Orientation orientation);
m_itemSize(128, 128),
m_itemMargin(),
m_headerHeight(0),
- m_model(0),
+ m_model(nullptr),
m_sizeHintResolver(sizeHintResolver),
m_scrollOffset(0),
m_maximumScrollOffset(0),
Q_OBJECT
public:
- KItemListViewLayouter(KItemListSizeHintResolver* sizeHintResolver, QObject* parent = 0);
+ KItemListViewLayouter(KItemListSizeHintResolver* sizeHintResolver, QObject* parent = nullptr);
~KItemListViewLayouter() override;
void setScrollOrientation(Qt::Orientation orientation);
Q_OBJECT
public:
- explicit FileMetaDataConfigurationDialog(QWidget* parent = 0);
+ explicit FileMetaDataConfigurationDialog(QWidget* parent = nullptr);
~FileMetaDataConfigurationDialog() override;
/**
void InformationPanel::slotFolderStatFinished(KJob* job)
{
- m_folderStatJob = 0;
+ m_folderStatJob = nullptr;
const KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult();
m_content->showItem(KFileItem(entry, m_shownUrl));
}
void InformationPanel::cancelRequest()
{
delete m_folderStatJob;
- m_folderStatJob = 0;
+ m_folderStatJob = nullptr;
m_infoTimer->stop();
m_resetUrlTimer->stop();
InformationPanelContent::InformationPanelContent(QWidget* parent) :
QWidget(parent),
m_item(),
- m_previewJob(0),
- m_outdatedPreviewTimer(0),
- m_preview(0),
- m_phononWidget(0),
- m_nameLabel(0),
- m_metaDataWidget(0),
- m_metaDataArea(0),
- m_placesItemModel(0)
+ m_previewJob(nullptr),
+ m_outdatedPreviewTimer(nullptr),
+ m_preview(nullptr),
+ m_phononWidget(nullptr),
+ m_nameLabel(nullptr),
+ m_metaDataWidget(nullptr),
+ m_metaDataArea(nullptr),
+ m_placesItemModel(nullptr)
{
parent->installEventFilter(this);
Q_OBJECT
public:
- explicit InformationPanelContent(QWidget* parent = 0);
+ explicit InformationPanelContent(QWidget* parent = nullptr);
~InformationPanelContent() override;
/**
{
Q_OBJECT
public:
- PhononWidget(QWidget *parent = 0);
+ PhononWidget(QWidget *parent = nullptr);
void setUrl(const QUrl &url);
QUrl url() const;
Q_OBJECT
public:
- explicit Panel(QWidget* parent = 0);
+ explicit Panel(QWidget* parent = nullptr);
~Panel() override;
/** Returns the current set URL of the active Dolphin view. */
// watches for changes if the number of items has been changed.
// The update of the icon is handled in onTrashDirListerCompleted().
m_trashDirLister = new KDirLister();
- m_trashDirLister->setAutoErrorHandlingEnabled(false, 0);
+ m_trashDirLister->setAutoErrorHandlingEnabled(false, nullptr);
m_trashDirLister->setDelayedMimeTypes(true);
QObject::connect(m_trashDirLister.data(), static_cast<void(KDirLister::*)()>(&KDirLister::completed),
m_signalHandler.data(), &PlacesItemSignalHandler::onTrashDirListerCompleted);
DevicesType
};
- explicit PlacesItem(const KBookmark& bookmark, PlacesItem* parent = 0);
+ explicit PlacesItem(const KBookmark& bookmark, PlacesItem* parent = nullptr);
~PlacesItem() override;
void setUrl(const QUrl& url);
m_text(),
m_url(),
m_allowGlobal(false),
- m_urlEdit(0),
- m_textEdit(0),
- m_iconButton(0),
- m_appLocal(0),
+ m_urlEdit(nullptr),
+ m_textEdit(nullptr),
+ m_iconButton(nullptr),
+ m_appLocal(nullptr),
m_buttonBox(nullptr)
{
}
Q_OBJECT
public:
- explicit PlacesItemEditDialog(QWidget* parent = 0);
+ explicit PlacesItemEditDialog(QWidget* parent = nullptr);
~PlacesItemEditDialog() override;
void setIcon(const QString& icon);
Q_OBJECT
public:
- PlacesItemListGroupHeader(QGraphicsWidget* parent = 0);
+ PlacesItemListGroupHeader(QGraphicsWidget* parent = nullptr);
~PlacesItemListGroupHeader() override;
protected:
m_hiddenItemsShown(false),
m_availableDevices(),
m_predicate(),
- m_bookmarkManager(0),
+ m_bookmarkManager(nullptr),
m_systemBookmarks(),
m_systemBookmarksIndexes(),
m_bookmarkedItems(),
m_hiddenItemToRemove(-1),
- m_deviceToTearDown(0),
- m_updateBookmarksTimer(0),
+ m_deviceToTearDown(nullptr),
+ m_updateBookmarksTimer(nullptr),
m_storageSetupInProgress()
{
#ifdef HAVE_BALOO
{
const PlacesItem* item = placesItem(index);
if (item && item->device().is<Solid::OpticalDisc>()) {
- return new QAction(QIcon::fromTheme(QStringLiteral("media-eject")), i18nc("@item", "Eject"), 0);
+ return new QAction(QIcon::fromTheme(QStringLiteral("media-eject")), i18nc("@item", "Eject"), nullptr);
}
- return 0;
+ return nullptr;
}
QAction* PlacesItemModel::teardownAction(int index) const
{
const PlacesItem* item = placesItem(index);
if (!item) {
- return 0;
+ return nullptr;
}
Solid::Device device = item->device();
const bool providesTearDown = device.is<Solid::StorageAccess>() &&
device.as<Solid::StorageAccess>()->isAccessible();
if (!providesTearDown) {
- return 0;
+ return nullptr;
}
Solid::StorageDrive* drive = device.as<Solid::StorageDrive>();
}
if (iconName.isEmpty()) {
- return new QAction(text, 0);
+ return new QAction(text, nullptr);
}
- return new QAction(QIcon::fromTheme(iconName), text, 0);
+ return new QAction(QIcon::fromTheme(iconName), text, nullptr);
}
void PlacesItemModel::requestEject(int index)
int modelIndex = 0;
for (int i = m_bookmarkedItems.count() - 1; i >= 0; --i) {
PlacesItem* item = m_bookmarkedItems[i];
- const bool itemIsPartOfModel = (item == 0);
+ const bool itemIsPartOfModel = (item == nullptr);
if (itemIsPartOfModel) {
item = placesItem(modelIndex);
}
Q_OBJECT
public:
- explicit PlacesItemModel(QObject* parent = 0);
+ explicit PlacesItemModel(QObject* parent = nullptr);
~PlacesItemModel() override;
/**
QMenu menu(this);
- QAction* emptyTrashAction = 0;
- QAction* editAction = 0;
- QAction* teardownAction = 0;
- QAction* ejectAction = 0;
+ QAction* emptyTrashAction = nullptr;
+ QAction* editAction = nullptr;
+ QAction* teardownAction = nullptr;
+ QAction* ejectAction = nullptr;
const QString label = item->text();
editAction = menu.addAction(QIcon::fromTheme("document-properties"), i18nc("@item:inmenu", "Edit..."));
}
- QAction* removeAction = 0;
+ QAction* removeAction = nullptr;
if (!isDevice && !item->isSystemItem()) {
removeAction = menu.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@item:inmenu", "Remove"));
}
QAction* addAction = menu.addAction(QIcon::fromTheme(QStringLiteral("document-new")), i18nc("@item:inmenu", "Add Entry..."));
- QAction* showAllAction = 0;
+ QAction* showAllAction = nullptr;
if (m_model->hiddenCount() > 0) {
showAllAction = menu.addAction(i18nc("@item:inmenu", "Show All Entries"));
showAllAction->setCheckable(true);
delete m_itemDropEvent;
m_itemDropEventIndex = -1;
- m_itemDropEventMimeData = 0;
- m_itemDropEvent = 0;
+ m_itemDropEventMimeData = nullptr;
+ m_itemDropEvent = nullptr;
}
}
emit errorMessage(job->errorString());
}
// as long as KIO doesn't do this, do it ourselves
- KNotification::event(QStringLiteral("Trash: emptied"), QString(), QPixmap(), 0, KNotification::DefaultEvent);
+ KNotification::event(QStringLiteral("Trash: emptied"), QString(), QPixmap(), nullptr, KNotification::DefaultEvent);
}
void PlacesPanel::slotStorageSetupDone(int index, bool success)
TerminalPanel::TerminalPanel(QWidget* parent) :
Panel(parent),
m_clearTerminal(true),
- m_mostLocalUrlJob(0),
- m_layout(0),
- m_terminal(0),
- m_terminalWidget(0),
- m_konsolePart(0),
+ m_mostLocalUrlJob(nullptr),
+ m_layout(nullptr),
+ m_terminal(nullptr),
+ m_terminalWidget(nullptr),
+ m_konsolePart(nullptr),
m_konsolePartCurrentDirectory(),
m_sendCdToTerminalHistory()
{
void TerminalPanel::terminalExited()
{
- m_terminal = 0;
+ m_terminal = nullptr;
emit hideTerminalPanel();
}
if (!m_terminal) {
m_clearTerminal = true;
- KPluginFactory* factory = 0;
+ KPluginFactory* factory = nullptr;
KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart"));
if (service) {
factory = KPluginLoader(service->library()).factory();
}
- m_konsolePart = factory ? (factory->create<KParts::ReadOnlyPart>(this)) : 0;
+ m_konsolePart = factory ? (factory->create<KParts::ReadOnlyPart>(this)) : nullptr;
if (m_konsolePart) {
connect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited);
m_terminalWidget = m_konsolePart->widget();
void TerminalPanel::changeDir(const QUrl& url)
{
delete m_mostLocalUrlJob;
- m_mostLocalUrlJob = 0;
+ m_mostLocalUrlJob = nullptr;
if (url.isLocalFile()) {
sendCdToTerminal(url.toLocalFile());
sendCdToTerminal(url.toLocalFile());
}
- m_mostLocalUrlJob = 0;
+ m_mostLocalUrlJob = nullptr;
}
void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir)
QWidget(parent),
m_startedSearching(false),
m_active(true),
- m_topLayout(0),
- m_searchLabel(0),
- m_searchInput(0),
- m_saveSearchAction(0),
- m_optionsScrollArea(0),
- m_fileNameButton(0),
- m_contentButton(0),
- m_separator(0),
- m_fromHereButton(0),
- m_everywhereButton(0),
- m_facetsToggleButton(0),
- m_facetsWidget(0),
+ m_topLayout(nullptr),
+ m_searchLabel(nullptr),
+ m_searchInput(nullptr),
+ m_saveSearchAction(nullptr),
+ m_optionsScrollArea(nullptr),
+ m_fileNameButton(nullptr),
+ m_contentButton(nullptr),
+ m_separator(nullptr),
+ m_fromHereButton(nullptr),
+ m_everywhereButton(nullptr),
+ m_facetsToggleButton(nullptr),
+ m_facetsWidget(nullptr),
m_searchPath(),
- m_startSearchTimer(0)
+ m_startSearchTimer(nullptr)
{
}
Q_OBJECT
public:
- explicit DolphinSearchBox(QWidget* parent = 0);
+ explicit DolphinSearchBox(QWidget* parent = nullptr);
~DolphinSearchBox() override;
/**
const QList<QByteArray>& visibleRoles) :
QDialog(parent),
m_visibleRoles(visibleRoles),
- m_listWidget(0)
+ m_listWidget(nullptr)
{
setWindowTitle(i18nc("@title:window", "Additional Information"));
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
ApplyViewPropsJob::ApplyViewPropsJob(const QUrl& dir,
const ViewProperties& viewProps) :
KIO::Job(),
- m_viewProps(0),
+ m_viewProps(nullptr),
m_progress(0),
m_dir(dir)
{
ApplyViewPropsJob::~ApplyViewPropsJob()
{
delete m_viewProps; // the properties are written by the destructor
- m_viewProps = 0;
+ m_viewProps = nullptr;
}
void ApplyViewPropsJob::slotEntries(KIO::Job*, const KIO::UDSEntryList& list)
Q_OBJECT
public:
- explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = 0);
+ explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = nullptr);
~DolphinSettingsDialog() override;
signals:
ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) :
SettingsPageBase(parent),
- m_confirmMoveToTrash(0),
- m_confirmDelete(0),
- m_confirmClosingMultipleTabs(0)
+ m_confirmMoveToTrash(nullptr),
+ m_confirmDelete(nullptr),
+ m_confirmClosingMultipleTabs(nullptr)
{
QVBoxLayout* topLayout = new QVBoxLayout(this);
m_pages.append(confirmationsPage);
m_pages.append(statusBarPage);
- topLayout->addWidget(tabWidget, 0, 0);
+ topLayout->addWidget(tabWidget, 0, nullptr);
}
GeneralSettingsPage::~GeneralSettingsPage()
PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
SettingsPageBase(parent),
m_initialized(false),
- m_listView(0),
+ m_listView(nullptr),
m_enabledPreviewPlugins(),
- m_remoteFileSizeBox(0)
+ m_remoteFileSizeBox(nullptr)
{
QVBoxLayout* topLayout = new QVBoxLayout(this);
m_pages.append(previewsPage);
m_pages.append(confirmationsPage);
- topLayout->addWidget(tabWidget, 0, 0);
+ topLayout->addWidget(tabWidget, 0, nullptr);
}
DolphinGeneralConfigModule::~DolphinGeneralConfigModule()
DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget* parent, const QVariantList& args) :
KCModule(parent),
- m_navigation(0)
+ m_navigation(nullptr)
{
Q_UNUSED(args);
m_navigation = new NavigationSettingsPage(this);
connect(m_navigation, &NavigationSettingsPage::changed, this, static_cast<void(DolphinNavigationConfigModule::*)()>(&DolphinNavigationConfigModule::changed));
- topLayout->addWidget(m_navigation, 0, 0);
+ topLayout->addWidget(m_navigation, 0, nullptr);
}
DolphinNavigationConfigModule::~DolphinNavigationConfigModule()
DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) :
KCModule(parent),
- m_services(0)
+ m_services(nullptr)
{
Q_UNUSED(args);
m_services = new ServicesSettingsPage(this);
connect(m_services, &ServicesSettingsPage::changed, this, static_cast<void(DolphinServicesConfigModule::*)()>(&DolphinServicesConfigModule::changed));
- topLayout->addWidget(m_services, 0, 0);
+ topLayout->addWidget(m_services, 0, nullptr);
}
DolphinServicesConfigModule::~DolphinServicesConfigModule()
m_tabs.append(compactTab);
m_tabs.append(detailsTab);
- topLayout->addWidget(tabWidget, 0, 0);
+ topLayout->addWidget(tabWidget, 0, nullptr);
}
DolphinViewModesConfigModule::~DolphinViewModesConfigModule()
NavigationSettingsPage::NavigationSettingsPage(QWidget* parent) :
SettingsPageBase(parent),
- m_openArchivesAsFolder(0),
- m_autoExpandFolders(0)
+ m_openArchivesAsFolder(nullptr),
+ m_autoExpandFolders(nullptr)
{
QVBoxLayout* topLayout = new QVBoxLayout(this);
QWidget* vBox = new QWidget(this);
Q_OBJECT
public:
- explicit ServiceItemDelegate(QAbstractItemView* itemView, QObject* parent = 0);
+ explicit ServiceItemDelegate(QAbstractItemView* itemView, QObject* parent = nullptr);
~ServiceItemDelegate() override;
QSize sizeHint(const QStyleOptionViewItem &option,
ConfigurableRole
};
- explicit ServiceModel(QObject* parent = 0);
+ explicit ServiceModel(QObject* parent = nullptr);
~ServiceModel() override;
bool insertRows(int row, int count, const QModelIndex & parent = QModelIndex()) override;
ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) :
SettingsPageBase(parent),
m_initialized(false),
- m_serviceModel(0),
- m_sortModel(0),
- m_listView(0),
+ m_serviceModel(nullptr),
+ m_sortModel(nullptr),
+ m_listView(nullptr),
m_enabledVcsPlugins()
{
QVBoxLayout* topLayout = new QVBoxLayout(this);
Q_OBJECT
public:
- explicit SettingsPageBase(QWidget* parent = 0);
+ explicit SettingsPageBase(QWidget* parent = nullptr);
~SettingsPageBase() override;
/**
DolphinFontRequester::DolphinFontRequester(QWidget* parent) :
QWidget(parent),
- m_modeCombo(0),
- m_chooseFontButton(0),
+ m_modeCombo(nullptr),
+ m_chooseFontButton(nullptr),
m_mode(SystemFont),
m_customFont()
{
m_tabs.append(compactTab);
m_tabs.append(detailsTab);
- topLayout->addWidget(tabWidget, 0, 0);
+ topLayout->addWidget(tabWidget, 0, nullptr);
}
ViewSettingsPage::~ViewSettingsPage()
ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) :
QWidget(parent),
m_mode(mode),
- m_defaultSizeSlider(0),
- m_previewSizeSlider(0),
- m_fontRequester(0),
- m_widthBox(0),
- m_maxLinesBox(0),
- m_expandableFolders(0)
+ m_defaultSizeSlider(nullptr),
+ m_previewSizeSlider(nullptr),
+ m_fontRequester(nullptr),
+ m_widthBox(nullptr),
+ m_maxLinesBox(nullptr),
+ m_expandableFolders(nullptr)
{
QVBoxLayout* topLayout = new QVBoxLayout(this);
void ViewSettingsTab::restoreDefaultSettings()
{
- KConfigSkeleton* settings = 0;
+ KConfigSkeleton* settings = nullptr;
switch (m_mode) {
case IconsMode: settings = IconsModeSettings::self(); break;
case CompactMode: settings = CompactModeSettings::self(); break;
DetailsMode
};
- explicit ViewSettingsTab(Mode mode, QWidget* parent = 0);
+ explicit ViewSettingsTab(Mode mode, QWidget* parent = nullptr);
~ViewSettingsTab() override;
void applySettings();
QDialog(dolphinView),
m_isDirty(false),
m_dolphinView(dolphinView),
- m_viewProps(0),
- m_viewMode(0),
- m_sortOrder(0),
- m_sorting(0),
- m_sortFoldersFirst(0),
- m_previewsShown(0),
- m_showInGroups(0),
- m_showHiddenFiles(0),
- m_additionalInfo(0),
- m_applyToCurrentFolder(0),
- m_applyToSubFolders(0),
- m_applyToAllFolders(0),
- m_useAsDefault(0)
+ m_viewProps(nullptr),
+ m_viewMode(nullptr),
+ m_sortOrder(nullptr),
+ m_sorting(nullptr),
+ m_sortFoldersFirst(nullptr),
+ m_previewsShown(nullptr),
+ m_showInGroups(nullptr),
+ m_showHiddenFiles(nullptr),
+ m_additionalInfo(nullptr),
+ m_applyToCurrentFolder(nullptr),
+ m_applyToSubFolders(nullptr),
+ m_applyToAllFolders(nullptr),
+ m_useAsDefault(nullptr)
{
Q_ASSERT(dolphinView);
const bool useGlobalViewProps = GeneralSettings::globalViewProps();
{
m_isDirty = false;
delete m_viewProps;
- m_viewProps = 0;
+ m_viewProps = nullptr;
KConfigGroup dialogConfig(KSharedConfig::openConfig(QStringLiteral("dolphinrc")), "ViewPropertiesDialog");
KWindowConfig::saveWindowSize(windowHandle(), dialogConfig);
const ViewProperties& viewProps) :
QDialog(parent),
m_dir(dir),
- m_viewProps(0),
- m_label(0),
- m_progressBar(0),
- m_dirSizeJob(0),
- m_applyViewPropsJob(0),
- m_timer(0)
+ m_viewProps(nullptr),
+ m_label(nullptr),
+ m_progressBar(nullptr),
+ m_dirSizeJob(nullptr),
+ m_applyViewPropsJob(nullptr),
+ m_timer(nullptr)
{
const QSize minSize = minimumSize();
setMinimumSize(QSize(320, minSize.height()));
ViewPropsProgressInfo::~ViewPropsProgressInfo()
{
delete m_viewProps;
- m_viewProps = 0;
+ m_viewProps = nullptr;
}
void ViewPropsProgressInfo::closeEvent(QCloseEvent* event)
{
m_timer->stop();
- m_applyViewPropsJob = 0;
+ m_applyViewPropsJob = nullptr;
QDialog::closeEvent(event);
}
{
if (m_dirSizeJob) {
m_dirSizeJob->kill();
- m_dirSizeJob = 0;
+ m_dirSizeJob = nullptr;
}
if (m_applyViewPropsJob) {
m_applyViewPropsJob->kill();
- m_applyViewPropsJob = 0;
+ m_applyViewPropsJob = nullptr;
}
QDialog::reject();
m_label->setText(i18nc("@info:progress", "Folders: %1", subdirs));
m_progressBar->setMaximum(subdirs);
- m_dirSizeJob = 0;
+ m_dirSizeJob = nullptr;
m_applyViewPropsJob = new ApplyViewPropsJob(m_dir, *m_viewProps);
connect(m_applyViewPropsJob, &ApplyViewPropsJob::result,
QWidget(parent),
m_text(),
m_defaultText(),
- m_label(0),
- m_spaceInfo(0),
- m_zoomSlider(0),
- m_progressBar(0),
- m_stopButton(0),
+ m_label(nullptr),
+ m_spaceInfo(nullptr),
+ m_zoomSlider(nullptr),
+ m_progressBar(nullptr),
+ m_stopButton(nullptr),
m_progress(100),
- m_showProgressBarTimer(0),
- m_resetToDefaultTextTimer(0),
+ m_showProgressBarTimer(nullptr),
+ m_resetToDefaultTextTimer(nullptr),
m_textTimestamp()
{
// Initialize text label
{
Q_OBJECT
- explicit MountPointObserver(const QUrl& url, QObject* parent = 0);
+ explicit MountPointObserver(const QUrl& url, QObject* parent = nullptr);
~MountPointObserver() override {}
public:
MountPointObserverCache::MountPointObserverCache() :
m_observerForMountPoint(),
m_mountPointForObserver(),
- m_updateTimer(0)
+ m_updateTimer(nullptr)
{
m_updateTimer = new QTimer(this);
}
SpaceInfoObserver::SpaceInfoObserver(const QUrl& url, QObject* parent) :
QObject(parent),
- m_mountPointObserver(0),
+ m_mountPointObserver(nullptr),
m_dataSize(0),
m_dataAvailable(0)
{
{
if (m_mountPointObserver) {
m_mountPointObserver->deref();
- m_mountPointObserver = 0;
+ m_mountPointObserver = nullptr;
}
}
if (m_mountPointObserver) {
disconnect(m_mountPointObserver, &MountPointObserver::spaceInfoChanged, this, &SpaceInfoObserver::spaceInfoChanged);
m_mountPointObserver->deref();
- m_mountPointObserver = 0;
+ m_mountPointObserver = nullptr;
}
m_mountPointObserver = newObserver;
Q_OBJECT
public:
- explicit SpaceInfoObserver(const QUrl& url, QObject* parent = 0);
+ explicit SpaceInfoObserver(const QUrl& url, QObject* parent = nullptr);
~SpaceInfoObserver() override;
quint64 size() const;
StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) :
KCapacityBar(KCapacityBar::DrawTextInline, parent),
- m_observer(0)
+ m_observer(nullptr)
{
setCursor(Qt::PointingHandCursor);
}
Q_OBJECT
public:
- explicit StatusBarSpaceInfo(QWidget* parent = 0);
+ explicit StatusBarSpaceInfo(QWidget* parent = nullptr);
~StatusBarSpaceInfo() override;
void setUrl(const QUrl& url);
m_model->m_dirLister->setAutoUpdate(false);
m_listView = new KFileItemListView();
- m_listView->onModelChanged(m_model, 0);
+ m_listView->onModelChanged(m_model, nullptr);
m_graphicsView = new QGraphicsView();
m_graphicsView->show();
void KFileItemListViewTest::cleanup()
{
delete m_graphicsView;
- m_graphicsView = 0;
+ m_graphicsView = nullptr;
delete m_listView;
- m_listView = 0;
+ m_listView = nullptr;
delete m_model;
- m_model = 0;
+ m_model = nullptr;
delete m_testDir;
- m_testDir = 0;
+ m_testDir = nullptr;
}
/**
void KFileItemModelTest::cleanup()
{
delete m_model;
- m_model = 0;
+ m_model = nullptr;
delete m_testDir;
- m_testDir = 0;
+ m_testDir = nullptr;
}
void KFileItemModelTest::testDefaultRoles()
void KItemListControllerTest::cleanupTestCase()
{
delete m_container;
- m_container = 0;
+ m_container = nullptr;
delete m_testDir;
- m_testDir = 0;
+ m_testDir = nullptr;
}
/** Before each test, the current item, selection, and item size are reset to the defaults. */
void KItemListSelectionManagerTest::cleanup()
{
delete m_selectionManager;
- m_selectionManager = 0;
+ m_selectionManager = nullptr;
delete m_model;
- m_model = 0;
+ m_model = nullptr;
}
void KItemListSelectionManagerTest::testConstructor()
void KStandardItemModelTest::cleanup()
{
delete m_model;
- m_model = 0;
+ m_model = nullptr;
}
void KStandardItemModelTest::testNewItems()
void ViewPropertiesTest::cleanup()
{
delete m_testDir;
- m_testDir = 0;
+ m_testDir = nullptr;
GeneralSettings::self()->setGlobalViewProps(m_globalViewProps);
GeneralSettings::self()->save();
Q_OBJECT
public:
- explicit DolphinItemListView(QGraphicsWidget* parent = 0);
+ explicit DolphinItemListView(QGraphicsWidget* parent = nullptr);
~DolphinItemListView() override;
void setZoomLevel(int level);
}
DolphinNewFileMenuObserver::DolphinNewFileMenuObserver() :
- QObject(0)
+ QObject(nullptr)
{
}
m_viewPropertiesContext(),
m_mode(DolphinView::IconsView),
m_visibleRoles(),
- m_topLayout(0),
- m_model(0),
- m_view(0),
- m_container(0),
- m_toolTipManager(0),
- m_selectionChangedTimer(0),
+ m_topLayout(nullptr),
+ m_model(nullptr),
+ m_view(nullptr),
+ m_container(nullptr),
+ m_toolTipManager(nullptr),
+ m_selectionChangedTimer(nullptr),
m_currentItemUrl(),
m_scrollToCurrentItem(false),
m_restoredContentsPosition(),
m_selectedUrls(),
m_clearSelectionBeforeSelectingNewItems(false),
m_markFirstNewlySelectedItemAsCurrent(false),
- m_versionControlObserver(0),
+ m_versionControlObserver(nullptr),
m_twoClicksRenamingTimer(nullptr)
{
m_topLayout = new QVBoxLayout(this);
#endif
QString groupName;
- QMenu* groupMenu = 0;
+ QMenu* groupMenu = nullptr;
// Add all roles to the menu that can be shown or hidden by the user
const QList<KFileItemModel::RoleInfo> rolesInfo = KFileItemModel::rolesInformation();
}
const QString text = m_model->roleDescription(info.role);
- QAction* action = 0;
+ QAction* action = nullptr;
if (info.group.isEmpty()) {
action = menu->addAction(text);
} else {
void DolphinView::slotModelChanged(KItemModelBase* current, KItemModelBase* previous)
{
- if (previous != 0) {
+ if (previous != nullptr) {
Q_ASSERT(qobject_cast<KFileItemModel*>(previous));
KFileItemModel* fileItemModel = static_cast<KFileItemModel*>(previous);
disconnect(fileItemModel, &KFileItemModel::directoryLoadingCompleted, this, &DolphinView::slotDirectoryLoadingCompleted);
- m_versionControlObserver->setModel(0);
+ m_versionControlObserver->setModel(nullptr);
}
if (current) {
DolphinViewActionHandler::DolphinViewActionHandler(KActionCollection* collection, QObject* parent) :
QObject(parent),
m_actionCollection(collection),
- m_currentView(0),
+ m_currentView(nullptr),
m_sortByActions(),
m_visibleRoles()
{
Q_ASSERT(view);
if (m_currentView) {
- disconnect(m_currentView, 0, this, 0);
+ disconnect(m_currentView, nullptr, this, nullptr);
}
m_currentView = view;
}
QString groupName;
- KActionMenu* groupMenu = 0;
- QActionGroup* groupMenuGroup = 0;
+ KActionMenu* groupMenu = nullptr;
+ QActionGroup* groupMenuGroup = nullptr;
bool indexingEnabled = false;
#ifdef HAVE_BALOO
continue;
}
- KToggleAction* action = 0;
+ KToggleAction* action = nullptr;
const QString name = groupPrefix + info.role;
if (info.group.isEmpty()) {
action = m_actionCollection->add<KToggleAction>(name);
void DolphinViewActionHandler::slotProperties()
{
- KPropertiesDialog* dialog = 0;
+ KPropertiesDialog* dialog = nullptr;
const KFileItemList list = m_currentView->selectedItems();
if (list.isEmpty()) {
const QUrl url = m_currentView->url();
return job;
}
- return 0;
+ return nullptr;
}
QDialog(parent),
m_renameOneItem(false),
m_newName(),
- m_lineEdit(0),
+ m_lineEdit(nullptr),
m_items(items),
m_allExtensionsDifferent(true),
- m_spinBox(0)
+ m_spinBox(nullptr)
{
const QSize minSize = minimumSize();
setMinimumSize(QSize(320, minSize.height()));
QVBoxLayout* topLayout = new QVBoxLayout(page);
- QLabel* editLabel = 0;
+ QLabel* editLabel = nullptr;
if (m_renameOneItem) {
m_newName = items.first().name();
editLabel = new QLabel(xi18nc("@label:textbox", "Rename the item <filename>%1</filename> to:", m_newName),
DolphinFileMetaDataWidget::DolphinFileMetaDataWidget(QWidget* parent) :
QWidget(parent),
- m_preview(0),
- m_name(0),
- m_fileMetaDataWidget(0)
+ m_preview(nullptr),
+ m_name(nullptr),
+ m_fileMetaDataWidget(nullptr)
{
// Create widget for file preview
m_preview = new QLabel(this);
Q_OBJECT
public:
- DolphinFileMetaDataWidget(QWidget* parent = 0);
+ DolphinFileMetaDataWidget(QWidget* parent = nullptr);
~DolphinFileMetaDataWidget() override;
void setPreview(const QPixmap& pixmap);
ToolTipManager::ToolTipManager(QWidget* parent) :
QObject(parent),
- m_showToolTipTimer(0),
- m_contentRetrievalTimer(0),
- m_transientParent(0),
- m_fileMetaDataWidget(0),
+ m_showToolTipTimer(nullptr),
+ m_contentRetrievalTimer(nullptr),
+ m_transientParent(nullptr),
+ m_fileMetaDataWidget(nullptr),
m_toolTipRequested(false),
m_metaDataRequested(false),
m_appliedWaitCursor(false),
MissingVersion
};
- KVersionControlPlugin(QObject* parent = 0);
+ KVersionControlPlugin(QObject* parent = nullptr);
~KVersionControlPlugin() override;
/**
UpdateItemStatesThread::UpdateItemStatesThread(KVersionControlPlugin* plugin,
const QMap<QString, QVector<VersionControlObserver::ItemState> >& itemStates) :
QThread(),
- m_globalPluginMutex(0),
+ m_globalPluginMutex(nullptr),
m_plugin(plugin),
m_itemStates(itemStates)
{
m_pendingItemStatesUpdate(false),
m_versionedDirectory(false),
m_silentUpdate(false),
- m_model(0),
- m_dirVerificationTimer(0),
- m_plugin(0),
- m_updateItemStatesThread(0)
+ m_model(nullptr),
+ m_dirVerificationTimer(nullptr),
+ m_plugin(nullptr),
+ m_updateItemStatesThread(nullptr)
{
// The verification timer specifies the timeout until the shown directory
// is checked whether it is versioned. Per default it is assumed that users
{
if (m_plugin) {
m_plugin->disconnect(this);
- m_plugin = 0;
+ m_plugin = nullptr;
}
}
void VersionControlObserver::slotThreadFinished()
{
UpdateItemStatesThread* thread = m_updateItemStatesThread;
- m_updateItemStatesThread = 0; // The thread deletes itself automatically (see updateItemStates())
+ m_updateItemStatesThread = nullptr; // The thread deletes itself automatically (see updateItemStates())
if (!m_plugin || !thread) {
return;
if (!pluginsAvailable) {
// A searching for plugins has already been done, but no
// plugins are installed
- return 0;
+ return nullptr;
}
if (plugins.isEmpty()) {
}
if (plugins.isEmpty()) {
pluginsAvailable = false;
- return 0;
+ return nullptr;
}
}
// We use the number of upUrl() calls to find the best matching plugin
// for the given directory. The smaller value, the better it is (0 is best).
- KVersionControlPlugin* bestPlugin = 0;
+ KVersionControlPlugin* bestPlugin = nullptr;
int bestScore = INT_MAX;
// Verify whether the current directory contains revision information
Q_OBJECT
public:
- explicit VersionControlObserver(QObject* parent = 0);
+ explicit VersionControlObserver(QObject* parent = nullptr);
~VersionControlObserver() override;
void setModel(KFileItemModel* model);
Q_OBJECT
public:
- explicit ViewModeController(QObject* parent = 0);
+ explicit ViewModeController(QObject* parent = nullptr);
~ViewModeController() override;
/**
ViewProperties::ViewProperties(const QUrl& url) :
m_changedProps(false),
m_autoSave(true),
- m_node(0)
+ m_node(nullptr)
{
GeneralSettings* settings = GeneralSettings::self();
const bool useGlobalViewProps = settings->globalViewProps() || url.isEmpty();
}
delete m_node;
- m_node = 0;
+ m_node = nullptr;
}
void ViewProperties::setViewMode(DolphinView::Mode mode)