Changeset View
Changeset View
Standalone View
Standalone View
src/tm/jobs.cpp
Show First 20 Lines • Show All 582 Lines • ▼ Show 20 Line(s) | 581 | query1.prepare(U("UPDATE target_strings " | |||
---|---|---|---|---|---|
583 | "WHERE id=") % QString::number(targetId)); | 583 | "WHERE id=") % QString::number(targetId)); | ||
584 | 584 | | |||
585 | query1.bindValue(0, target.string.isEmpty() ? QVariant() : target.string); | 585 | query1.bindValue(0, target.string.isEmpty() ? QVariant() : target.string); | ||
586 | query1.bindValue(1, targetAccelPos != -1 ? QVariant(targetAccelPos) : QVariant()); | 586 | query1.bindValue(1, targetAccelPos != -1 ? QVariant(targetAccelPos) : QVariant()); | ||
587 | query1.bindValue(2, target.tagsAsByteArray()); | 587 | query1.bindValue(2, target.tagsAsByteArray()); | ||
588 | bool ok = query1.exec(); //note the RETURN!!!! | 588 | bool ok = query1.exec(); //note the RETURN!!!! | ||
589 | if (!ok) | 589 | if (!ok) | ||
590 | qCWarning(LOKALIZE_LOG) << "doInsertEntry: target update failed" << query1.lastError().text(); | 590 | qCWarning(LOKALIZE_LOG) << "doInsertEntry: target update failed" << query1.lastError().text(); | ||
591 | else | 591 | else { | ||
592 | { | | |||
593 | ok = query1.exec(QStringLiteral("UPDATE main SET change_date=CURRENT_DATE WHERE target=") % QString::number(targetId)); | 592 | ok = query1.exec(QStringLiteral("UPDATE main SET change_date=CURRENT_DATE WHERE target=") % QString::number(targetId)); | ||
594 | if (!ok) | 593 | if (!ok) | ||
595 | qCWarning(LOKALIZE_LOG) << "doInsertEntry: main update failed" << query1.lastError().text(); | 594 | qCWarning(LOKALIZE_LOG) << "doInsertEntry: main update failed" << query1.lastError().text(); | ||
596 | } | 595 | } | ||
597 | return ok; | 596 | return ok; | ||
598 | } | 597 | } | ||
599 | //else -> there will be new record insertion and main table update below | 598 | //else -> there will be new record insertion and main table update below | ||
600 | } | 599 | } | ||
▲ Show 20 Lines • Show All 1531 Lines • Show Last 20 Lines |