Commit 279e408d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: coding style

parent 2ac54f9e
......@@ -23,9 +23,7 @@
#include <item.h>
#include <attribute.h>
namespace Akonadi
{
namespace Akonadi {
class IncidenceAttribute : public Akonadi::Attribute
{
public:
......@@ -58,7 +56,6 @@ private:
QString mStatus;
Akonadi::Item::Id mReferenceId;
};
}
#endif
......@@ -84,7 +84,7 @@ public:
}
};
class InvitationsCollection : public SpecialCollections
class InvitationsCollection : public SpecialCollections
{
public:
......@@ -106,7 +106,9 @@ public:
};
InvitationsCollection(InvitationsAgent *agent)
: Akonadi::SpecialCollections(new Settings), m_agent(agent), sInvitationsType("invitations")
: Akonadi::SpecialCollections(new Settings)
, m_agent(agent)
, sInvitationsType("invitations")
{
}
......@@ -142,7 +144,7 @@ public:
SpecialCollectionsRequestJob *reguestJob() const
{
InvitationsCollectionRequestJob *job = new InvitationsCollectionRequestJob(const_cast<InvitationsCollection *>(this),
m_agent);
m_agent);
job->requestDefaultCollection(sInvitationsType);
return job;
......@@ -155,7 +157,9 @@ private:
};
InvitationsAgentItem::InvitationsAgentItem(InvitationsAgent *agent, const Item &originalItem)
: QObject(agent), m_agent(agent), m_originalItem(originalItem)
: QObject(agent)
, m_agent(agent)
, m_originalItem(originalItem)
{
}
......@@ -165,7 +169,6 @@ InvitationsAgentItem::~InvitationsAgentItem()
void InvitationsAgentItem::add(const Item &item)
{
const Collection collection = m_agent->collection();
Q_ASSERT(collection.isValid());
......@@ -223,9 +226,9 @@ void InvitationsAgentItem::modifyItemDone(KJob *job)
}
InvitationsAgent::InvitationsAgent(const QString &id)
: AgentBase(id),
AgentBase::ObserverV3(),
m_invitationsCollection(new InvitationsCollection(this))
: AgentBase(id)
, AgentBase::ObserverV3()
, m_invitationsCollection(new InvitationsCollection(this))
{
changeRecorder()->setMimeTypeMonitored(KMime::Message::mimeType());
changeRecorder()->itemFetchScope().setCacheOnly(true);
......@@ -284,9 +287,7 @@ void InvitationsAgent::configure(WId windowId)
initStart(); //reload
}
Item InvitationsAgent::handleContent(const QString &vcal,
const KCalCore::MemoryCalendar::Ptr &calendar,
const Item &item)
Item InvitationsAgent::handleContent(const QString &vcal, const KCalCore::MemoryCalendar::Ptr &calendar, const Item &item)
{
KCalCore::ICalFormat format;
KCalCore::ScheduleMessage::Ptr message = format.parseScheduleMessage(calendar, vcal);
......@@ -343,7 +344,6 @@ void InvitationsAgent::itemAdded(const Item &item, const Collection &collection)
InvitationsAgentItem *it = nullptr;
foreach (KMime::Content *content, message->contents()) {
KMime::Headers::ContentType *ct = content->contentType();
Q_ASSERT(ct);
const QByteArray mimeType = ct->mimeType();
......@@ -389,4 +389,3 @@ void InvitationsAgent::itemAdded(const Item &item, const Collection &collection)
}
AKONADI_AGENT_MAIN(InvitationsAgent)
......@@ -72,9 +72,7 @@ private Q_SLOTS:
void initDone(KJob *job = nullptr);
private:
Akonadi::Item handleContent(const QString &vcal,
const KCalCore::MemoryCalendar::Ptr &calendar,
const Akonadi::Item &item);
Akonadi::Item handleContent(const QString &vcal, const KCalCore::MemoryCalendar::Ptr &calendar, const Akonadi::Item &item);
void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) override;
......
......@@ -51,7 +51,6 @@ Q_IMPORT_PLUGIN(akonadi_serializer_mail)
using namespace Akonadi;
void MailDispatcherAgent::abort()
{
if (!isOnline()) {
......@@ -93,8 +92,8 @@ void MailDispatcherAgent::dispatch()
Q_EMIT percent(0);
}
Q_EMIT status(AgentBase::Running,
i18np("Sending messages (1 item in queue)...",
"Sending messages (%1 items in queue)...", mQueue->count()));
i18np("Sending messages (1 item in queue)...",
"Sending messages (%1 items in queue)...", mQueue->count()));
qCDebug(MAILDISPATCHER_LOG) << "Attempting to dispatch the next message.";
mSendingInProgress = true;
mQueue->fetchOne(); // will trigger itemFetched
......@@ -105,7 +104,9 @@ void MailDispatcherAgent::dispatch()
mAborting = false;
mSentAnything = false;
Q_EMIT status(AgentBase::Idle, i18n("Sending canceled."));
QTimer::singleShot(3000, this, [this]() {emitStatusReady();});
QTimer::singleShot(3000, this, [this]() {
emitStatusReady();
});
} else {
if (mSentAnything) {
// Finished sending messages in queue.
......@@ -125,7 +126,9 @@ void MailDispatcherAgent::dispatch()
// Empty queue.
Q_EMIT status(AgentBase::Idle, i18n("No items in queue."));
}
QTimer::singleShot(3000, this, [this]() {emitStatusReady();});
QTimer::singleShot(3000, this, [this]() {
emitStatusReady();
});
}
mErrorOccurred = false;
......@@ -145,10 +148,10 @@ MailDispatcherAgent::MailDispatcherAgent(const QString &id)
new MailDispatcherAgentAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/Settings"),
Settings::self(), QDBusConnection::ExportAdaptors);
Settings::self(), QDBusConnection::ExportAdaptors);
KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/MailDispatcherAgent"),
this, QDBusConnection::ExportAdaptors);
this, QDBusConnection::ExportAdaptors);
QString service = QStringLiteral("org.freedesktop.Akonadi.MailDispatcherAgent");
if (Akonadi::ServerManager::hasInstanceIdentifier()) {
service += QLatin1Char('.') + Akonadi::ServerManager::instanceIdentifier();
......@@ -158,15 +161,21 @@ MailDispatcherAgent::MailDispatcherAgent(const QString &id)
mQueue = new OutboxQueue(this);
connect(mQueue, &OutboxQueue::newItems,
this, [this]() { dispatch(); });
this, [this]() {
dispatch();
});
connect(mQueue, &OutboxQueue::itemReady,
this, [this](const Akonadi::Item &item) { itemFetched(item);});
this, [this](const Akonadi::Item &item) {
itemFetched(item);
});
connect(mQueue, &OutboxQueue::error,
this, &MailDispatcherAgent::queueError);
connect(this, &MailDispatcherAgent::itemProcessed,
mQueue, &OutboxQueue::itemProcessed);
connect(this, &MailDispatcherAgent::abortRequested,
this, [this]() { abort(); });
this, [this]() {
abort();
});
mSentActionHandler = new SentActionHandler(this);
......@@ -189,7 +198,9 @@ void MailDispatcherAgent::doSetOnline(bool online)
if (online) {
qCDebug(MAILDISPATCHER_LOG) << "Online. Dispatching messages.";
Q_EMIT status(AgentBase::Idle, i18n("Online, sending messages in queue."));
QTimer::singleShot(0, this, [this]() { dispatch(); });
QTimer::singleShot(0, this, [this]() {
dispatch();
});
} else {
qCDebug(MAILDISPATCHER_LOG) << "Offline.";
Q_EMIT status(AgentBase::Idle, i18n("Offline, message sending suspended."));
......@@ -217,13 +228,13 @@ void MailDispatcherAgent::itemFetched(const Item &item)
}
Q_EMIT status(AgentBase::Running, i18nc("Message with given subject is being sent.", "Sending: %1",
item.payload<KMime::Message::Ptr>()->subject()->asUnicodeString()));
item.payload<KMime::Message::Ptr>()->subject()->asUnicodeString()));
connect(mCurrentJob, &KJob::result,
this, &MailDispatcherAgent::sendResult);
//TODO wait kf6. For the moment we can't convert to new connect api.
connect(mCurrentJob, SIGNAL(percent(KJob*,ulong)),
this, SLOT(sendPercent(KJob*,ulong)));
connect(mCurrentJob, SIGNAL(percent(KJob *,ulong)),
this, SLOT(sendPercent(KJob *,ulong)));
mCurrentJob->start();
}
......@@ -247,7 +258,7 @@ void MailDispatcherAgent::sendPercent(KJob *job, unsigned long)
const double transportWeight = 0.8;
const int percentValue = 100 * (mSentItemsSize + job->processedAmount(KJob::Bytes) * transportWeight)
/ (mSentItemsSize + mCurrentItem.size() + mQueue->totalSize());
/ (mSentItemsSize + mCurrentItem.size() + mQueue->totalSize());
qCDebug(MAILDISPATCHER_LOG) << "sentItemsSize" << mSentItemsSize
<< "this job processed" << job->processedAmount(KJob::Bytes)
......@@ -262,8 +273,8 @@ void MailDispatcherAgent::sendPercent(KJob *job, unsigned long)
// It is possible that the number of queued messages has changed.
Q_EMIT status(AgentBase::Running,
i18np("Sending messages (1 item in queue)...",
"Sending messages (%1 items in queue)...", 1 + mQueue->count()));
i18np("Sending messages (1 item in queue)...",
"Sending messages (%1 items in queue)...", 1 + mQueue->count()));
}
void MailDispatcherAgent::sendResult(KJob *job)
......@@ -313,7 +324,9 @@ void MailDispatcherAgent::sendResult(KJob *job)
// dispatch next message
mSendingInProgress = false;
QTimer::singleShot(0, this, [this]() { dispatch();});
QTimer::singleShot(0, this, [this]() {
dispatch();
});
}
void MailDispatcherAgent::emitStatusReady()
......
......@@ -47,7 +47,6 @@ using namespace MailTransport;
static const int OUTBOX_DISCOVERY_RETRIES = 3; // number of times we try to find or create the outbox
static const int OUTBOX_DISCOVERY_WAIT_TIME = 5000; // number of ms to wait before retrying
void OutboxQueue::initQueue()
{
mTotalSize = 0;
......@@ -57,7 +56,9 @@ void OutboxQueue::initQueue()
ItemFetchJob *job = new ItemFetchJob(mOutbox);
job->fetchScope().fetchAllAttributes();
job->fetchScope().fetchFullPayload(false);
connect(job, &ItemFetchJob::result, this, [this](KJob *job) { collectionFetched(job);});
connect(job, &ItemFetchJob::result, this, [this](KJob *job) {
collectionFetched(job);
});
}
void OutboxQueue::addIfComplete(const Item &item)
......@@ -113,8 +114,8 @@ void OutboxQueue::addIfComplete(const Item &item)
const SentBehaviourAttribute *sentBehaviourAttribute = item.attribute<SentBehaviourAttribute>();
Q_ASSERT(sentBehaviourAttribute);
if (sentBehaviourAttribute->sentBehaviour() == SentBehaviourAttribute::MoveToCollection &&
!sentBehaviourAttribute->moveToCollection().isValid()) {
if (sentBehaviourAttribute->sentBehaviour() == SentBehaviourAttribute::MoveToCollection
&& !sentBehaviourAttribute->moveToCollection().isValid()) {
qCWarning(MAILDISPATCHER_LOG) << "Item" << item.id() << "has invalid sent-mail collection.";
return;
}
......@@ -127,9 +128,9 @@ void OutboxQueue::addIfComplete(const Item &item)
}
*/
if (dispatchModeAttribute->dispatchMode() == DispatchModeAttribute::Automatic &&
dispatchModeAttribute->sendAfter().isValid() &&
dispatchModeAttribute->sendAfter() > QDateTime::currentDateTime()) {
if (dispatchModeAttribute->dispatchMode() == DispatchModeAttribute::Automatic
&& dispatchModeAttribute->sendAfter().isValid()
&& dispatchModeAttribute->sendAfter() > QDateTime::currentDateTime()) {
// All the above was OK, so accept it for the future.
qCDebug(MAILDISPATCHER_LOG) << "Item" << item.id() << "is accepted to be sent in the future.";
mFutureMap.insert(dispatchModeAttribute->sendAfter(), item);
......@@ -195,7 +196,7 @@ void OutboxQueue::collectionFetched(KJob *job)
qCDebug(MAILDISPATCHER_LOG) << "Fetched" << fetchJob->items().count() << "items.";
const Akonadi::Item::List lst = fetchJob->items();
for (const Item &item : lst ) {
for (const Item &item : lst) {
addIfComplete(item);
}
}
......@@ -245,7 +246,9 @@ void OutboxQueue::localFoldersChanged()
SpecialMailCollectionsRequestJob *job = new SpecialMailCollectionsRequestJob(this);
job->requestDefaultCollection(SpecialMailCollections::Outbox);
connect(job, &SpecialMailCollectionsRequestJob::result, this, [this](KJob* job) {localFoldersRequestResult(job);} );
connect(job, &SpecialMailCollectionsRequestJob::result, this, [this](KJob *job) {
localFoldersRequestResult(job);
});
qCDebug(MAILDISPATCHER_LOG) << "Requesting outbox folder.";
job->start();
......@@ -273,7 +276,9 @@ void OutboxQueue::localFoldersRequestResult(KJob *job)
if (++mOutboxDiscoveryRetries <= OUTBOX_DISCOVERY_RETRIES) {
const int timeout = OUTBOX_DISCOVERY_WAIT_TIME * mOutboxDiscoveryRetries;
qCWarning(MAILDISPATCHER_LOG) << "Failed to get outbox folder. Retrying in: " << timeout;
QTimer::singleShot(timeout, this, [this]() { localFoldersChanged(); });
QTimer::singleShot(timeout, this, [this]() {
localFoldersChanged();
});
} else {
qCWarning(MAILDISPATCHER_LOG) << "Failed to get outbox folder. Giving up.";
Q_EMIT error(i18n("Could not access the outbox folder (%1).", job->errorString()));
......@@ -341,13 +346,19 @@ OutboxQueue::OutboxQueue(QObject *parent)
this, &OutboxQueue::itemChanged);
connect(mMonitor, &Monitor::itemMoved,
this, &OutboxQueue::itemMoved);
connect(mMonitor, &Monitor::itemRemoved, this, [this](const Akonadi::Item &item) { itemRemoved(item); });
connect(mMonitor, &Monitor::itemRemoved, this, [this](const Akonadi::Item &item) {
itemRemoved(item);
});
connect(SpecialMailCollections::self(), &SpecialMailCollections::defaultCollectionsChanged, this, [this]() { localFoldersChanged(); });
connect(SpecialMailCollections::self(), &SpecialMailCollections::defaultCollectionsChanged, this, [this]() {
localFoldersChanged();
});
localFoldersChanged();
mFutureTimer = new QTimer(this);
connect(mFutureTimer, &QTimer::timeout, this, [this]() { checkFuture(); });
connect(mFutureTimer, &QTimer::timeout, this, [this]() {
checkFuture();
});
mFutureTimer->start(60 * 60 * 1000); // 1 hour
}
......@@ -391,7 +402,9 @@ void OutboxQueue::fetchOne()
ItemFetchJob *job = new ItemFetchJob(item);
job->fetchScope().fetchAllAttributes();
job->fetchScope().fetchFullPayload();
connect(job, &ItemFetchJob::result, this, [this](KJob *job) {itemFetched(job); });
connect(job, &ItemFetchJob::result, this, [this](KJob *job) {
itemFetched(job);
});
}
#include "moc_outboxqueue.cpp"
......@@ -27,8 +27,7 @@
class KJob;
class QTimer;
namespace Akonadi
{
namespace Akonadi {
class Monitor;
}
......@@ -117,7 +116,6 @@ private:
// items.
// TODO debug and figure out why this happens.
QSet<Akonadi::Item::Id> mIgnore;
};
#endif
......@@ -101,9 +101,9 @@ void SendJob::doAkonadiTransport()
mResourceId);
mInterface = new QDBusInterface(service,
QStringLiteral("/Transport"),
QStringLiteral("org.freedesktop.Akonadi.Resource.Transport"),
KDBusConnectionPool::threadConnection(), this);
QStringLiteral("/Transport"),
QStringLiteral("org.freedesktop.Akonadi.Resource.Transport"),
KDBusConnectionPool::threadConnection(), this);
if (!mInterface->isValid()) {
storeResult(false, i18n("Failed to get D-Bus interface of resource %1.", mResourceId));
......@@ -167,11 +167,13 @@ void SendJob::doTraditionalTransport()
job->setBcc(addressAttribute->bcc());
// Signals.
connect(job, &TransportJob::result, this, [this](KJob *job) { transportResult(job);});
connect(job, &TransportJob::result, this, [this](KJob *job) {
transportResult(job);
});
//Wait kf6 We have a private signal
//connect(job, thisOverload<KJob*, ulong>::of(&TransportJob::percent), this, [this](KJob *job,ulong val) {transportPercent(job, val); });
connect(job, SIGNAL(percent(KJob*,ulong)),
this, SLOT(transportPercent(KJob*,ulong)));
connect(job, SIGNAL(percent(KJob *,ulong)),
this, SLOT(transportPercent(KJob *,ulong)));
job->start();
}
......@@ -207,16 +209,15 @@ void SendJob::resourceProgress(const AgentInstance &instance)
}
}
void SendJob::resourceResult(qlonglong itemId, int result,
const QString &message)
void SendJob::resourceResult(qlonglong itemId, int result, const QString &message)
{
Q_UNUSED(itemId);
Q_ASSERT(mInterface);
delete mInterface; // So that abort() knows the transport job is over.
mInterface = nullptr;
const TransportResourceBase::TransportResult transportResult =
static_cast<TransportResourceBase::TransportResult>(result);
const TransportResourceBase::TransportResult transportResult
= static_cast<TransportResourceBase::TransportResult>(result);
const bool success = (transportResult == TransportResourceBase::TransportSucceeded);
......@@ -257,20 +258,25 @@ void SendJob::doPostJob(bool transportSuccess, const QString &transportMessage)
if (attribute->sentBehaviour() == SentBehaviourAttribute::Delete) {
qCDebug(MAILDISPATCHER_LOG) << "Deleting item from outbox.";
mCurrentJob = new ItemDeleteJob(mItem);
QObject::connect(mCurrentJob, &ItemDeleteJob::result, this, [this](KJob *job) { postJobResult(job); });
QObject::connect(mCurrentJob, &ItemDeleteJob::result, this, [this](KJob *job) {
postJobResult(job);
});
} else {
if (attribute->sentBehaviour() == SentBehaviourAttribute::MoveToDefaultSentCollection) {
if (SpecialMailCollections::self()->hasDefaultCollection(SpecialMailCollections::SentMail)) {
mCurrentJob = new ItemMoveJob(mItem, SpecialMailCollections::self()->defaultCollection(SpecialMailCollections::SentMail), this);
QObject::connect(mCurrentJob, &ItemMoveJob::result, this, [this](KJob *job) { postJobResult(job); });
QObject::connect(mCurrentJob, &ItemMoveJob::result, this, [this](KJob *job) {
postJobResult(job);
});
} else {
abortPostJob();
}
} else {
qCDebug(MAILDISPATCHER_LOG) << "sentBehaviour=" << attribute->sentBehaviour() << "using collection from attribute";
mCurrentJob = new CollectionFetchJob(attribute->moveToCollection(), Akonadi::CollectionFetchJob::Base);
QObject::connect(mCurrentJob, &CollectionFetchJob::result, this, [this](KJob *job) { slotSentMailCollectionFetched(job);});
QObject::connect(mCurrentJob, &CollectionFetchJob::result, this, [this](KJob *job) {
slotSentMailCollectionFetched(job);
});
}
}
}
......@@ -319,7 +325,9 @@ void SendJob::slotSentMailCollectionFetched(KJob *job)
fetchCol = SpecialMailCollections::self()->defaultCollection(SpecialMailCollections::SentMail);
}
mCurrentJob = new ItemMoveJob(mItem, fetchCol, this);
QObject::connect(mCurrentJob, &ItemMoveJob::result, this, [this](KJob *job) {postJobResult(job);});
QObject::connect(mCurrentJob, &ItemMoveJob::result, this, [this](KJob *job) {
postJobResult(job);
});
}
void SendJob::postJobResult(KJob *job)
......@@ -335,12 +343,12 @@ void SendJob::postJobResult(KJob *job)
QString errorStr;
switch (attribute->sentBehaviour()) {
case SentBehaviourAttribute::Delete:
errorStr =
i18n("Sending succeeded, but failed to remove the message from the outbox.");
errorStr
= i18n("Sending succeeded, but failed to remove the message from the outbox.");
break;
default:
errorStr =
i18n("Sending succeeded, but failed to move the message to the sent-mail folder.");
errorStr
= i18n("Sending succeeded, but failed to move the message to the sent-mail folder.");
break;
}
setError(UserDefinedError);
......@@ -365,7 +373,9 @@ void SendJob::storeResult(bool success, const QString &message)
Q_ASSERT(mCurrentJob == nullptr);
mCurrentJob = new StoreResultJob(mItem, success, message);
connect(mCurrentJob, &StoreResultJob::result, this, [this](KJob *job) { doEmitResult(job); });
connect(mCurrentJob, &StoreResultJob::result, this, [this](KJob *job) {
doEmitResult(job);
});
}
void SendJob::doEmitResult(KJob *job)
......@@ -402,7 +412,9 @@ SendJob::~SendJob()
void SendJob::start()
{
QTimer::singleShot(0, this, [this]() { doTransport(); });
QTimer::singleShot(0, this, [this]() {
doTransport();
});
}
void SendJob::setMarkAborted()
......
......@@ -22,8 +22,7 @@
#include <KJob>
#include <AkonadiCore/Item>
namespace Akonadi
{
namespace Akonadi {
class Item;
class AgentInstance;
}
......
......@@ -35,9 +35,8 @@ SentActionHandler::SentActionHandler(QObject *parent)
void SentActionHandler::runAction(const SentActionAttribute::Action &action)
{
if (action.type() == SentActionAttribute::Action::MarkAsReplied ||
action.type() == SentActionAttribute::Action::MarkAsForwarded) {
if (action.type() == SentActionAttribute::Action::MarkAsReplied
|| action.type() == SentActionAttribute::Action::MarkAsForwarded) {
const Akonadi::Item item(action.value().toLongLong());
Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob(item);
connect(job, &Akonadi::ItemFetchJob::result, this, &SentActionHandler::itemFetchResult);
......@@ -69,4 +68,3 @@ void SentActionHandler::itemFetchResult(KJob *job)
Akonadi::ItemModifyJob *modifyJob = new Akonadi::ItemModifyJob(item);
modifyJob->setIgnorePayload(true);
}
......@@ -31,7 +31,6 @@
using namespace Akonadi;
using namespace MailTransport;
StoreResultJob::StoreResultJob(const Item &item, bool success, const QString &message, QObject *parent)
: TransactionSequence(parent)
{
......@@ -48,7 +47,9 @@ void StoreResultJob::doStart()
{
// Fetch item in case it was modified elsewhere.
ItemFetchJob *job = new ItemFetchJob(mItem, this);
connect(job, &ItemFetchJob::result, this, [this](KJob *job) { fetchDone(job); });
connect(job, &ItemFetchJob::result, this, [this](KJob *job) {
fetchDone(job);
});
}
bool StoreResultJob::success() const
......@@ -102,7 +103,9 @@ void StoreResultJob::fetchDone(KJob *job)
}
ItemModifyJob *modifyJob = new ItemModifyJob(item, this);
QObject::connect(modifyJob, &ItemModifyJob::result, this, [this](KJob *job) { modifyDone(job); });
QObject::connect(modifyJob, &ItemModifyJob::result, this, [this](KJob *job) {
modifyDone(job);
});
}
void StoreResultJob::modifyDone(KJob *job)
......
......@@ -25,7 +25,8 @@
DummyMigrator::DummyMigrator(const QString &identifier)
: MigratorBase(QLatin1String("dummymigrator") + identifier, QString(), QString())
{}
{
}
QString DummyMigrator::displayName() const
{
......@@ -65,4 +66,3 @@ void DummyMigrator::abort()
qDebug();
MigratorBase::abort();
}
......@@ -46,4 +46,4 @@ private Q_SLOTS:
void onTimerElapsed();
};
#endif
\ No newline at end of file
#endif
......@@ -29,13 +29,15 @@
Q_DECLARE_METATYPE(QModelIndex)
class Testmigrator: public MigratorBase
class Testmigrator : public MigratorBase
{
Q_OBJECT
public:
explicit Testmigrator(const QString &identifier, QObject *parent = nullptr):
MigratorBase(QLatin1String("testmigrator") + identifier, QString(), QString(), parent), mAutostart(false)
{}
explicit Testmigrator(const QString &identifier, QObject *parent = nullptr)
: MigratorBase(QLatin1String("testmigrator") + identifier, QString(), QString(), parent)
, mAutostart(false)
{
}
QString displayName() const override
{
......@@ -43,9 +45,11 @@ public:
}
void startWork() override