Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
System
Dolphin
Commits
a6db5029
Commit
a6db5029
authored
Nov 21, 2017
by
Kevin Funk
☕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modernize: Use nullptr everywhere
parent
464b13f3
Changes
123
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
255 additions
and
255 deletions
+255
-255
src/dolphincontextmenu.cpp
src/dolphincontextmenu.cpp
+5
-5
src/dolphindockwidget.h
src/dolphindockwidget.h
+2
-2
src/dolphinmainwindow.cpp
src/dolphinmainwindow.cpp
+17
-17
src/dolphinpart.cpp
src/dolphinpart.cpp
+4
-4
src/dolphinrecenttabsmenu.cpp
src/dolphinrecenttabsmenu.cpp
+1
-1
src/dolphintabpage.h
src/dolphintabpage.h
+1
-1
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.cpp
+8
-8
src/filterbar/filterbar.h
src/filterbar/filterbar.h
+1
-1
src/kitemviews/kfileitemlistview.cpp
src/kitemviews/kfileitemlistview.cpp
+4
-4
src/kitemviews/kfileitemlistview.h
src/kitemviews/kfileitemlistview.h
+1
-1
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kfileitemmodel.cpp
+14
-14
src/kitemviews/kfileitemmodel.h
src/kitemviews/kfileitemmodel.h
+1
-1
src/kitemviews/kfileitemmodelrolesupdater.cpp
src/kitemviews/kfileitemmodelrolesupdater.cpp
+6
-6
src/kitemviews/kfileitemmodelrolesupdater.h
src/kitemviews/kfileitemmodelrolesupdater.h
+1
-1
src/kitemviews/kitemlistcontainer.cpp
src/kitemviews/kitemlistcontainer.cpp
+11
-11
src/kitemviews/kitemlistcontainer.h
src/kitemviews/kitemlistcontainer.h
+1
-1
src/kitemviews/kitemlistcontroller.cpp
src/kitemviews/kitemlistcontroller.cpp
+7
-7
src/kitemviews/kitemlistcontroller.h
src/kitemviews/kitemlistcontroller.h
+1
-1
src/kitemviews/kitemlistgroupheader.cpp
src/kitemviews/kitemlistgroupheader.cpp
+1
-1
src/kitemviews/kitemlistgroupheader.h
src/kitemviews/kitemlistgroupheader.h
+2
-2
src/kitemviews/kitemlistselectionmanager.cpp
src/kitemviews/kitemlistselectionmanager.cpp
+1
-1
src/kitemviews/kitemlistselectionmanager.h
src/kitemviews/kitemlistselectionmanager.h
+1
-1
src/kitemviews/kitemlistview.cpp
src/kitemviews/kitemlistview.cpp
+25
-25
src/kitemviews/kitemlistview.h
src/kitemviews/kitemlistview.h
+2
-2
src/kitemviews/kitemlistviewaccessible.cpp
src/kitemviews/kitemlistviewaccessible.cpp
+11
-11
src/kitemviews/kitemlistwidget.cpp
src/kitemviews/kitemlistwidget.cpp
+8
-8
src/kitemviews/kitemlistwidget.h
src/kitemviews/kitemlistwidget.h
+2
-2
src/kitemviews/kitemmodelbase.cpp
src/kitemviews/kitemmodelbase.cpp
+1
-1
src/kitemviews/kitemmodelbase.h
src/kitemviews/kitemmodelbase.h
+2
-2
src/kitemviews/kstandarditem.cpp
src/kitemviews/kstandarditem.cpp
+3
-3
src/kitemviews/kstandarditem.h
src/kitemviews/kstandarditem.h
+3
-3
src/kitemviews/kstandarditemlistgroupheader.h
src/kitemviews/kstandarditemlistgroupheader.h
+2
-2
src/kitemviews/kstandarditemlistview.h
src/kitemviews/kstandarditemlistview.h
+1
-1
src/kitemviews/kstandarditemlistwidget.cpp
src/kitemviews/kstandarditemlistwidget.cpp
+4
-4
src/kitemviews/kstandarditemlistwidget.h
src/kitemviews/kstandarditemlistwidget.h
+2
-2
src/kitemviews/kstandarditemmodel.cpp
src/kitemviews/kstandarditemmodel.cpp
+4
-4
src/kitemviews/kstandarditemmodel.h
src/kitemviews/kstandarditemmodel.h
+1
-1
src/kitemviews/private/kdirectorycontentscounter.cpp
src/kitemviews/private/kdirectorycontentscounter.cpp
+4
-4
src/kitemviews/private/kdirectorycontentscounter.h
src/kitemviews/private/kdirectorycontentscounter.h
+1
-1
src/kitemviews/private/kdirectorycontentscounterworker.cpp
src/kitemviews/private/kdirectorycontentscounterworker.cpp
+1
-1
src/kitemviews/private/kdirectorycontentscounterworker.h
src/kitemviews/private/kdirectorycontentscounterworker.h
+1
-1
src/kitemviews/private/kfileitemclipboard.cpp
src/kitemviews/private/kfileitemclipboard.cpp
+1
-1
src/kitemviews/private/kfileitemmodeldirlister.cpp
src/kitemviews/private/kfileitemmodeldirlister.cpp
+1
-1
src/kitemviews/private/kfileitemmodeldirlister.h
src/kitemviews/private/kfileitemmodeldirlister.h
+1
-1
src/kitemviews/private/kfileitemmodelfilter.cpp
src/kitemviews/private/kfileitemmodelfilter.cpp
+2
-2
src/kitemviews/private/kitemlistheaderwidget.cpp
src/kitemviews/private/kitemlistheaderwidget.cpp
+1
-1
src/kitemviews/private/kitemlistheaderwidget.h
src/kitemviews/private/kitemlistheaderwidget.h
+3
-3
src/kitemviews/private/kitemlistkeyboardsearchmanager.h
src/kitemviews/private/kitemlistkeyboardsearchmanager.h
+1
-1
src/kitemviews/private/kitemlistrubberband.h
src/kitemviews/private/kitemlistrubberband.h
+1
-1
src/kitemviews/private/kitemlistselectiontoggle.cpp
src/kitemviews/private/kitemlistselectiontoggle.cpp
+1
-1
src/kitemviews/private/kitemlistselectiontoggle.h
src/kitemviews/private/kitemlistselectiontoggle.h
+1
-1
src/kitemviews/private/kitemlistsmoothscroller.cpp
src/kitemviews/private/kitemlistsmoothscroller.cpp
+1
-1
src/kitemviews/private/kitemlistsmoothscroller.h
src/kitemviews/private/kitemlistsmoothscroller.h
+1
-1
src/kitemviews/private/kitemlistviewanimation.cpp
src/kitemviews/private/kitemlistviewanimation.cpp
+1
-1
src/kitemviews/private/kitemlistviewanimation.h
src/kitemviews/private/kitemlistviewanimation.h
+1
-1
src/kitemviews/private/kitemlistviewlayouter.cpp
src/kitemviews/private/kitemlistviewlayouter.cpp
+1
-1
src/kitemviews/private/kitemlistviewlayouter.h
src/kitemviews/private/kitemlistviewlayouter.h
+1
-1
src/panels/information/filemetadataconfigurationdialog.h
src/panels/information/filemetadataconfigurationdialog.h
+1
-1
src/panels/information/informationpanel.cpp
src/panels/information/informationpanel.cpp
+2
-2
src/panels/information/informationpanelcontent.cpp
src/panels/information/informationpanelcontent.cpp
+8
-8
src/panels/information/informationpanelcontent.h
src/panels/information/informationpanelcontent.h
+1
-1
src/panels/information/phononwidget.h
src/panels/information/phononwidget.h
+1
-1
src/panels/panel.h
src/panels/panel.h
+1
-1
src/panels/places/placesitem.cpp
src/panels/places/placesitem.cpp
+1
-1
src/panels/places/placesitem.h
src/panels/places/placesitem.h
+1
-1
src/panels/places/placesitemeditdialog.cpp
src/panels/places/placesitemeditdialog.cpp
+4
-4
src/panels/places/placesitemeditdialog.h
src/panels/places/placesitemeditdialog.h
+1
-1
src/panels/places/placesitemlistgroupheader.h
src/panels/places/placesitemlistgroupheader.h
+1
-1
src/panels/places/placesitemmodel.cpp
src/panels/places/placesitemmodel.cpp
+10
-10
src/panels/places/placesitemmodel.h
src/panels/places/placesitemmodel.h
+1
-1
src/panels/places/placespanel.cpp
src/panels/places/placespanel.cpp
+9
-9
src/panels/terminal/terminalpanel.cpp
src/panels/terminal/terminalpanel.cpp
+10
-10
src/search/dolphinsearchbox.cpp
src/search/dolphinsearchbox.cpp
+13
-13
src/search/dolphinsearchbox.h
src/search/dolphinsearchbox.h
+1
-1
src/settings/additionalinfodialog.cpp
src/settings/additionalinfodialog.cpp
+1
-1
No files found.
src/dolphincontextmenu.cpp
View file @
a6db5029
...
...
@@ -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
();
...
...
src/dolphindockwidget.h
View file @
a6db5029
...
...
@@ -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
;
/**
...
...
src/dolphinmainwindow.cpp
View file @
a6db5029
...
...
@@ -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
)
...
...
src/dolphinpart.cpp
View file @
a6db5029
...
...
@@ -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
)
{
...
...
src/dolphinrecenttabsmenu.cpp
View file @
a6db5029
...
...
@@ -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
);
}
...
...
src/dolphintabpage.h
View file @
a6db5029
...
...
@@ -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.
...
...
src/dolphinviewcontainer.cpp
View file @
a6db5029
...
...
@@ -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
...
...
src/filterbar/filterbar.h
View file @
a6db5029
...
...
@@ -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 **/
...
...
src/kitemviews/kfileitemlistview.cpp
View file @
a6db5029
...
...
@@ -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
);
...
...
src/kitemviews/kfileitemlistview.h
View file @
a6db5029
...
...
@@ -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
);
...
...
src/kitemviews/kfileitemmodel.cpp
View file @
a6db5029
...
...
@@ -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
},
...
...
src/kitemviews/kfileitemmodel.h
View file @
a6db5029
...
...
@@ -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
;
/**
...
...
src/kitemviews/kfileitemmodelrolesupdater.cpp
View file @
a6db5029
...
...
@@ -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
();
}
}
...
...
src/kitemviews/kfileitemmodelrolesupdater.h
View file @
a6db5029
...
...
@@ -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
);
...
...
src/kitemviews/kitemlistcontainer.cpp
View file @
a6db5029
...
...
@@ -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
)
{
...
...
src/kitemviews/kitemlistcontainer.h
View file @
a6db5029
...
...
@@ -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
;
...
...
src/kitemviews/kitemlistcontroller.cpp
View file @
a6db5029
...
...
@@ -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
()
...
...
src/kitemviews/kitemlistcontroller.h
View file @
a6db5029
...
...
@@ -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
);
...
...
src/kitemviews/kitemlistgroupheader.cpp
View file @
a6db5029
...
...
@@ -29,7 +29,7 @@
#include <QStyleOptionGraphicsItem>
KItemListGroupHeader
::
KItemListGroupHeader
(
QGraphicsWidget
*
parent
)
:
QGraphicsWidget
(
parent
,
0
),
QGraphicsWidget
(
parent
,
nullptr
),
m_dirtyCache
(
true
),
m_role
(),
m_data
(),
...
...
src/kitemviews/kitemlistgroupheader.h
View file @
a6db5029
...
...
@@ -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
;
...
...
src/kitemviews/kitemlistselectionmanager.cpp
View file @
a6db5029
...
...
@@ -31,7 +31,7 @@ KItemListSelectionManager::KItemListSelectionManager(QObject* parent) :
m_anchorItem
(
-
1
),
m_selectedItems
(),
m_isAnchoredSelectionActive
(
false
),
m_model
(
0
)
m_model
(
nullptr
)
{
}
...
...
src/kitemviews/kitemlistselectionmanager.h
View file @
a6db5029
...
...
@@ -51,7 +51,7 @@ public:
Toggle
};
KItemListSelectionManager
(
QObject
*
parent
=
0
);
KItemListSelectionManager
(
QObject
*
parent
=
nullptr
);
~
KItemListSelectionManager
()
override
;
void
setCurrentItem
(
int
current
);
...
...
src/kitemviews/kitemlistview.cpp
View file @
a6db5029
...
...
@@ -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
),