Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 7cf7dcee authored by Laurent Montel's avatar Laurent Montel 😁

Initialize pointer

parent 4ea92464
......@@ -75,7 +75,7 @@ public:
/// Members
Akonadi::ETMCalendar::Ptr mCalendar;
Akonadi::IncidenceChanger *mChanger;
Akonadi::IncidenceChanger *mChanger = nullptr;
MultiChange mMultiChange;
private:
......
......@@ -63,7 +63,7 @@ public:
}
QColor mDefaultCategoryColor;
KCoreConfigSkeleton *config;
KCoreConfigSkeleton *config = nullptr;
};
QHash<QString, QColor> CategoryConfig::readColors() const
......
......@@ -35,7 +35,7 @@ public:
{
}
QItemSelectionModel *model;
QItemSelectionModel *model = nullptr;
};
CollectionSelection::CollectionSelection(QItemSelectionModel *selectionModel, QObject *parent)
......
......@@ -64,7 +64,7 @@ public:
}
bool m_wasEnabled;
Akonadi::IncidenceChanger *m_changer;
Akonadi::IncidenceChanger *m_changer = nullptr;
};
EventArchiver::EventArchiver(QObject *parent)
......
......@@ -60,7 +60,7 @@ protected Q_SLOTS:
private:
void checkChildren(const QModelIndex &parent, int currentDepth = 0);
QAbstractItemModel *model;
QAbstractItemModel *model = nullptr;
struct Changing {
QModelIndex parent;
......@@ -71,7 +71,7 @@ private:
QStack<Changing> insert;
QStack<Changing> remove;
bool fetchingMore;
bool fetchingMore = false;
QList<QPersistentModelIndex> changing;
};
......
......@@ -38,12 +38,11 @@ class CalendarSupport::FreeBusyCalendarPrivate
{
public:
FreeBusyCalendarPrivate()
: mModel(nullptr)
{
}
FreeBusyItemModel *mModel;
FreeBusyItemModel *mModel = nullptr;
KCalCore::Calendar::Ptr mCalendar;
QMap<QModelIndex, KCalCore::Event::Ptr> mFbEvent;
};
......
......@@ -68,9 +68,9 @@ private:
int mTimerID;
// Only run one download job at a time
bool mIsDownloading;
bool mIsDownloading = false;
QWidget *mParentWidget;
QWidget *mParentWidget = nullptr;
};
}
......
......@@ -76,7 +76,7 @@ public:
private:
QList<ItemPrivateData *> childItems;
ItemPrivateData *parentItem;
ItemPrivateData *parentItem = nullptr;
};
class CalendarSupport::FreeBusyItemModelPrivate
......@@ -93,9 +93,9 @@ public:
}
QTimer mReloadTimer;
bool mForceDownload;
bool mForceDownload = false;
QList<FreeBusyItem::Ptr> mFreeBusyItems;
ItemPrivateData *mRootData;
ItemPrivateData *mRootData = nullptr;
};
FreeBusyItemModel::FreeBusyItemModel(QObject *parent)
......@@ -168,7 +168,7 @@ QVariant FreeBusyItemModel::data(const QModelIndex &index, int role) const
int FreeBusyItemModel::rowCount(const QModelIndex &parent) const
{
ItemPrivateData *parentData;
ItemPrivateData *parentData = nullptr;
if (parent.column() > 0) {
return 0;
}
......@@ -194,7 +194,7 @@ QModelIndex FreeBusyItemModel::index(int row, int column, const QModelIndex &par
return QModelIndex();
}
ItemPrivateData *parentData;
ItemPrivateData *parentData = nullptr;
if (!parent.isValid()) {
parentData = d->mRootData;
} else {
......
......@@ -102,7 +102,7 @@ class IncidenceAttachmentModelPrivate
QModelIndex m_modelIndex;
Akonadi::Item m_item;
KCalCore::Incidence::Ptr m_incidence;
Akonadi::Monitor *m_monitor;
Akonadi::Monitor *m_monitor = nullptr;
};
}
......
......@@ -120,18 +120,18 @@ public:
mAttachmentHandler->view(attachmentName, CalendarSupport::incidence(mCurrentItem));
}
Akonadi::ETMCalendar *mCalendar;
IncidenceViewer *mParent;
TextBrowser *mBrowser;
Akonadi::ETMCalendar *mCalendar = nullptr;
IncidenceViewer *mParent = nullptr;
TextBrowser *mBrowser = nullptr;
Akonadi::Item mCurrentItem;
QString mHeaderText;
QString mDefaultText;
Akonadi::Collection mParentCollection;
Akonadi::CollectionFetchJob *mParentCollectionFetchJob;
IncidenceAttachmentModel *mAttachmentModel;
AttachmentHandler *mAttachmentHandler;
Akonadi::CollectionFetchJob *mParentCollectionFetchJob = nullptr;
IncidenceAttachmentModel *mAttachmentModel = nullptr;
AttachmentHandler *mAttachmentHandler = nullptr;
QDate mDate;
bool mDelayedClear;
bool mDelayedClear = false;
};
IncidenceViewer::IncidenceViewer(Akonadi::ETMCalendar *calendar, QWidget *parent)
......
......@@ -126,7 +126,7 @@ private:
QStackedWidget *mConfigArea = nullptr;
QMap<int, PrintPlugin *> mPluginIDs;
QString mPreviewText;
KComboBox *mOrientationSelection;
KComboBox *mOrientationSelection = nullptr;
QPushButton *mOkButton = nullptr;
CalPrinter::ePrintOrientation mOrientation;
};
......
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