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 e3732e2a authored by Laurent Montel's avatar Laurent Montel 😁

Clean up.

parent 31d35585
......@@ -28,15 +28,6 @@
AgentInstance::AgentInstance(AgentManager *manager)
: QObject(manager)
, mManager(manager)
, mAgentControlInterface(nullptr)
, mAgentStatusInterface(nullptr)
, mSearchInterface(nullptr)
, mResourceInterface(nullptr)
, mPreprocessorInterface(nullptr)
, mStatus(0)
, mPercent(0)
, mOnline(false)
, mPendingQuit(false)
{
}
......
......@@ -180,12 +180,12 @@ private:
org::freedesktop::Akonadi::Resource *mResourceInterface = nullptr;
org::freedesktop::Akonadi::Preprocessor *mPreprocessorInterface = nullptr;
int mStatus;
int mStatus = 0;
QString mStatusMessage;
int mPercent;
int mPercent = 0;
QString mResourceName;
bool mOnline;
bool mPendingQuit;
bool mOnline = false;
bool mPendingQuit = false;
};
......
......@@ -29,7 +29,6 @@ using namespace Akonadi;
AgentProcessInstance::AgentProcessInstance(AgentManager *manager)
: AgentInstance(manager)
, mController(nullptr)
{
}
......
......@@ -35,7 +35,6 @@
AkonadiStarter::AkonadiStarter(QObject *parent)
: QObject(parent)
, mRegistered(false)
{
QDBusServiceWatcher *watcher = new QDBusServiceWatcher(Akonadi::DBus::serviceName(Akonadi::DBus::ControlLock),
QDBusConnection::sessionBus(),
......
......@@ -33,7 +33,7 @@ private Q_SLOTS:
void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
private:
bool mRegistered;
bool mRegistered = false;
};
#endif
......@@ -33,11 +33,6 @@
Session::Session(const QString &input, QObject *parent)
: QObject(parent)
, m_input(nullptr)
, m_session(nullptr)
, m_notifier(nullptr)
, m_receivedBytes(0)
, m_sentBytes(0)
{
QFile *file = new QFile(this);
if (input != QLatin1String("-")) {
......
......@@ -55,8 +55,8 @@ private:
QSocketNotifier *m_notifier = nullptr;
QTime m_connectionTime;
qint64 m_receivedBytes;
qint64 m_sentBytes;
qint64 m_receivedBytes = 0;
qint64 m_sentBytes = 0;
};
#endif // SESSION_H
......@@ -44,8 +44,6 @@ public:
CollectionFetchJobPrivate(CollectionFetchJob *parent)
: JobPrivate(parent)
, mType(CollectionFetchJob::Base)
, mEmitTimer(nullptr)
, mBasePrefetch(false)
{
}
......@@ -67,7 +65,7 @@ public:
CollectionFetchScope mScope;
Collection::List mPendingCollections;
QTimer *mEmitTimer = nullptr;
bool mBasePrefetch;
bool mBasePrefetch = false;
Collection::List mPrefetchList;
void aboutToFinish() override {
......
......@@ -43,8 +43,6 @@ class Akonadi::ItemCreateJobPrivate : public JobPrivate
public:
ItemCreateJobPrivate(ItemCreateJob *parent)
: JobPrivate(parent)
, mMergeOptions(ItemCreateJob::NoMerge)
, mItemReceived(false)
{
}
......@@ -57,8 +55,8 @@ public:
QSet<QByteArray> mForeignParts;
QDateTime mDatetime;
QByteArray mPendingData;
ItemCreateJob::MergeOptions mMergeOptions;
bool mItemReceived;
ItemCreateJob::MergeOptions mMergeOptions = ItemCreateJob::NoMerge;
bool mItemReceived = false;
};
......
......@@ -39,12 +39,8 @@ class Akonadi::ItemFetchJobPrivate : public JobPrivate
public:
ItemFetchJobPrivate(ItemFetchJob *parent)
: JobPrivate(parent)
, mEmitTimer(nullptr)
, mValuePool(nullptr)
, mCount(0)
{
mCollection = Collection::root();
mDeliveryOptions = ItemFetchJob::Default;
}
~ItemFetchJobPrivate()
......@@ -121,8 +117,8 @@ public:
Item::List mPendingItems; // items pending for emitting itemsReceived()
QTimer *mEmitTimer = nullptr;
ProtocolHelperValuePool *mValuePool = nullptr;
ItemFetchJob::DeliveryOptions mDeliveryOptions;
int mCount;
ItemFetchJob::DeliveryOptions mDeliveryOptions = ItemFetchJob::Default;
int mCount = 0;
};
ItemFetchJob::ItemFetchJob(const Collection &collection, QObject *parent)
......
......@@ -38,9 +38,6 @@ public:
ItemSearchJobPrivate(ItemSearchJob *parent, const SearchQuery &query)
: JobPrivate(parent)
, mQuery(query)
, mRecursive(false)
, mRemote(false)
, mEmitTimer(nullptr)
{
}
......@@ -88,8 +85,8 @@ public:
SearchQuery mQuery;
Collection::List mCollections;
QStringList mMimeTypes;
bool mRecursive;
bool mRemote;
bool mRecursive = false;
bool mRemote = false;
ItemFetchScope mFetchScope;
Item::List mItems;
......
......@@ -317,7 +317,7 @@ bool Job::doKill()
}
QString Job::errorString() const
{
{
QString str;
switch (error()) {
case NoError:
......@@ -333,7 +333,7 @@ QString Job::errorString() const
break;
case Unknown:
return errorText();
default:
case UserError:
str = i18n("Unknown error.");
break;
}
......
......@@ -36,11 +36,6 @@ class ResourceSynchronizationJobPrivate : public KJobPrivateBase
public:
ResourceSynchronizationJobPrivate(ResourceSynchronizationJob *parent)
: q(parent)
, interface(nullptr)
, safetyTimer(nullptr)
, timeoutCount(60)
, collectionTreeOnly(false)
, timeoutCountLimit(0)
{
}
......@@ -50,9 +45,9 @@ public:
AgentInstance instance;
QDBusInterface *interface = nullptr;
QTimer *safetyTimer = nullptr;
int timeoutCount;
bool collectionTreeOnly;
int timeoutCountLimit;
int timeoutCount = 60;
bool collectionTreeOnly = false;
int timeoutCountLimit = 0;
void slotSynchronized();
void slotTimeout();
......
......@@ -37,8 +37,6 @@ public:
: JobPrivate(parent)
, mName(name)
, mQuery(query)
, mRecursive(false)
, mRemote(false)
{
}
......@@ -46,8 +44,8 @@ public:
SearchQuery mQuery;
QStringList mMimeTypes;
QVector<Collection> mCollections;
bool mRecursive;
bool mRemote;
bool mRecursive = false;
bool mRemote = false;
Collection mCreatedCollection;
......@@ -63,7 +61,7 @@ QString Akonadi::SearchCreateJobPrivate::jobDebuggingString() const
str += QStringLiteral("Recursive ");
}
if (mRemote) {
str += QStringLiteral("Remote ");
str += QStringLiteral("Remote");
}
return str;
}
......
......@@ -31,13 +31,12 @@ class Akonadi::TagCreateJobPrivate : public JobPrivate
public:
TagCreateJobPrivate(TagCreateJob *parent)
: JobPrivate(parent)
, mMerge(false)
{
}
Tag mTag;
Tag mResultTag;
bool mMerge;
bool mMerge = false;
};
TagCreateJob::TagCreateJob(const Akonadi::Tag &tag, QObject *parent)
......
......@@ -32,7 +32,6 @@ class Akonadi::TagFetchJobPrivate : public JobPrivate
public:
TagFetchJobPrivate(TagFetchJob *parent)
: JobPrivate(parent)
, mEmitTimer(nullptr)
{
}
......
......@@ -32,7 +32,6 @@ public:
TransactionSequencePrivate(TransactionSequence *parent)
: JobPrivate(parent)
, mState(Idle)
, mAutoCommit(true)
{
}
......@@ -48,7 +47,7 @@ public:
TransactionState mState;
QSet<KJob *> mIgnoredErrorJobs;
bool mAutoCommit;
bool mAutoCommit = true;
void commitResult(KJob *job)
{
......
......@@ -35,7 +35,6 @@ class Q_DECL_HIDDEN CollectionFilterProxyModel::Private
public:
Private(CollectionFilterProxyModel *parent)
: mParent(parent)
, mExcludeVirtualCollections(false)
{
mimeChecker.addWantedMimeType(QStringLiteral("text/uri-list"));
}
......@@ -45,7 +44,7 @@ public:
QVector< QModelIndex > acceptedResources;
CollectionFilterProxyModel *mParent = nullptr;
MimeTypeChecker mimeChecker;
bool mExcludeVirtualCollections;
bool mExcludeVirtualCollections = false;
};
bool CollectionFilterProxyModel::Private::collectionAccepted(const QModelIndex &index, bool checkResourceVisibility)
......
......@@ -93,10 +93,8 @@ QVariant CollectionModel::data(const QModelIndex &index, int role) const
return d->iconForCollection(col);
}
break;
case OldCollectionIdRole: // fall-through
case CollectionIdRole:
return col.id();
case OldCollectionRole: // fall-through
case CollectionRole:
return QVariant::fromValue(col);
}
......
......@@ -60,8 +60,6 @@ public:
* Describes the roles for collections.
*/
enum Roles {
OldCollectionIdRole = Qt::UserRole + 1, ///< The collection identifier. For binary compatibility to <4.3
OldCollectionRole = Qt::UserRole + 2, ///< The actual collection object. For binary compatibility to <4.3
CollectionIdRole = Qt::UserRole + 10, ///< The collection identifier.
CollectionRole = Qt::UserRole + 11, ///< The actual collection object.
UserRole = Qt::UserRole + 42 ///< Role for user extensions.
......
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