Commit 72bd55f8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

initialize value on header

parent c19cde5d
Pipeline #33169 passed with stage
in 49 minutes and 46 seconds
......@@ -18,8 +18,6 @@ using namespace Akonadi;
PreprocessorBasePrivate::PreprocessorBasePrivate(PreprocessorBase *parent)
: AgentBasePrivate(parent)
, mInDelayedProcessing(false)
, mDelayedProcessingItemId(0)
{
Q_Q(PreprocessorBase);
......
......@@ -35,8 +35,8 @@ private Q_SLOTS:
void itemFetched(KJob *job);
public:
bool mInDelayedProcessing;
qlonglong mDelayedProcessingItemId;
bool mInDelayedProcessing = false;
qlonglong mDelayedProcessingItemId = 0;
ItemFetchScope mFetchScope;
Q_DECLARE_PUBLIC(PreprocessorBase)
......
......@@ -16,8 +16,6 @@ RecursiveMover::RecursiveMover(AgentBasePrivate *parent)
: KCompositeJob(parent)
, m_agentBase(parent)
, m_currentAction(None)
, m_runningJobs(0)
, m_pendingReplay(false)
{
}
......
......@@ -51,7 +51,7 @@ private Q_SLOTS:
void itemFetchResult(KJob *job);
private:
AgentBasePrivate *m_agentBase = nullptr;
AgentBasePrivate *const m_agentBase;
Collection m_movedCollection;
/// sorted queue of collections still to be processed
Collection::List m_pendingCollections;
......@@ -68,8 +68,8 @@ private:
AddItem
} m_currentAction;
int m_runningJobs;
bool m_pendingReplay;
int m_runningJobs = 0;
bool m_pendingReplay = false;
};
}
......
......@@ -25,8 +25,6 @@ static QDBusAbstractInterface *s_resourcetracker = nullptr;
ResourceScheduler::ResourceScheduler(QObject *parent)
: QObject(parent)
, mCurrentTasksQueue(-1)
, mOnline(false)
{
}
......
......@@ -290,8 +290,8 @@ private:
TaskList mTaskList[NQueueCount];
Task mCurrentTask;
int mCurrentTasksQueue; // queue mCurrentTask came from
bool mOnline;
int mCurrentTasksQueue = -1; // queue mCurrentTask came from
bool mOnline = false;
};
QDebug operator<<(QDebug, const ResourceScheduler::Task &task);
......
......@@ -19,8 +19,6 @@ using namespace Akonadi;
AgentServer::AgentServer(QObject *parent)
: QObject(parent)
, m_processingConfigureRequests(false)
, m_quiting(false)
{
QDBusConnection::sessionBus().registerObject(QStringLiteral(AKONADI_DBUS_AGENTSERVER_PATH),
this, QDBusConnection::ExportScriptableSlots);
......
......@@ -43,8 +43,8 @@ private:
QHash<QString, AgentThread *> m_agents;
QQueue<ConfigureInfo> m_configureQueue;
AgentPluginLoader m_agentLoader;
bool m_processingConfigureRequests;
bool m_quiting;
bool m_processingConfigureRequests = false;
bool m_quiting = false;
};
}
......
......@@ -18,7 +18,6 @@ AgentThread::AgentThread(const QString &identifier, QObject *factory, QObject *p
: QThread(parent)
, m_identifier(identifier)
, m_factory(factory)
, m_instance(nullptr)
{
}
......
......@@ -40,8 +40,8 @@ protected:
void run() override;
private:
QString m_identifier;
QObject *m_factory = nullptr;
const QString m_identifier;
QObject *const m_factory;
QObject *m_instance = nullptr;
};
......
......@@ -23,8 +23,6 @@ const QLatin1String AgentType::CapabilityPreprocessor = QLatin1String(AKONADI_AG
const QLatin1String AgentType::CapabilitySearch = QLatin1String(AKONADI_AGENT_CAPABILITY_SEARCH);
AgentType::AgentType()
: instanceCounter(0)
, launchMethod(Process)
{
}
......
......@@ -37,8 +37,8 @@ public:
QStringList capabilities;
QString exec;
QVariantMap custom;
uint instanceCounter;
LaunchMethod launchMethod;
uint instanceCounter = 0;
LaunchMethod launchMethod = Process;
static const QLatin1String CapabilityUnique;
static const QLatin1String CapabilityResource;
......
......@@ -27,10 +27,6 @@ static const int s_maxCrashCount = 2;
ProcessControl::ProcessControl(QObject *parent)
: QObject(parent)
, mPolicy(RestartOnCrash)
, mFailedToStart(false)
, mCrashCount(0)
, mRestartOnceOnExit(false)
, mShutdownTimeout(1s)
{
connect(&mProcess, &QProcess::errorOccurred,
......
......@@ -119,10 +119,10 @@ private:
QProcess mProcess;
QString mApplication;
QStringList mArguments;
CrashPolicy mPolicy;
bool mFailedToStart;
int mCrashCount;
bool mRestartOnceOnExit;
CrashPolicy mPolicy = RestartOnCrash;
bool mFailedToStart = false;
int mCrashCount = 0;
bool mRestartOnceOnExit = false;
std::chrono::milliseconds mShutdownTimeout;
};
......
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