Changeset View
Changeset View
Standalone View
Standalone View
src/editoritemmanager.cpp
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Line(s) | 346 | if (d->mItem.parentCollection() == d->mItemUi->selectedCollection() | |||
---|---|---|---|---|---|
347 | || d->mItem.storageCollectionId() == d->mItemUi->selectedCollection().id()) { | 347 | || d->mItem.storageCollectionId() == d->mItemUi->selectedCollection().id()) { | ||
348 | d->mChanger->modifyIncidence(d->mItem, oldPayload); | 348 | d->mChanger->modifyIncidence(d->mItem, oldPayload); | ||
349 | } else { | 349 | } else { | ||
350 | Q_ASSERT(d->mItemUi->selectedCollection().isValid()); | 350 | Q_ASSERT(d->mItemUi->selectedCollection().isValid()); | ||
351 | Q_ASSERT(d->mItem.parentCollection().isValid()); | 351 | Q_ASSERT(d->mItem.parentCollection().isValid()); | ||
352 | 352 | | |||
353 | // ETM and the KSelectionProxyModel has a bug wrt collections moves, so this is disabled. | 353 | // ETM and the KSelectionProxyModel has a bug wrt collections moves, so this is disabled. | ||
354 | // To test this, enable the collection combo-box and remove the following assert. | 354 | // To test this, enable the collection combo-box and remove the following assert. | ||
355 | qCCritical(INCIDENCEEDITOR_LOG) << "Moving between collections is disabled for now: " | 355 | qCDebug(INCIDENCEEDITOR_LOG) << "Moving from" | ||
356 | << d->mItemUi->selectedCollection().id() | 356 | << d->mItem.parentCollection().id() << "to" | ||
357 | << d->mItem.parentCollection().id(); | 357 | << d->mItemUi->selectedCollection().id(); | ||
358 | Q_ASSERT_X(false, "save()", "Moving between collections is disabled for now"); | | |||
359 | 358 | | |||
360 | if (d->mItemUi->isDirty()) { | 359 | if (d->mItemUi->isDirty()) { | ||
361 | d->mChanger->modifyIncidence(d->mItem, oldPayload); | 360 | d->mChanger->modifyIncidence(d->mItem, oldPayload); | ||
362 | } else { | 361 | } else { | ||
363 | Akonadi::ItemMoveJob *itemMoveJob | 362 | Akonadi::ItemMoveJob *itemMoveJob | ||
364 | = new Akonadi::ItemMoveJob(d->mItem, d->mItemUi->selectedCollection()); | 363 | = new Akonadi::ItemMoveJob(d->mItem, d->mItemUi->selectedCollection()); | ||
365 | connect(itemMoveJob, SIGNAL(result(KJob*)), SLOT(itemMoveResult(KJob*))); | 364 | connect(itemMoveJob, SIGNAL(result(KJob*)), SLOT(itemMoveResult(KJob*))); | ||
366 | } | 365 | } | ||
Show All 30 Lines |