Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Desktop
Commits
d47b207b
Commit
d47b207b
authored
Nov 29, 2018
by
Laurent Montel
Browse files
USe isEmpty() + use explicit + use nullptr
parent
fa22a73d
Changes
41
Hide whitespace changes
Inline
Side-by-side
applets/kicker/plugin/actionlist.cpp
View file @
d47b207b
...
...
@@ -276,7 +276,7 @@ QVariantList recentDocumentActions(KService::Ptr service)
++
resultIt
;
}
if
(
list
.
count
())
{
if
(
!
list
.
isEmpty
())
{
list
<<
createActionItem
(
i18n
(
"Forget Recent Documents"
),
QStringLiteral
(
"_kicker_forgetRecentDocuments"
));
}
...
...
applets/kicker/plugin/computermodel.h
View file @
d47b207b
...
...
@@ -40,7 +40,7 @@ class FilteredPlacesModel : public QSortFilterProxyModel
Q_OBJECT
public:
FilteredPlacesModel
(
QObject
*
parent
=
nullptr
);
explicit
FilteredPlacesModel
(
QObject
*
parent
=
nullptr
);
~
FilteredPlacesModel
()
override
;
QUrl
url
(
const
QModelIndex
&
index
)
const
;
...
...
applets/kicker/plugin/contactentry.cpp
View file @
d47b207b
...
...
@@ -85,7 +85,7 @@ QString ContactEntry::id() const
if
(
id
.
isEmpty
())
{
const
QStringList
uris
=
m_personData
->
contactUris
();
if
(
uris
.
count
())
{
if
(
!
uris
.
isEmpty
())
{
return
uris
.
at
(
0
);
}
}
else
{
...
...
applets/kicker/plugin/containmentinterface.h
View file @
d47b207b
...
...
@@ -41,7 +41,7 @@ class ContainmentInterface : public QObject
Q_ENUM
(
Target
)
ContainmentInterface
(
QObject
*
parent
=
nullptr
);
explicit
ContainmentInterface
(
QObject
*
parent
=
nullptr
);
~
ContainmentInterface
()
override
;
static
Q_INVOKABLE
bool
mayAddLauncher
(
QObject
*
appletInterface
,
Target
target
,
const
QString
&
entryPath
=
QString
());
...
...
applets/kicker/plugin/draghelper.h
View file @
d47b207b
...
...
@@ -32,7 +32,7 @@ class DragHelper : public QObject
Q_PROPERTY
(
int
dragIconSize
READ
dragIconSize
WRITE
setDragIconSize
NOTIFY
dragIconSizeChanged
)
public:
DragHelper
(
QObject
*
parent
=
nullptr
);
explicit
DragHelper
(
QObject
*
parent
=
nullptr
);
~
DragHelper
()
override
;
int
dragIconSize
()
const
;
...
...
applets/kicker/plugin/menuentryeditor.h
View file @
d47b207b
...
...
@@ -27,7 +27,7 @@ class MenuEntryEditor : public QObject
Q_OBJECT
public:
MenuEntryEditor
(
QObject
*
parent
=
nullptr
);
explicit
MenuEntryEditor
(
QObject
*
parent
=
nullptr
);
~
MenuEntryEditor
()
override
;
bool
canEdit
(
const
QString
&
entryPath
)
const
;
...
...
applets/kicker/plugin/processrunner.h
View file @
d47b207b
...
...
@@ -27,7 +27,7 @@ class ProcessRunner : public QObject
Q_OBJECT
public:
ProcessRunner
(
QObject
*
parent
=
nullptr
);
explicit
ProcessRunner
(
QObject
*
parent
=
nullptr
);
~
ProcessRunner
()
override
;
Q_INVOKABLE
void
runMenuEditor
();
...
...
applets/kicker/plugin/recentusagemodel.cpp
View file @
d47b207b
...
...
@@ -214,12 +214,12 @@ QVariant RecentUsageModel::appData(const QString &resource, int role) const
QVariantList
actionList
;
const
QVariantList
&
jumpList
=
Kicker
::
jumpListActions
(
service
);
if
(
jumpList
.
count
())
{
if
(
!
jumpList
.
isEmpty
())
{
actionList
<<
jumpList
<<
Kicker
::
createSeparatorActionItem
();
}
const
QVariantList
&
recentDocuments
=
Kicker
::
recentDocumentActions
(
service
);
if
(
recentDocuments
.
count
())
{
if
(
!
recentDocuments
.
isEmpty
())
{
actionList
<<
recentDocuments
<<
Kicker
::
createSeparatorActionItem
();
}
...
...
applets/kicker/plugin/submenu.h
View file @
d47b207b
...
...
@@ -33,7 +33,7 @@ class SubMenu : public PlasmaQuick::Dialog
Q_PROPERTY
(
bool
facingLeft
READ
facingLeft
NOTIFY
facingLeftChanged
)
public:
SubMenu
(
QQuickItem
*
parent
=
nullptr
);
explicit
SubMenu
(
QQuickItem
*
parent
=
nullptr
);
~
SubMenu
()
override
;
Q_INVOKABLE
QRect
availableScreenRectForItem
(
QQuickItem
*
item
)
const
;
...
...
applets/kicker/plugin/systemsettings.h
View file @
d47b207b
...
...
@@ -27,7 +27,7 @@ class SystemSettings : public QObject
Q_OBJECT
public:
SystemSettings
(
QObject
*
parent
=
nullptr
);
explicit
SystemSettings
(
QObject
*
parent
=
nullptr
);
~
SystemSettings
()
override
;
Q_INVOKABLE
QString
picturesLocation
()
const
;
...
...
applets/kicker/plugin/wheelinterceptor.h
View file @
d47b207b
...
...
@@ -30,7 +30,7 @@ class WheelInterceptor : public QQuickItem
Q_PROPERTY
(
QQuickItem
*
destination
READ
destination
WRITE
setDestination
NOTIFY
destinationChanged
)
public:
WheelInterceptor
(
QQuickItem
*
parent
=
nullptr
);
explicit
WheelInterceptor
(
QQuickItem
*
parent
=
nullptr
);
~
WheelInterceptor
()
override
;
QQuickItem
*
destination
()
const
;
...
...
applets/kimpanel/backend/scim/main.cpp
View file @
d47b207b
...
...
@@ -114,7 +114,7 @@ static void slot_unlock(void);
/////////////////////////////////////////////////////////////////////////////
//static bool _ui_initialized = false;
static
ConfigModule
*
_config_module
=
0
;
static
ConfigModule
*
_config_module
=
nullptr
;
static
ConfigPointer
_config
;
static
std
::
vector
<
HelperInfo
>
_helper_list
;
...
...
@@ -123,7 +123,7 @@ static bool _should_exit = false;
//static bool _panel_is_on = false;
static
PanelAgent
*
_panel_agent
=
0
;
static
PanelAgent
*
_panel_agent
=
nullptr
;
static
QList
<
PanelFactoryInfo
>
_factory_list
;
...
...
@@ -289,7 +289,7 @@ class DBusHandler : public QObject
{
Q_OBJECT
public:
DBusHandler
(
QObject
*
parent
=
0
)
:
QObject
(
parent
)
{
explicit
DBusHandler
(
QObject
*
parent
=
nullptr
)
:
QObject
(
parent
)
{
QDBusConnection
(
"scim_panel"
).
connect
(
""
,
""
,
"org.kde.impanel"
,
"MovePreeditCaret"
,
this
,
SLOT
(
MovePreeditCaret
(
int
)));
QDBusConnection
(
"scim_panel"
).
connect
(
""
,
""
,
"org.kde.impanel"
,
"SelectCandidate"
,
this
,
SLOT
(
SelectCandidate
(
int
)));
QDBusConnection
(
"scim_panel"
).
connect
(
""
,
""
,
"org.kde.impanel"
,
"LookupTablePageUp"
,
this
,
SLOT
(
LookupTablePageUp
()));
...
...
@@ -748,7 +748,7 @@ class PanelAgentThread : public QThread
{
Q_OBJECT
public:
PanelAgentThread
(
QObject
*
parent
=
0
)
:
QThread
(
parent
)
{}
explicit
PanelAgentThread
(
QObject
*
parent
=
nullptr
)
:
QThread
(
parent
)
{}
~
PanelAgentThread
()
{}
void
run
()
{
if
(
!
_panel_agent
->
run
())
...
...
applets/taskmanager/plugin/backend.cpp
View file @
d47b207b
...
...
@@ -231,7 +231,7 @@ QVariantList Backend::placesActions(const QUrl &launcherUrl, bool showAllPlaces,
QAction
*
placeAction
=
new
QAction
(
icon
,
title
,
parent
);
connect
(
placeAction
,
&
QAction
::
triggered
,
this
,
[
this
,
url
,
desktopEntryUrl
]
{
connect
(
placeAction
,
&
QAction
::
triggered
,
this
,
[
url
,
desktopEntryUrl
]
{
KService
::
Ptr
service
=
KService
::
serviceByDesktopPath
(
desktopEntryUrl
.
toLocalFile
());
if
(
!
service
)
{
return
;
...
...
@@ -488,7 +488,7 @@ void Backend::presentWindows(const QVariant &_winIds)
}
}
if
(
!
winIds
.
count
())
{
if
(
winIds
.
isEmpty
())
{
return
;
}
...
...
@@ -574,11 +574,11 @@ void Backend::updateWindowHighlight()
QList
<
WId
>
windows
=
m_windowsToHighlight
;
if
(
windows
.
count
()
&&
m_toolTipItem
&&
m_toolTipItem
->
window
())
{
if
(
!
windows
.
isEmpty
()
&&
m_toolTipItem
&&
m_toolTipItem
->
window
())
{
windows
.
append
(
m_toolTipItem
->
window
()
->
winId
());
}
if
(
windows
.
count
()
&&
m_groupDialog
)
{
if
(
!
windows
.
isEmpty
()
&&
m_groupDialog
)
{
windows
.
append
(
m_groupDialog
->
winId
());
}
...
...
applets/taskmanager/plugin/backend.h
View file @
d47b207b
...
...
@@ -54,9 +54,9 @@ class Backend : public QObject
ToggleGrouping
};
Q_ENUM
(
MiddleClickAction
)
;
Q_ENUM
(
MiddleClickAction
)
Backend
(
QObject
*
parent
=
nullptr
);
explicit
Backend
(
QObject
*
parent
=
nullptr
);
~
Backend
()
override
;
QQuickItem
*
taskManagerItem
()
const
;
...
...
applets/trash/plugin/dirmodel.h
View file @
d47b207b
...
...
@@ -92,7 +92,7 @@ private:
QHash
<
QUrl
,
QPersistentModelIndex
>
m_filesToPreview
;
QSize
m_screenshotSize
;
QHash
<
QUrl
,
QPersistentModelIndex
>
m_previewJobs
;
KImageCache
*
m_imageCache
;
KImageCache
*
m_imageCache
=
nullptr
;
};
#endif // DIRMODEL_H
containments/desktop/plugins/folder/positioner.cpp
View file @
d47b207b
...
...
@@ -270,7 +270,7 @@ void Positioner::setRangeSelected(int anchor, int to)
}
}
if
(
indices
.
count
())
{
if
(
!
indices
.
isEmpty
())
{
m_folderModel
->
updateSelection
(
indices
,
false
);
}
}
else
{
...
...
kcms/cursortheme/kcmcursortheme.cpp
View file @
d47b207b
...
...
@@ -448,7 +448,7 @@ void CursorThemeConfig::getNewClicked()
KNS3
::
DownloadDialog
dialog
(
"xcursor.knsrc"
,
nullptr
);
if
(
dialog
.
exec
())
{
KNS3
::
Entry
::
List
list
=
dialog
.
changedEntries
();
if
(
list
.
count
()
>
0
)
{
if
(
!
list
.
isEmpty
()
)
{
m_model
->
refreshList
();
}
}
...
...
kcms/cursortheme/xcursor/previewwidget.h
View file @
d47b207b
...
...
@@ -35,7 +35,7 @@ class PreviewWidget : public QQuickPaintedItem
public:
PreviewWidget
(
QQuickItem
*
parent
=
nullptr
);
explicit
PreviewWidget
(
QQuickItem
*
parent
=
nullptr
);
~
PreviewWidget
()
override
;
void
setTheme
(
const
CursorTheme
*
theme
,
const
int
size
);
...
...
kcms/cursortheme/xcursor/sortproxymodel.h
View file @
d47b207b
...
...
@@ -36,7 +36,7 @@ class SortProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
SortProxyModel
(
QObject
*
parent
=
nullptr
)
:
QSortFilterProxyModel
(
parent
)
{}
explicit
SortProxyModel
(
QObject
*
parent
=
nullptr
)
:
QSortFilterProxyModel
(
parent
)
{}
~
SortProxyModel
()
override
{}
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
inline
const
CursorTheme
*
theme
(
const
QModelIndex
&
index
)
const
;
...
...
kcms/cursortheme/xcursor/xcursortheme.cpp
View file @
d47b207b
...
...
@@ -59,7 +59,7 @@ XCursorTheme::XCursorTheme(const QDir &themeDir)
XcursorImagesDestroy
(
images
);
qSort
(
sizeList
.
begin
(),
sizeList
.
end
());
m_availableSizes
=
sizeList
;
}
;
}
if
(
!
sizeList
.
isEmpty
())
{
QString
sizeListString
=
QString
::
number
(
sizeList
.
takeFirst
());
...
...
@@ -177,7 +177,7 @@ int XCursorTheme::defaultCursorSize() const
dim
=
DisplayHeight
(
dpy
,
DefaultScreen
(
dpy
));
}
else
{
dim
=
DisplayWidth
(
dpy
,
DefaultScreen
(
dpy
));
}
;
}
size
=
dim
/
48
;
}
return
size
;
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment