Changeset View
Changeset View
Standalone View
Standalone View
src/core/jobs/transactionsequence.cpp
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 127 | if (!hasSubjobs()) { | |||
---|---|---|---|---|---|
128 | if (d->mState == TransactionSequencePrivate::WaitingForSubjobs) { | 128 | if (d->mState == TransactionSequencePrivate::WaitingForSubjobs) { | ||
129 | if (property("transactionsDisabled").toBool()) { | 129 | if (property("transactionsDisabled").toBool()) { | ||
130 | emitResult(); | 130 | emitResult(); | ||
131 | return; | 131 | return; | ||
132 | } | 132 | } | ||
133 | d->mState = TransactionSequencePrivate::Committing; | 133 | d->mState = TransactionSequencePrivate::Committing; | ||
134 | TransactionCommitJob *job = new TransactionCommitJob(this); | 134 | TransactionCommitJob *job = new TransactionCommitJob(this); | ||
135 | connect(job, &TransactionCommitJob::result, [d](KJob *job) { d->commitResult(job);}); | 135 | connect(job, &TransactionCommitJob::result, [d](KJob *job) { d->commitResult(job);}); | ||
136 | } else if (d->mState == TransactionSequencePrivate::RollingBack) { | | |||
137 | emitResult(); | | |||
138 | } | 136 | } | ||
139 | } | 137 | } | ||
140 | } else { | 138 | } else { | ||
141 | setError(job->error()); | 139 | setError(job->error()); | ||
142 | setErrorText(job->errorText()); | 140 | setErrorText(job->errorText()); | ||
143 | removeSubjob(job); | 141 | removeSubjob(job); | ||
144 | 142 | | |||
145 | // cancel all subjobs in case someone else is listening (such as ItemSync), but without notifying ourselves again | 143 | // cancel all subjobs in case someone else is listening (such as ItemSync), but without notifying ourselves again | ||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |