Commit 03842521 authored by Luca Giambonini's avatar Luca Giambonini

Implemented the summary list of replaced packages. To be improved.

parent 8cb92de6
......@@ -308,11 +308,14 @@ void QueueOperation::validationFinished(bool valid)
}
if (!m_transaction->toBeReplaced().isEmpty()) {
out << QObject::tr("The following packages are going to be replaced: ");
foreach (Akabei::Package* old, m_transaction->toBeReplaced().keys()) {
if (old != *(m_transaction->toBeReplaced().keys().begin()))
foreach (Akabei::Package* pkg, m_transaction->toBeReplaced().keys()) {
QList<Akabei::Package*> older = m_transaction->toBeReplaced().value(pkg);
out << pkg->name() << " -> (";
foreach(Akabei::Package* replaced, older){
out << replaced->name();
out << QObject::tr(", ");
Akabei::Package* newer = m_transaction->toBeReplaced().value(old);
out << old->name() << " (" << old->version().toByteArray() << " -> " << newer->version().toByteArray() << ")";
}
out << ")";
}
out << endl;
}
......
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