Commit 27728db1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Initialize pointer

parent 62986703
Pipeline #135514 passed with stage
in 2 minutes and 9 seconds
......@@ -46,11 +46,10 @@ ConfigDialog::ConfigDialog(QWidget *parent)
{
setFaceType(KPageDialog::List);
QWidget *widget;
KPageWidgetItem *pageItem;
// General
widget = setupPage(mGeneralConfigPage);
QWidget *widget = setupPage(mGeneralConfigPage);
mWrapNavigationBehaviorGroup = new InvisibleButtonGroup(widget);
mWrapNavigationBehaviorGroup->setObjectName(QStringLiteral("kcfg_NavigationEndNotification"));
......
......@@ -97,7 +97,7 @@ public:
}
private:
QBoxLayout *mLayout;
QBoxLayout *const mLayout;
};
FullScreenContent::FullScreenContent(QObject *parent, GvCore *gvCore)
......
......@@ -37,13 +37,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
namespace Gwenview
{
struct DateWidgetPrivate {
DateWidget *q;
DateWidget *q = nullptr;
QDate mDate;
KDatePicker *mDatePicker;
StatusBarToolButton *mPreviousButton;
StatusBarToolButton *mDateButton;
StatusBarToolButton *mNextButton;
KDatePicker *mDatePicker = nullptr;
StatusBarToolButton *mPreviousButton = nullptr;
StatusBarToolButton *mDateButton = nullptr;
StatusBarToolButton *mNextButton = nullptr;
void setupDatePicker()
{
......
......@@ -33,7 +33,7 @@ namespace Gwenview
class DisabledActionShortcutMonitorPrivate
{
public:
QShortcut *mShortcut;
QShortcut *mShortcut = nullptr;
};
DisabledActionShortcutMonitor::DisabledActionShortcutMonitor(QAction *action, QWidget *parent)
......
......@@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace Gwenview
{
struct JpegDocumentLoadedImplPrivate {
JpegContent *mJpegContent;
JpegContent *mJpegContent = nullptr;
};
JpegDocumentLoadedImpl::JpegDocumentLoadedImpl(Document *doc, JpegContent *jpegContent)
......
......@@ -39,8 +39,6 @@ inline QString screenSaverServiceName()
LockScreenWatcher::LockScreenWatcher(QObject *parent)
: QObject(parent)
, mScreenSaverInterface(nullptr)
, mLocked(false)
{
auto screenLockServiceWatcher = new QDBusServiceWatcher(this);
connect(screenLockServiceWatcher, &QDBusServiceWatcher::serviceOwnerChanged, this, &LockScreenWatcher::onScreenSaverServiceOwnerChanged);
......
......@@ -50,8 +50,8 @@ private:
void onServiceOwnerQueried();
private:
OrgFreedesktopScreenSaverInterface *mScreenSaverInterface;
bool mLocked;
OrgFreedesktopScreenSaverInterface *mScreenSaverInterface = nullptr;
bool mLocked = false;
};
}
......
......@@ -72,7 +72,7 @@ private:
void onFullScreenActionToggled(bool checked);
private:
QAction *mFullScreenAction;
QAction *const mFullScreenAction;
};
}
......
......@@ -56,7 +56,6 @@ namespace Gwenview
struct Node {
Node()
: model(nullptr)
{
}
......@@ -79,8 +78,8 @@ using NodeHash = QHash<QUrl, Node *>;
using NodeHashMap = QMap<SortedDirModel *, NodeHash *>;
struct PlaceTreeModelPrivate {
PlaceTreeModel *q;
KFilePlacesModel *mPlacesModel;
PlaceTreeModel *q = nullptr;
KFilePlacesModel *mPlacesModel = nullptr;
QList<SortedDirModel *> mDirModels;
mutable NodeHashMap mNodes;
......
......@@ -82,8 +82,8 @@ struct SlideShowPrivate {
QUrl mCurrentUrl;
QUrl mLastShuffledUrl;
QAction *mLoopAction;
QAction *mRandomAction;
QAction *mLoopAction = nullptr;
QAction *mRandomAction = nullptr;
QUrl findNextUrl()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment