Commit e299ae91 authored by Laurent Montel's avatar Laurent Montel 😁

Initialize some pointer in header class

parent 6c59c13b
......@@ -46,7 +46,7 @@ public:
private:
Akonadi::Collection mRootCollection;
QString mResourceName;
Akonadi::Session *mSession;
Akonadi::Session *mSession = nullptr;
};
}
......
......@@ -48,7 +48,7 @@ private Q_SLOTS:
void collectionReceived(KJob *job);
private:
AgentSearchInterface *q;
AgentSearchInterface *q = nullptr;
};
}
......
......@@ -54,8 +54,8 @@ protected:
private:
QString m_identifier;
QObject *m_factory;
QObject *m_instance;
QObject *m_factory = nullptr;
QObject *m_instance = nullptr;
};
}
......
......@@ -59,7 +59,7 @@ public:
void setSession(Session *session);
protected:
Session *session;
Session *session = nullptr;
Q_SIGNALS:
void dataAvailable();
......
......@@ -81,8 +81,8 @@ private Q_SLOTS:
private:
QStringList mPendingDefaults;
KConfig *mConfig;
KConfig *mCurrentDefault;
KConfig *mConfig = nullptr;
KConfig *mCurrentDefault = nullptr;
};
}
......
......@@ -132,8 +132,8 @@ public:
AgentType agentType;
QString agentTypeId;
AgentInstance agentInstance;
QWidget *parentWidget;
QTimer *safetyTimer;
QWidget *parentWidget = nullptr;
QTimer *safetyTimer = nullptr;
bool doConfig;
bool tooLate;
};
......
......@@ -38,9 +38,6 @@ class CollectionAttributesSynchronizationJobPrivate : public KJobPrivateBase
public:
CollectionAttributesSynchronizationJobPrivate(CollectionAttributesSynchronizationJob *parent)
: q(parent)
, interface(nullptr)
, safetyTimer(nullptr)
, timeoutCount(0)
{
}
......@@ -49,9 +46,9 @@ public:
CollectionAttributesSynchronizationJob *q;
AgentInstance instance;
Collection collection;
QDBusInterface *interface;
QTimer *safetyTimer;
int timeoutCount;
QDBusInterface *interface = nullptr;
QTimer *safetyTimer = nullptr;
int timeoutCount = 0;
static const int timeoutCountLimit;
void slotSynchronized(qlonglong);
......
......@@ -66,7 +66,7 @@ public:
Collection::List mCollections;
CollectionFetchScope mScope;
Collection::List mPendingCollections;
QTimer *mEmitTimer;
QTimer *mEmitTimer = nullptr;
bool mBasePrefetch;
Collection::List mPrefetchList;
......
......@@ -119,8 +119,8 @@ public:
Item::List mResultItems;
ItemFetchScope mFetchScope;
Item::List mPendingItems; // items pending for emitting itemsReceived()
QTimer *mEmitTimer;
ProtocolHelperValuePool *mValuePool;
QTimer *mEmitTimer = nullptr;
ProtocolHelperValuePool *mValuePool = nullptr;
ItemFetchJob::DeliveryOptions mDeliveryOptions;
int mCount;
};
......
......@@ -95,7 +95,7 @@ public:
Item::List mItems;
Item::List mPendingItems; // items pending for emitting itemsReceived()
QTimer *mEmitTimer;
QTimer *mEmitTimer = nullptr;
};
QThreadStorage<Session *> instances;
......
......@@ -64,7 +64,7 @@ public:
Relation::List mResultRelations;
Relation::List mPendingRelations; // relation pending for emitting itemsReceived()
QTimer *mEmitTimer;
QTimer *mEmitTimer = nullptr;
QVector<QByteArray> mTypes;
QString mResource;
Relation mRequestedRelation;
......
......@@ -39,7 +39,7 @@ public:
{
}
SpecialCollections *mSpecialCollections;
SpecialCollections *mSpecialCollections = nullptr;
QStringList mMimeTypes;
};
......
......@@ -52,7 +52,7 @@ public:
void collectionCreateResult(KJob *job); // slot
SpecialCollectionsRequestJob *q;
SpecialCollections *mSpecialCollections;
SpecialCollections *mSpecialCollections = nullptr;
int mPendingCreateJobs;
QByteArray mRequestedType;
......
......@@ -66,7 +66,7 @@ public:
Tag::List mRequestedTags;
Tag::List mResultTags;
Tag::List mPendingTags; // items pending for emitting itemsReceived()
QTimer *mEmitTimer;
QTimer *mEmitTimer = nullptr;
TagFetchScope mFetchScope;
};
......
......@@ -67,11 +67,11 @@ public:
QHash<Collection::Id, Collection> m_newCollections;
QHash< Collection::Id, QVector<Collection::Id> > m_newChildCollections;
Monitor *monitor;
Session *session;
Monitor *monitor = nullptr;
Session *session = nullptr;
QStringList mimeTypes;
bool fetchStatistics;
bool unsubscribed;
bool fetchStatistics = false;
bool unsubscribed = false;
QString headerContent;
void init();
......
......@@ -148,9 +148,9 @@ public:
mutable QHash<QString, QIcon> m_iconCache;
mutable QString m_iconThemeName;
Monitor *m_monitor;
Monitor *m_monitor = nullptr;
Collection m_rootCollection;
Node *m_rootNode;
Node *m_rootNode = nullptr;
QString m_rootCollectionDisplayName;
QStringList m_mimeTypeFilter;
MimeTypeChecker m_mimeChecker;
......@@ -208,7 +208,7 @@ public:
return "FetchCollectionId";
}
Session *m_session;
Session *m_session = nullptr;
Q_DECLARE_PUBLIC(EntityTreeModel)
......
......@@ -35,14 +35,14 @@ class Q_DECL_HIDDEN QuotaColorProxyModel::Private
{
public:
Private(QuotaColorProxyModel *parent)
: mParent(parent), mThreshold(100.0), mColor(Qt::red)
: mParent(parent)
{
}
QuotaColorProxyModel *mParent;
QuotaColorProxyModel *mParent = nullptr;
qreal mThreshold;
QColor mColor;
qreal mThreshold = 100.0;
QColor mColor = Qt::red;
};
QuotaColorProxyModel::QuotaColorProxyModel(QObject *parent)
......
......@@ -182,7 +182,7 @@ public:
void _k_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles);
StatisticsProxyModel *q;
StatisticsProxyModel *q = nullptr;
bool mToolTipEnabled;
bool mExtraColumnsEnabled;
......
......@@ -52,8 +52,8 @@ public:
void removeTagsRecursively(qint64 parentTag);
Monitor *mMonitor;
Session *mSession;
Monitor *mMonitor = nullptr;
Session *mSession = nullptr;
QHash<Tag::Id /* parent */, Tag::List > mChildTags;
QHash<Tag::Id /* tag ID */, Tag> mTags;
......
......@@ -75,10 +75,10 @@ public:
TagFetchScope mTagFetchScope;
CollectionFetchScope mCollectionFetchScope;
bool mFetchChangedOnly;
Session *session;
CollectionCache *collectionCache;
ItemListCache *itemCache;
TagListCache *tagCache;
Session *session = nullptr;
CollectionCache *collectionCache = nullptr;
ItemListCache *itemCache = nullptr;
TagListCache *tagCache = nullptr;
QMimeDatabase mimeDatabase;
Protocol::ModifySubscriptionCommand pendingModification;
......
......@@ -126,9 +126,9 @@ public:
*/
static QString connectionFile();
Session *mParent;
SessionThread *mSessionThread;
Connection *connection;
Session *mParent = nullptr;
SessionThread *mSessionThread = nullptr;
Connection *connection = nullptr;
QMetaObject::Connection connThreadCleanUp;
QByteArray sessionId;
bool connected;
......@@ -138,10 +138,10 @@ public:
// job management
QQueue<Job *> queue;
QQueue<Job *> pipeline;
Job *currentJob;
Job *currentJob = nullptr;
bool jobRunning;
QFile *logFile;
QFile *logFile = nullptr;
};
}
......
......@@ -79,11 +79,11 @@ public:
AgentInstance defaultResource() const;
SpecialCollections *q;
KCoreConfigSkeleton *mSettings;
KCoreConfigSkeleton *mSettings = nullptr;
QHash<QString, QHash<QByteArray, Collection> > mFoldersForResource;
bool mBatchMode;
QSet<QString> mToEmitChangedFor;
Monitor *mMonitor;
Monitor *mMonitor = nullptr;
mutable QString mDefaultResourceId;
};
......
......@@ -38,13 +38,13 @@ protected Q_SLOTS:
void doConnects();
protected:
QIODevice *m_localSocket;
QIODevice *m_localSocket = nullptr;
private Q_SLOTS:
void slotDataAvailable();
private:
QTcpSocket *m_remoteSocket;
QTcpSocket *m_remoteSocket = nullptr;
};
class AkonadiBridgeConnection : public BridgeConnection
......
......@@ -34,7 +34,7 @@ protected Q_SLOTS:
virtual void slotNewConnection() = 0;
protected:
QTcpServer *m_server;
QTcpServer *m_server = nullptr;
};
template <typename ConnectionType>
......
......@@ -118,7 +118,7 @@ private:
QVector<AbstractSearchEngine *> mEngines;
QVector<AbstractSearchPlugin *> mPlugins;
QTimer *mSearchUpdateTimer;
QTimer *mSearchUpdateTimer = nullptr;
QMutex mLock;
QSet<qint64> mUpdatingCollections;
......
......@@ -55,7 +55,7 @@ protected:
void appendChild(Node *child);
void removeChild(Node *child);
Node *parent;
Node *parent = nullptr;
QVector<Node *> children;
QAtomicInt lruCounter;
qint64 id;
......@@ -92,7 +92,7 @@ protected:
protected:
mutable QReadWriteLock mLock;
Node *mRoot;
Node *mRoot = nullptr;
QHash<qint64 /* col ID */, Node *> mNodeLookup;
};
......
......@@ -99,7 +99,7 @@ private:
QString mMysqlInstallDbPath;
QString mMysqlCheckPath;
bool mInternalServer;
QProcess *mDatabaseProcess;
QProcess *mDatabaseProcess = nullptr;
};
} // namespace Server
......
......@@ -176,9 +176,9 @@ private:
void execPendingQueries(const QStringList &queries);
QSqlDatabase mDatabase;
Schema *mSchema;
Schema *mSchema = nullptr;
QString mErrorMsg;
TestInterface *mTestInterface;
TestInterface *mTestInterface = nullptr;
DbIntrospector::Ptr m_introspector;
bool m_noForeignKeyContraints;
QStringList m_pendingIndexes;
......
......@@ -46,7 +46,7 @@ Q_SIGNALS:
void requestCompleted(ItemRetrievalRequest *request, const QString &errorMsg);
protected:
ItemRetrievalRequest *m_request;
ItemRetrievalRequest *m_request = nullptr;
};
/// Async D-Bus retrieval, no modification of the request (thus no need for locking)
......@@ -75,7 +75,7 @@ private Q_SLOTS:
private:
bool m_active;
OrgFreedesktopAkonadiResourceInterface *m_interface;
OrgFreedesktopAkonadiResourceInterface *m_interface = nullptr;
};
......
......@@ -85,12 +85,12 @@ private Q_SLOTS:
protected:
static ItemRetrievalManager *sInstance;
AbstractItemRetrievalJobFactory *mJobFactory;
AbstractItemRetrievalJobFactory *mJobFactory = nullptr;
/// Protects mPendingRequests and every Request object posted to it
QReadWriteLock *mLock;
QReadWriteLock *mLock = nullptr;
/// Used to let requesting threads wait until the request has been processed
QWaitCondition *mWaitCondition;
QWaitCondition *mWaitCondition = nullptr;
/// Pending requests queues, one per resource
QHash<QString, QList<ItemRetrievalRequest *> > mPendingRequests;
/// Currently running jobs, one per resource
......
......@@ -88,7 +88,7 @@ private:
Akonadi::ImapSet mItemSet;
Collection mCollection;
Scope mScope;
Connection *mConnection;
Connection *mConnection = nullptr;
QVector<QByteArray> mParts;
bool mFullPayload;
bool mRecursive;
......
......@@ -96,10 +96,10 @@ public:
void currentAgentInstanceDoubleClicked(const QModelIndex &currentIndex);
void currentAgentInstanceClicked(const QModelIndex &currentIndex);
AgentInstanceWidget *mParent;
QListView *mView;
AgentInstanceModel *mModel;
AgentFilterProxyModel *proxy;
AgentInstanceWidget *mParent = nullptr;
QListView *mView = nullptr;
AgentInstanceModel *mModel = nullptr;
AgentFilterProxyModel *proxy = nullptr;
};
void AgentInstanceWidget::Private::currentAgentInstanceChanged(const QModelIndex &currentIndex, const QModelIndex &previousIndex)
......
......@@ -43,9 +43,9 @@ public:
}
void readConfig();
void writeConfig();
AgentTypeWidget *Widget;
AgentTypeWidget *Widget = nullptr;
AgentType agentType;
AgentTypeDialog *q;
AgentTypeDialog *q = nullptr;
};
void AgentTypeDialog::Private::writeConfig()
......
......@@ -75,10 +75,10 @@ public:
}
}
AgentTypeWidget *mParent;
QListView *mView;
AgentTypeModel *mModel;
AgentFilterProxyModel *proxyModel;
AgentTypeWidget *mParent = nullptr;
QListView *mView = nullptr;
AgentTypeModel *mModel = nullptr;
AgentFilterProxyModel *proxyModel = nullptr;
};
void AgentTypeWidget::Private::currentAgentTypeChanged(const QModelIndex &currentIndex, const QModelIndex &previousIndex)
......
......@@ -46,7 +46,7 @@ public:
void slotCacheValueChanged(int);
void slotRetrievalOptionsGroupBoxDisabled(bool disable);
Ui::CachePolicyPage *mUi;
Ui::CachePolicyPage *mUi = nullptr;
};
void CachePolicyPage::Private::slotIntervalValueChanged(int interval)
......
......@@ -71,7 +71,7 @@ public:
}
Akonadi::Collection currentCollection;
Akonadi::Monitor *monitor;
Akonadi::Monitor *monitor = nullptr;
Ui::CollectionMaintenancePage ui;
......
......@@ -84,7 +84,7 @@ public:
CollectionPropertiesDialog *q;
Collection mCollection;
QStringList mPageNames;
QTabWidget *mTabWidget;
QTabWidget *mTabWidget = nullptr;
};
typedef QList<CollectionPropertiesPageFactory *> CollectionPropertiesPageFactoryList;
......
......@@ -49,16 +49,14 @@ enum CountType {
class CollectionStatisticsDelegatePrivate
{
public:
QAbstractItemView *parent;
bool drawUnreadAfterFolder;
DelegateAnimator *animator;
QAbstractItemView *parent = nullptr;
bool drawUnreadAfterFolder = false;
DelegateAnimator *animator = nullptr;
QColor mSelectedUnreadColor;
QColor mDeselectedUnreadColor;
CollectionStatisticsDelegatePrivate(QAbstractItemView *treeView)
: parent(treeView)
, drawUnreadAfterFolder(false)
, animator(nullptr)
{
updateColor();
}
......
......@@ -58,11 +58,11 @@ public:
void itemCurrentChanged(const QModelIndex &index);
bool hasParent(const QModelIndex &idx, Collection::Id parentId);
CollectionView *mParent;
CollectionView *mParent = nullptr;
QModelIndex dragOverIndex;
QTimer dragExpandTimer;
KXMLGUIClient *xmlGuiClient;
KXMLGUIClient *xmlGuiClient = nullptr;
};
void CollectionView::Private::init()
......
......@@ -73,7 +73,7 @@ private:
Akonadi::Item mLocalItem;
Akonadi::Item mOtherItem;
QTextBrowser *mView;
QTextBrowser *mView = nullptr;
};
}
......
......@@ -125,7 +125,7 @@ public:
void serverStateChanged(ServerManager::State state);
QPointer<ControlGui> mParent;
QEventLoop *mEventLoop;
QEventLoop *mEventLoop = nullptr;
QPointer<Internal::ControlProgressIndicator> mProgressIndicator;
QList<QPointer<QWidget> > mPendingOverlays;
bool mSuccess;
......
......@@ -76,7 +76,7 @@ private:
bool hasAncestor(const QModelIndex &index, Collection::Id parentId) const;
bool mShowDropActionMenu;
bool mIsManualSortingActive;
QAbstractItemView *m_view;
QAbstractItemView *m_view = nullptr;
};
}
......
......@@ -59,9 +59,9 @@ public:
void itemDoubleClicked(const QModelIndex &index);
void itemCurrentChanged(const QModelIndex &index);
EntityListView *mParent;
DragDropManager *mDragDropManager;
KXMLGUIClient *mXmlGuiClient;
EntityListView *mParent = nullptr;
DragDropManager *mDragDropManager = nullptr;
KXMLGUIClient *mXmlGuiClient = nullptr;
};
void EntityListView::Private::init()
......
......@@ -50,10 +50,10 @@ public:
Item itemForIndex(const QModelIndex &index);
KXMLGUIClient *xmlGuiClient;
KXMLGUIClient *xmlGuiClient = nullptr;
private:
ItemView *mParent;
ItemView *mParent = nullptr;
};
void ItemView::Private::init()
......
......@@ -68,7 +68,7 @@ protected:
private:
QSet<Animation> m_animations;
QAbstractItemView *m_view;
QAbstractItemView *m_view = nullptr;
KPixmapSequence m_pixmapSequence;
int m_timerId;
};
......
......@@ -43,9 +43,9 @@ protected Q_SLOTS:
void slotDefaultName();
private:
QString m_defaultName;
QLabel *m_label;
QLineEdit *m_lineEdit;
QPushButton *mOkButton;
QLabel *m_label = nullptr;
QLineEdit *m_lineEdit = nullptr;
QPushButton *mOkButton = nullptr;
};
#endif /* RENAMEFAVORITEDIALOG_H */
......@@ -89,7 +89,7 @@ private:
QString createReport();
Ui::SelfTestDialog ui;
QStandardItemModel *mTestModel;
QStandardItemModel *mTestModel = nullptr;
};
}
#endif
......@@ -65,15 +65,15 @@ public:
QWidget *d;
Akonadi::Tag::List m_tags;
Akonadi::TagModel *m_model;
QListView *m_tagsView;
KCheckableProxyModel *m_checkableProxy;
Akonadi::TagModel *m_model = nullptr;
QListView *m_tagsView = nullptr;
KCheckableProxyModel *m_checkableProxy = nullptr;
QModelIndex m_deleteCandidate;
QPushButton *m_newTagButton;
QLineEdit *m_newTagEdit;
QPushButton *m_newTagButton = nullptr;
QLineEdit *m_newTagEdit = nullptr;
QPushButton *m_deleteButton;
QTimer *m_deleteButtonTimer;
QPushButton *m_deleteButton = nullptr;
QTimer *m_deleteButtonTimer = nullptr;
};
TagEditWidget::Private::Private(Akonadi::TagModel *model, QWidget *parent)
......
......@@ -39,8 +39,8 @@ private Q_SLOTS:
void moveCollection();
private:
FakeServerData *m_serverData;
Akonadi::EntityTreeModel *m_model;
FakeServerData *m_serverData = nullptr;
Akonadi::EntityTreeModel *m_model = nullptr;
};
#endif
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