mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Modernize: Use nullptr everywhere
This commit is contained in:
parent
464b13f382
commit
a6db5029ac
|
@ -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;
|
||||
return m_autoScrollTimer != nullptr;
|
||||
}
|
||||
|
||||
void KItemListView::setEnabledSelectionToggles(bool enabled)
|
||||
|
@ -629,7 +629,7 @@ QPixmap KItemListView::createDragPixmap(const KItemSet& indexes) const
|
|||
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
|
||||
|
@ -834,12 +834,12 @@ Qt::Orientation KItemListView::scrollOrientation() const
|
|||
|
||||
KItemListWidgetCreatorBase* KItemListView::defaultWidgetCreator() const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
KItemListGroupHeaderCreatorBase* KItemListView::defaultGroupHeaderCreator() const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void KItemListView::initializeItemListWidget(KItemListWidget* item)
|
||||
|
@ -2090,7 +2090,7 @@ void KItemListView::recycleGroupHeaderForWidget(KItemListWidget* widget)
|
|||
{
|
||||
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);
|
||||
|
@ -2551,7 +2551,7 @@ void KItemListView::updateSiblingsInformation(int firstIndex, int lastIndex)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
@ -2714,7 +2714,7 @@ void KItemListCreatorBase::pushRecycleableWidget(QGraphicsWidget* widget)
|
|||
QGraphicsWidget* KItemListCreatorBase::popRecycleableWidget()
|
||||
{
|
||||
if (m_recycleableWidgets.isEmpty()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QGraphicsWidget* widget = m_recycleableWidgets.takeLast();
|
||||
|
@ -2728,7 +2728,7 @@ KItemListWidgetCreatorBase::~KItemListWidgetCreatorBase()
|
|||
|
||||
void KItemListWidgetCreatorBase::recycle(KItemListWidget* widget)
|
||||
{
|
||||
widget->setParentItem(0);
|
||||
widget->setParentItem(nullptr);
|
||||
widget->setOpacity(1.0);
|
||||
pushRecycleableWidget(widget);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ class DOLPHIN_EXPORT KItemListView : public QGraphicsWidget
|
|||
Q_PROPERTY(qreal itemOffset READ itemOffset WRITE setItemOffset)
|
||||
|
||||
public:
|
||||
KItemListView(QGraphicsWidget* parent = 0);
|
||||
KItemListView(QGraphicsWidget* parent = nullptr);
|
||||
~KItemListView() override;
|
||||
|
||||
/**
|
||||
|
@ -285,7 +285,7 @@ public:
|
|||
*/
|
||||
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);
|
||||
|
|
|
@ -60,7 +60,7 @@ void* KItemListViewAccessible::interface_cast(QAccessible::InterfaceType type)
|
|||
if (type == QAccessible::TableInterface) {
|
||||
return static_cast<QAccessibleTableInterface*>(this);
|
||||
}
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void KItemListViewAccessible::modelReset()
|
||||
|
@ -70,7 +70,7 @@ 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) {
|
||||
|
@ -93,7 +93,7 @@ QAccessibleInterface* KItemListViewAccessible::cellAt(int row, int column) const
|
|||
|
||||
QAccessibleInterface* KItemListViewAccessible::caption() const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QString KItemListViewAccessible::columnDescription(int) const
|
||||
|
@ -168,7 +168,7 @@ QList<int> KItemListViewAccessible::selectedRows() const
|
|||
|
||||
QAccessibleInterface* KItemListViewAccessible::summary() const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool KItemListViewAccessible::isColumnSelected(int) const
|
||||
|
@ -225,7 +225,7 @@ QAccessibleInterface* KItemListViewAccessible::childAt(int x, int y) const
|
|||
QAccessibleInterface* KItemListViewAccessible::parent() const
|
||||
{
|
||||
// FIXME: return KItemListContainerAccessible here
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int KItemListViewAccessible::childCount() const
|
||||
|
@ -265,7 +265,7 @@ QAccessibleInterface* KItemListViewAccessible::child(int index) const
|
|||
if (index >= 0 && index < childCount()) {
|
||||
return cell(index);
|
||||
}
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Table Cell
|
||||
|
@ -282,7 +282,7 @@ void* KItemListAccessibleCell::interface_cast(QAccessible::InterfaceType type)
|
|||
if (type == QAccessible::TableCellInterface) {
|
||||
return static_cast<QAccessibleTableCellInterface*>(this);
|
||||
}
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int KItemListAccessibleCell::columnExtent() const
|
||||
|
@ -398,7 +398,7 @@ void KItemListAccessibleCell::setText(QAccessible::Text, const QString&)
|
|||
|
||||
QAccessibleInterface* KItemListAccessibleCell::child(int) const
|
||||
{
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool KItemListAccessibleCell::isValid() const
|
||||
|
@ -408,7 +408,7 @@ bool KItemListAccessibleCell::isValid() const
|
|||
|
||||
QAccessibleInterface* KItemListAccessibleCell::childAt(int, int) const
|
||||
{
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int KItemListAccessibleCell::childCount() const
|
||||
|
@ -434,7 +434,7 @@ int KItemListAccessibleCell::index() const
|
|||
|
||||
QObject* KItemListAccessibleCell::object() const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Container Interface
|
||||
|
@ -465,7 +465,7 @@ QAccessibleInterface* KItemListContainerAccessible::child(int index) const
|
|||
if (index == 0) {
|
||||
return QAccessible::queryAccessibleInterface(container()->controller()->view());
|
||||
}
|
||||
return Q_NULLPTR;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const KItemListContainer* KItemListContainerAccessible::container() const
|
||||
|
|
|
@ -42,7 +42,7 @@ KItemListWidgetInformant::~KItemListWidgetInformant()
|
|||
}
|
||||
|
||||
KItemListWidget::KItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent) :
|
||||
QGraphicsWidget(parent, 0),
|
||||
QGraphicsWidget(parent, nullptr),
|
||||
m_informant(informant),
|
||||
m_index(-1),
|
||||
m_selected(false),
|
||||
|
@ -56,9 +56,9 @@ KItemListWidget::KItemListWidget(KItemListWidgetInformant* informant, QGraphicsI
|
|||
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()
|
||||
{
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void KItemListWidget::setIndex(int index)
|
|||
{
|
||||
if (m_index != index) {
|
||||
delete m_selectionToggle;
|
||||
m_selectionToggle = 0;
|
||||
m_selectionToggle = nullptr;
|
||||
|
||||
if (m_hoverAnimation) {
|
||||
m_hoverAnimation->stop();
|
||||
|
@ -474,7 +474,7 @@ void KItemListWidget::slotHoverAnimationFinished()
|
|||
{
|
||||
if (!m_hovered && m_selectionToggle) {
|
||||
m_selectionToggle->deleteLater();
|
||||
m_selectionToggle = 0;
|
||||
m_selectionToggle = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -502,7 +502,7 @@ void KItemListWidget::setHoverOpacity(qreal opacity)
|
|||
|
||||
if (m_hoverOpacity <= 0.0) {
|
||||
delete m_hoverCache;
|
||||
m_hoverCache = 0;
|
||||
m_hoverCache = nullptr;
|
||||
}
|
||||
|
||||
update();
|
||||
|
@ -511,7 +511,7 @@ void KItemListWidget::setHoverOpacity(qreal opacity)
|
|||
void KItemListWidget::clearHoverCache()
|
||||
{
|
||||
delete m_hoverCache;
|
||||
m_hoverCache = 0;
|
||||
m_hoverCache = nullptr;
|
||||
}
|
||||
|
||||
void KItemListWidget::drawItemStyleOption(QPainter* painter, QWidget* widget, QStyle::State styleState)
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
* 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;
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
* @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);
|
||||
|
|
|
@ -126,7 +126,7 @@ int KItemModelBase::expandedParentsCount(int index) const
|
|||
QMimeData* KItemModelBase::createMimeData(const KItemSet& indexes) const
|
||||
{
|
||||
Q_UNUSED(indexes);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int KItemModelBase::indexForKeyboardSearch(const QString& text, int startFromIndex) const
|
||||
|
|
|
@ -55,8 +55,8 @@ class DOLPHIN_EXPORT KItemModelBase : public QObject
|
|||
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. */
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
KStandardItem::KStandardItem(KStandardItem* parent) :
|
||||
m_parent(parent),
|
||||
m_children(),
|
||||
m_model(0),
|
||||
m_model(nullptr),
|
||||
m_data()
|
||||
{
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ KStandardItem::KStandardItem(KStandardItem* parent) :
|
|||
KStandardItem::KStandardItem(const QString& text, KStandardItem* parent) :
|
||||
m_parent(parent),
|
||||
m_children(),
|
||||
m_model(0),
|
||||
m_model(nullptr),
|
||||
m_data()
|
||||
{
|
||||
setText(text);
|
||||
|
@ -42,7 +42,7 @@ KStandardItem::KStandardItem(const QString& text, KStandardItem* parent) :
|
|||
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);
|
||||
|
|
|
@ -40,9 +40,9 @@ class DOLPHIN_EXPORT KStandardItem
|
|||
{
|
||||
|
||||
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();
|
||||
|
||||
|
|
|
@ -32,10 +32,10 @@ class DOLPHIN_EXPORT KStandardItemListGroupHeader : public KItemListGroupHeader
|
|||
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;
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
DetailsLayout
|
||||
};
|
||||
|
||||
KStandardItemListView(QGraphicsWidget* parent = 0);
|
||||
KStandardItemListView(QGraphicsWidget* parent = nullptr);
|
||||
~KStandardItemListView() override;
|
||||
|
||||
void setItemLayout(ItemLayout layout);
|
||||
|
|
|
@ -273,8 +273,8 @@ KStandardItemListWidget::KStandardItemListWidget(KItemListWidgetInformant* infor
|
|||
m_additionalInfoTextColor(),
|
||||
m_overlay(),
|
||||
m_rating(),
|
||||
m_roleEditor(0),
|
||||
m_oldRoleEditor(0)
|
||||
m_roleEditor(nullptr),
|
||||
m_oldRoleEditor(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -770,7 +770,7 @@ void KStandardItemListWidget::editedRoleChanged(const QByteArray& current, const
|
|||
}
|
||||
m_oldRoleEditor = m_roleEditor;
|
||||
m_roleEditor->hide();
|
||||
m_roleEditor = 0;
|
||||
m_roleEditor = nullptr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -1452,7 +1452,7 @@ void KStandardItemListWidget::closeRoleEditor()
|
|||
}
|
||||
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)
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
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;
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
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();
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ void KStandardItemModel::changeItem(int index, KStandardItem* item)
|
|||
|
||||
m_indexesForItems.remove(oldItem);
|
||||
delete oldItem;
|
||||
oldItem = 0;
|
||||
oldItem = nullptr;
|
||||
|
||||
m_items[index] = item;
|
||||
m_indexesForItems.insert(item, index);
|
||||
|
@ -114,7 +114,7 @@ void KStandardItemModel::removeItem(int index)
|
|||
onItemRemoved(index, item);
|
||||
|
||||
delete item;
|
||||
item = 0;
|
||||
item = nullptr;
|
||||
|
||||
emit itemsRemoved(KItemRangeList() << KItemRange(index, 1));
|
||||
|
||||
|
@ -134,7 +134,7 @@ void KStandardItemModel::clear()
|
|||
KStandardItem* KStandardItemModel::item(int index) const
|
||||
{
|
||||
if (index < 0 || index >= m_items.count()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
return m_items[index];
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ bool KStandardItemModel::setData(int index, const QHash<QByteArray, QVariant>& v
|
|||
QMimeData* KStandardItemModel::createMimeData(const KItemSet& indexes) const
|
||||
{
|
||||
Q_UNUSED(indexes);
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int KStandardItemModel::indexForKeyboardSearch(const QString& text, int startFromIndex) const
|
||||
|
|
|
@ -40,7 +40,7 @@ class DOLPHIN_EXPORT KStandardItemModel : public KItemModelBase
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit KStandardItemModel(QObject* parent = 0);
|
||||
explicit KStandardItemModel(QObject* parent = nullptr);
|
||||
~KStandardItemModel() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,9 +30,9 @@ KDirectoryContentsCounter::KDirectoryContentsCounter(KFileItemModel* model, QObj
|
|||
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,
|
||||
|
@ -70,7 +70,7 @@ KDirectoryContentsCounter::~KDirectoryContentsCounter()
|
|||
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
|
||||
|
@ -180,5 +180,5 @@ void KDirectoryContentsCounter::startWorker(const QString& path)
|
|||
}
|
||||
}
|
||||
|
||||
QThread* KDirectoryContentsCounter::m_workerThread = 0;
|
||||
QThread* KDirectoryContentsCounter::m_workerThread = nullptr;
|
||||
int KDirectoryContentsCounter::m_workersCount = 0;
|
||||
|
|
|
@ -35,7 +35,7 @@ class KDirectoryContentsCounter : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit KDirectoryContentsCounter(KFileItemModel* model, QObject* parent = 0);
|
||||
explicit KDirectoryContentsCounter(KFileItemModel* model, QObject* parent = nullptr);
|
||||
~KDirectoryContentsCounter() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,7 +59,7 @@ int KDirectoryContentsCounterWorker::subItemsCount(const QString& path, Options
|
|||
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) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
};
|
||||
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
|
||||
|
|
|
@ -74,7 +74,7 @@ void KFileItemClipboard::updateCutItems()
|
|||
}
|
||||
|
||||
KFileItemClipboard::KFileItemClipboard() :
|
||||
QObject(0),
|
||||
QObject(nullptr),
|
||||
m_cutItems()
|
||||
{
|
||||
updateCutItems();
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
KFileItemModelDirLister::KFileItemModelDirLister(QObject* parent) :
|
||||
KDirLister(parent)
|
||||
{
|
||||
setAutoErrorHandlingEnabled(false, 0);
|
||||
setAutoErrorHandlingEnabled(false, nullptr);
|
||||
}
|
||||
|
||||
KFileItemModelDirLister::~KFileItemModelDirLister()
|
||||
|
|
|
@ -34,7 +34,7 @@ class DOLPHIN_EXPORT KFileItemModelDirLister : public KDirLister
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KFileItemModelDirLister(QObject* parent = 0);
|
||||
KFileItemModelDirLister(QObject* parent = nullptr);
|
||||
~KFileItemModelDirLister() override;
|
||||
|
||||
signals:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
KFileItemModelFilter::KFileItemModelFilter() :
|
||||
m_useRegExp(false),
|
||||
m_regExp(0),
|
||||
m_regExp(nullptr),
|
||||
m_lowerCasePattern(),
|
||||
m_pattern()
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ KFileItemModelFilter::KFileItemModelFilter() :
|
|||
KFileItemModelFilter::~KFileItemModelFilter()
|
||||
{
|
||||
delete m_regExp;
|
||||
m_regExp = 0;
|
||||
m_regExp = nullptr;
|
||||
}
|
||||
|
||||
void KFileItemModelFilter::setPattern(const QString& filter)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
KItemListHeaderWidget::KItemListHeaderWidget(QGraphicsWidget* parent) :
|
||||
QGraphicsWidget(parent),
|
||||
m_automaticColumnResizing(true),
|
||||
m_model(0),
|
||||
m_model(nullptr),
|
||||
m_offset(0),
|
||||
m_columns(),
|
||||
m_columnWidths(),
|
||||
|
|
|
@ -38,7 +38,7 @@ class DOLPHIN_EXPORT KItemListHeaderWidget : public QGraphicsWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KItemListHeaderWidget(QGraphicsWidget* parent = 0);
|
||||
KItemListHeaderWidget(QGraphicsWidget* parent = nullptr);
|
||||
~KItemListHeaderWidget() override;
|
||||
|
||||
void setModel(KItemModelBase* model);
|
||||
|
@ -64,7 +64,7 @@ public:
|
|||
|
||||
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:
|
||||
/**
|
||||
|
@ -121,7 +121,7 @@ private:
|
|||
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);
|
||||
|
|
|
@ -41,7 +41,7 @@ class DOLPHIN_EXPORT KItemListKeyboardSearchManager : public QObject
|
|||
|
||||
public:
|
||||
|
||||
KItemListKeyboardSearchManager(QObject* parent = 0);
|
||||
KItemListKeyboardSearchManager(QObject* parent = nullptr);
|
||||
~KItemListKeyboardSearchManager() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,7 +32,7 @@ class DOLPHIN_EXPORT KItemListRubberBand : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit KItemListRubberBand(QObject* parent = 0);
|
||||
explicit KItemListRubberBand(QObject* parent = nullptr);
|
||||
~KItemListRubberBand() override;
|
||||
|
||||
void setStartPosition(const QPointF& pos);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
KItemListSelectionToggle::KItemListSelectionToggle(QGraphicsItem* parent) :
|
||||
QGraphicsWidget(parent, 0),
|
||||
QGraphicsWidget(parent, nullptr),
|
||||
m_checked(false),
|
||||
m_hovered(false)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
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;
|
||||
|
|
|
@ -32,7 +32,7 @@ KItemListSmoothScroller::KItemListSmoothScroller(QScrollBar* scrollBar,
|
|||
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;
|
||||
|
|
|
@ -39,7 +39,7 @@ class DOLPHIN_EXPORT KItemListSmoothScroller : public QObject
|
|||
|
||||
public:
|
||||
explicit KItemListSmoothScroller(QScrollBar* scrollBar,
|
||||
QObject* parent = 0);
|
||||
QObject* parent = nullptr);
|
||||
~KItemListSmoothScroller() override;
|
||||
|
||||
void setScrollBar(QScrollBar* scrollBar);
|
||||
|
|
|
@ -116,7 +116,7 @@ void KItemListViewAnimation::start(QGraphicsWidget* widget, AnimationType type,
|
|||
{
|
||||
stop(widget, type);
|
||||
|
||||
QPropertyAnimation* propertyAnim = 0;
|
||||
QPropertyAnimation* propertyAnim = nullptr;
|
||||
const int animationDuration = widget->style()->styleHint(QStyle::SH_Widget_Animate) ? 200 : 1;
|
||||
|
||||
switch (type) {
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
ResizeAnimation
|
||||
};
|
||||
|
||||
KItemListViewAnimation(QObject* parent = 0);
|
||||
KItemListViewAnimation(QObject* parent = nullptr);
|
||||
~KItemListViewAnimation() override;
|
||||
|
||||
void setScrollOrientation(Qt::Orientation orientation);
|
||||
|
|
|
@ -35,7 +35,7 @@ KItemListViewLayouter::KItemListViewLayouter(KItemListSizeHintResolver* sizeHint
|
|||
m_itemSize(128, 128),
|
||||
m_itemMargin(),
|
||||
m_headerHeight(0),
|
||||
m_model(0),
|
||||
m_model(nullptr),
|
||||
m_sizeHintResolver(sizeHintResolver),
|
||||
m_scrollOffset(0),
|
||||
m_maximumScrollOffset(0),
|
||||
|
|
|
@ -50,7 +50,7 @@ class DOLPHIN_EXPORT KItemListViewLayouter : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KItemListViewLayouter(KItemListSizeHintResolver* sizeHintResolver, QObject* parent = 0);
|
||||
KItemListViewLayouter(KItemListSizeHintResolver* sizeHintResolver, QObject* parent = nullptr);
|
||||
~KItemListViewLayouter() override;
|
||||
|
||||
void setScrollOrientation(Qt::Orientation orientation);
|
||||
|
|
|
@ -43,7 +43,7 @@ class FileMetaDataConfigurationDialog : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FileMetaDataConfigurationDialog(QWidget* parent = 0);
|
||||
explicit FileMetaDataConfigurationDialog(QWidget* parent = nullptr);
|
||||
~FileMetaDataConfigurationDialog() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -198,7 +198,7 @@ void InformationPanel::showItemInfo()
|
|||
|
||||
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));
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ void InformationPanel::slotLeftDirectory(const QString& directory)
|
|||
void InformationPanel::cancelRequest()
|
||||
{
|
||||
delete m_folderStatJob;
|
||||
m_folderStatJob = 0;
|
||||
m_folderStatJob = nullptr;
|
||||
|
||||
m_infoTimer->stop();
|
||||
m_resetUrlTimer->stop();
|
||||
|
|
|
@ -65,14 +65,14 @@
|
|||
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);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class InformationPanelContent : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InformationPanelContent(QWidget* parent = 0);
|
||||
explicit InformationPanelContent(QWidget* parent = nullptr);
|
||||
~InformationPanelContent() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,7 @@ class PhononWidget : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PhononWidget(QWidget *parent = 0);
|
||||
PhononWidget(QWidget *parent = nullptr);
|
||||
|
||||
void setUrl(const QUrl &url);
|
||||
QUrl url() const;
|
||||
|
|
|
@ -35,7 +35,7 @@ class Panel : public QWidget
|
|||
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. */
|
||||
|
|
|
@ -66,7 +66,7 @@ void PlacesItem::setUrl(const QUrl &url)
|
|||
// 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);
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
DevicesType
|
||||
};
|
||||
|
||||
explicit PlacesItem(const KBookmark& bookmark, PlacesItem* parent = 0);
|
||||
explicit PlacesItem(const KBookmark& bookmark, PlacesItem* parent = nullptr);
|
||||
~PlacesItem() override;
|
||||
|
||||
void setUrl(const QUrl& url);
|
||||
|
|
|
@ -44,10 +44,10 @@ PlacesItemEditDialog::PlacesItemEditDialog(QWidget* parent) :
|
|||
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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class PlacesItemEditDialog: public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PlacesItemEditDialog(QWidget* parent = 0);
|
||||
explicit PlacesItemEditDialog(QWidget* parent = nullptr);
|
||||
~PlacesItemEditDialog() override;
|
||||
|
||||
void setIcon(const QString& icon);
|
||||
|
|
|
@ -27,7 +27,7 @@ class PlacesItemListGroupHeader : public KStandardItemListGroupHeader
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PlacesItemListGroupHeader(QGraphicsWidget* parent = 0);
|
||||
PlacesItemListGroupHeader(QGraphicsWidget* parent = nullptr);
|
||||
~PlacesItemListGroupHeader() override;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -73,13 +73,13 @@ PlacesItemModel::PlacesItemModel(QObject* parent) :
|
|||
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
|
||||
|
@ -250,24 +250,24 @@ QAction* PlacesItemModel::ejectAction(int index) const
|
|||
{
|
||||
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>();
|
||||
|
@ -295,10 +295,10 @@ QAction* PlacesItemModel::teardownAction(int index) const
|
|||
}
|
||||
|
||||
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)
|
||||
|
@ -687,7 +687,7 @@ void PlacesItemModel::updateBookmarks()
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class PlacesItemModel: public KStandardItemModel
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PlacesItemModel(QObject* parent = 0);
|
||||
explicit PlacesItemModel(QObject* parent = nullptr);
|
||||
~PlacesItemModel() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -170,10 +170,10 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
|
|||
|
||||
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();
|
||||
|
||||
|
@ -213,7 +213,7 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
|
|||
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"));
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos)
|
|||
|
||||
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);
|
||||
|
@ -388,8 +388,8 @@ void PlacesPanel::slotItemDropEventStorageSetupDone(int index, bool success)
|
|||
delete m_itemDropEvent;
|
||||
|
||||
m_itemDropEventIndex = -1;
|
||||
m_itemDropEventMimeData = 0;
|
||||
m_itemDropEvent = 0;
|
||||
m_itemDropEventMimeData = nullptr;
|
||||
m_itemDropEvent = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -413,7 +413,7 @@ void PlacesPanel::slotTrashUpdated(KJob* job)
|
|||
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)
|
||||
|
|
|
@ -38,11 +38,11 @@
|
|||
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()
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ QString TerminalPanel::currentWorkingDirectory()
|
|||
|
||||
void TerminalPanel::terminalExited()
|
||||
{
|
||||
m_terminal = 0;
|
||||
m_terminal = nullptr;
|
||||
emit hideTerminalPanel();
|
||||
}
|
||||
|
||||
|
@ -117,12 +117,12 @@ void TerminalPanel::showEvent(QShowEvent* event)
|
|||
|
||||
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();
|
||||
|
@ -144,7 +144,7 @@ void TerminalPanel::showEvent(QShowEvent* event)
|
|||
void TerminalPanel::changeDir(const QUrl& url)
|
||||
{
|
||||
delete m_mostLocalUrlJob;
|
||||
m_mostLocalUrlJob = 0;
|
||||
m_mostLocalUrlJob = nullptr;
|
||||
|
||||
if (url.isLocalFile()) {
|
||||
sendCdToTerminal(url.toLocalFile());
|
||||
|
@ -198,7 +198,7 @@ void TerminalPanel::slotMostLocalUrlResult(KJob* job)
|
|||
sendCdToTerminal(url.toLocalFile());
|
||||
}
|
||||
|
||||
m_mostLocalUrlJob = 0;
|
||||
m_mostLocalUrlJob = nullptr;
|
||||
}
|
||||
|
||||
void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir)
|
||||
|
|
|
@ -53,20 +53,20 @@ DolphinSearchBox::DolphinSearchBox(QWidget* parent) :
|
|||
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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class DolphinSearchBox : public QWidget {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DolphinSearchBox(QWidget* parent = 0);
|
||||
explicit DolphinSearchBox(QWidget* parent = nullptr);
|
||||
~DolphinSearchBox() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,7 +41,7 @@ AdditionalInfoDialog::AdditionalInfoDialog(QWidget* parent,
|
|||
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);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
ApplyViewPropsJob::ApplyViewPropsJob(const QUrl& dir,
|
||||
const ViewProperties& viewProps) :
|
||||
KIO::Job(),
|
||||
m_viewProps(0),
|
||||
m_viewProps(nullptr),
|
||||
m_progress(0),
|
||||
m_dir(dir)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ ApplyViewPropsJob::ApplyViewPropsJob(const QUrl& 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)
|
||||
|
|
|
@ -36,7 +36,7 @@ class DolphinSettingsDialog : public KPageDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = 0);
|
||||
explicit DolphinSettingsDialog(const QUrl& url, QWidget* parent = nullptr);
|
||||
~DolphinSettingsDialog() override;
|
||||
|
||||
signals:
|
||||
|
|
|
@ -35,9 +35,9 @@ namespace {
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ GeneralSettingsPage::GeneralSettingsPage(const QUrl& url, QWidget* parent) :
|
|||
m_pages.append(confirmationsPage);
|
||||
m_pages.append(statusBarPage);
|
||||
|
||||
topLayout->addWidget(tabWidget, 0, 0);
|
||||
topLayout->addWidget(tabWidget, 0, nullptr);
|
||||
}
|
||||
|
||||
GeneralSettingsPage::~GeneralSettingsPage()
|
||||
|
|
|
@ -52,9 +52,9 @@ namespace {
|
|||
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);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget* parent, const QV
|
|||
m_pages.append(previewsPage);
|
||||
m_pages.append(confirmationsPage);
|
||||
|
||||
topLayout->addWidget(tabWidget, 0, 0);
|
||||
topLayout->addWidget(tabWidget, 0, nullptr);
|
||||
}
|
||||
|
||||
DolphinGeneralConfigModule::~DolphinGeneralConfigModule()
|
||||
|
|
|
@ -30,7 +30,7 @@ K_PLUGIN_FACTORY(KCMDolphinNavigationConfigFactory, registerPlugin<DolphinNaviga
|
|||
|
||||
DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget* parent, const QVariantList& args) :
|
||||
KCModule(parent),
|
||||
m_navigation(0)
|
||||
m_navigation(nullptr)
|
||||
{
|
||||
Q_UNUSED(args);
|
||||
|
||||
|
@ -41,7 +41,7 @@ DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget* parent, co
|
|||
|
||||
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()
|
||||
|
|
|
@ -30,7 +30,7 @@ K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin<DolphinServices
|
|||
|
||||
DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) :
|
||||
KCModule(parent),
|
||||
m_services(0)
|
||||
m_services(nullptr)
|
||||
{
|
||||
Q_UNUSED(args);
|
||||
|
||||
|
@ -41,7 +41,7 @@ DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const
|
|||
|
||||
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()
|
||||
|
|
|
@ -66,7 +66,7 @@ DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget* parent, cons
|
|||
m_tabs.append(compactTab);
|
||||
m_tabs.append(detailsTab);
|
||||
|
||||
topLayout->addWidget(tabWidget, 0, 0);
|
||||
topLayout->addWidget(tabWidget, 0, nullptr);
|
||||
}
|
||||
|
||||
DolphinViewModesConfigModule::~DolphinViewModesConfigModule()
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
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);
|
||||
|
|
|
@ -33,7 +33,7 @@ class ServiceItemDelegate : public KWidgetItemDelegate
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ServiceItemDelegate(QAbstractItemView* itemView, QObject* parent = 0);
|
||||
explicit ServiceItemDelegate(QAbstractItemView* itemView, QObject* parent = nullptr);
|
||||
~ServiceItemDelegate() override;
|
||||
|
||||
QSize sizeHint(const QStyleOptionViewItem &option,
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
ConfigurableRole
|
||||
};
|
||||
|
||||
explicit ServiceModel(QObject* parent = 0);
|
||||
explicit ServiceModel(QObject* parent = nullptr);
|
||||
~ServiceModel() override;
|
||||
|
||||
bool insertRows(int row, int count, const QModelIndex & parent = QModelIndex()) override;
|
||||
|
|
|
@ -58,9 +58,9 @@ namespace
|
|||
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);
|
||||
|
|
|
@ -31,7 +31,7 @@ class SettingsPageBase : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SettingsPageBase(QWidget* parent = 0);
|
||||
explicit SettingsPageBase(QWidget* parent = nullptr);
|
||||
~SettingsPageBase() override;
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
DolphinFontRequester::DolphinFontRequester(QWidget* parent) :
|
||||
QWidget(parent),
|
||||
m_modeCombo(0),
|
||||
m_chooseFontButton(0),
|
||||
m_modeCombo(nullptr),
|
||||
m_chooseFontButton(nullptr),
|
||||
m_mode(SystemFont),
|
||||
m_customFont()
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ ViewSettingsPage::ViewSettingsPage(QWidget* parent) :
|
|||
m_tabs.append(compactTab);
|
||||
m_tabs.append(detailsTab);
|
||||
|
||||
topLayout->addWidget(tabWidget, 0, 0);
|
||||
topLayout->addWidget(tabWidget, 0, nullptr);
|
||||
}
|
||||
|
||||
ViewSettingsPage::~ViewSettingsPage()
|
||||
|
|
|
@ -40,12 +40,12 @@
|
|||
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);
|
||||
|
||||
|
@ -202,7 +202,7 @@ void ViewSettingsTab::applySettings()
|
|||
|
||||
void ViewSettingsTab::restoreDefaultSettings()
|
||||
{
|
||||
KConfigSkeleton* settings = 0;
|
||||
KConfigSkeleton* settings = nullptr;
|
||||
switch (m_mode) {
|
||||
case IconsMode: settings = IconsModeSettings::self(); break;
|
||||
case CompactMode: settings = CompactModeSettings::self(); break;
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
DetailsMode
|
||||
};
|
||||
|
||||
explicit ViewSettingsTab(Mode mode, QWidget* parent = 0);
|
||||
explicit ViewSettingsTab(Mode mode, QWidget* parent = nullptr);
|
||||
~ViewSettingsTab() override;
|
||||
|
||||
void applySettings();
|
||||
|
|
|
@ -52,19 +52,19 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
|
|||
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();
|
||||
|
@ -217,7 +217,7 @@ ViewPropertiesDialog::~ViewPropertiesDialog()
|
|||
{
|
||||
m_isDirty = false;
|
||||
delete m_viewProps;
|
||||
m_viewProps = 0;
|
||||
m_viewProps = nullptr;
|
||||
|
||||
KConfigGroup dialogConfig(KSharedConfig::openConfig(QStringLiteral("dolphinrc")), "ViewPropertiesDialog");
|
||||
KWindowConfig::saveWindowSize(windowHandle(), dialogConfig);
|
||||
|
|
|
@ -39,12 +39,12 @@ ViewPropsProgressInfo::ViewPropsProgressInfo(QWidget* parent,
|
|||
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()));
|
||||
|
@ -96,13 +96,13 @@ ViewPropsProgressInfo::ViewPropsProgressInfo(QWidget* parent,
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -110,12 +110,12 @@ void ViewPropsProgressInfo::reject()
|
|||
{
|
||||
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();
|
||||
|
@ -144,7 +144,7 @@ void ViewPropsProgressInfo::applyViewProperties()
|
|||
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,
|
||||
|
|
|
@ -49,14 +49,14 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent) :
|
|||
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
|
||||
|
|
|
@ -53,7 +53,7 @@ class MountPointObserver : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
explicit MountPointObserver(const QUrl& url, QObject* parent = 0);
|
||||
explicit MountPointObserver(const QUrl& url, QObject* parent = nullptr);
|
||||
~MountPointObserver() override {}
|
||||
|
||||
public:
|
||||
|
|
|
@ -36,7 +36,7 @@ Q_GLOBAL_STATIC(MountPointObserverCacheSingleton, s_MountPointObserverCache)
|
|||
MountPointObserverCache::MountPointObserverCache() :
|
||||
m_observerForMountPoint(),
|
||||
m_mountPointForObserver(),
|
||||
m_updateTimer(0)
|
||||
m_updateTimer(nullptr)
|
||||
{
|
||||
m_updateTimer = new QTimer(this);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
SpaceInfoObserver::SpaceInfoObserver(const QUrl& url, QObject* parent) :
|
||||
QObject(parent),
|
||||
m_mountPointObserver(0),
|
||||
m_mountPointObserver(nullptr),
|
||||
m_dataSize(0),
|
||||
m_dataAvailable(0)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ SpaceInfoObserver::~SpaceInfoObserver()
|
|||
{
|
||||
if (m_mountPointObserver) {
|
||||
m_mountPointObserver->deref();
|
||||
m_mountPointObserver = 0;
|
||||
m_mountPointObserver = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ void SpaceInfoObserver::setUrl(const QUrl& url)
|
|||
if (m_mountPointObserver) {
|
||||
disconnect(m_mountPointObserver, &MountPointObserver::spaceInfoChanged, this, &SpaceInfoObserver::spaceInfoChanged);
|
||||
m_mountPointObserver->deref();
|
||||
m_mountPointObserver = 0;
|
||||
m_mountPointObserver = nullptr;
|
||||
}
|
||||
|
||||
m_mountPointObserver = newObserver;
|
||||
|
|
|
@ -32,7 +32,7 @@ class SpaceInfoObserver : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SpaceInfoObserver(const QUrl& url, QObject* parent = 0);
|
||||
explicit SpaceInfoObserver(const QUrl& url, QObject* parent = nullptr);
|
||||
~SpaceInfoObserver() override;
|
||||
|
||||
quint64 size() const;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue