Commit 97d4416d authored by AlmAck's avatar AlmAck

better terminal output, more spaces between pkg output list

cleanup not required ';'
parent 03842521
...@@ -92,6 +92,6 @@ enum OperationName { ...@@ -92,6 +92,6 @@ enum OperationName {
PrintFiles PrintFiles
}; };
typedef enum OperationName OperationName; typedef enum OperationName OperationName;
}; }
#endif #endif
\ No newline at end of file
...@@ -179,7 +179,7 @@ void QueueOperation::transactionCreated(AkabeiClient::Transaction* t) ...@@ -179,7 +179,7 @@ void QueueOperation::transactionCreated(AkabeiClient::Transaction* t)
} }
if (t->isValid()) { if (t->isValid()) {
out << QObject::tr("Validating transaction...") << "\r"; out << QObject::tr("Validating transaction...") << "\n";
AkabeiClient::Backend::instance()->transactionHandler()->validate(); AkabeiClient::Backend::instance()->transactionHandler()->validate();
} else { } else {
err << Akabei::errorPrefix << QObject::tr("Invalid transaction, quitting...") << endl; err << Akabei::errorPrefix << QObject::tr("Invalid transaction, quitting...") << endl;
...@@ -270,7 +270,7 @@ void QueueOperation::validationFinished(bool valid) ...@@ -270,7 +270,7 @@ void QueueOperation::validationFinished(bool valid)
installSize -= i->installedSize(); installSize -= i->installedSize();
} }
if (!m_transaction->toBeRemoved().isEmpty()) { if (!m_transaction->toBeRemoved().isEmpty()) {
out << QObject::tr("The following packages are going to be removed: "); out << '\n' << QObject::tr("The following packages are going to be removed:") << '\n';
foreach (Akabei::Package * pkg, m_transaction->toBeRemoved()) { foreach (Akabei::Package * pkg, m_transaction->toBeRemoved()) {
if (pkg != *(m_transaction->toBeRemoved().begin())) if (pkg != *(m_transaction->toBeRemoved().begin()))
out << QObject::tr(", "); out << QObject::tr(", ");
...@@ -279,7 +279,7 @@ void QueueOperation::validationFinished(bool valid) ...@@ -279,7 +279,7 @@ void QueueOperation::validationFinished(bool valid)
out << endl; out << endl;
} }
if (!m_transaction->toBeInstalled().isEmpty()) { if (!m_transaction->toBeInstalled().isEmpty()) {
out << QObject::tr("The following packages are going to be installed: "); out << '\n' << QObject::tr("The following packages are going to be installed:") << '\n';
foreach (Akabei::Package * pkg, m_transaction->toBeInstalled()) { foreach (Akabei::Package * pkg, m_transaction->toBeInstalled()) {
if (pkg != *(m_transaction->toBeInstalled().begin())) if (pkg != *(m_transaction->toBeInstalled().begin()))
out << QObject::tr(", "); out << QObject::tr(", ");
...@@ -288,7 +288,7 @@ void QueueOperation::validationFinished(bool valid) ...@@ -288,7 +288,7 @@ void QueueOperation::validationFinished(bool valid)
out << endl; out << endl;
} }
if (!m_transaction->toBeUpgraded().isEmpty()) { if (!m_transaction->toBeUpgraded().isEmpty()) {
out << QObject::tr("The following packages are going to be upgraded: "); out << '\n' << QObject::tr("The following packages are going to be upgraded:") << '\n';
foreach (Akabei::Package* old, m_transaction->toBeUpgraded().keys()) { foreach (Akabei::Package* old, m_transaction->toBeUpgraded().keys()) {
if (old != *(m_transaction->toBeUpgraded().keys().begin())) if (old != *(m_transaction->toBeUpgraded().keys().begin()))
out << QObject::tr(", "); out << QObject::tr(", ");
...@@ -298,7 +298,7 @@ void QueueOperation::validationFinished(bool valid) ...@@ -298,7 +298,7 @@ void QueueOperation::validationFinished(bool valid)
out << endl; out << endl;
} }
if (!m_transaction->toBeReinstalled().isEmpty()) { if (!m_transaction->toBeReinstalled().isEmpty()) {
out << QObject::tr("The following packages are going to be reinstalled: "); out << '\n' << QObject::tr("The following packages are going to be reinstalled:") << '\n';
foreach (Akabei::Package * pkg, m_transaction->toBeReinstalled()) { foreach (Akabei::Package * pkg, m_transaction->toBeReinstalled()) {
if (pkg != *(m_transaction->toBeReinstalled().begin())) if (pkg != *(m_transaction->toBeReinstalled().begin()))
out << QObject::tr(", "); out << QObject::tr(", ");
...@@ -307,7 +307,7 @@ void QueueOperation::validationFinished(bool valid) ...@@ -307,7 +307,7 @@ void QueueOperation::validationFinished(bool valid)
out << endl; out << endl;
} }
if (!m_transaction->toBeReplaced().isEmpty()) { if (!m_transaction->toBeReplaced().isEmpty()) {
out << QObject::tr("The following packages are going to be replaced: "); out << '\n' << QObject::tr("The following packages are going to be replaced:") << '\n';
foreach (Akabei::Package* pkg, m_transaction->toBeReplaced().keys()) { foreach (Akabei::Package* pkg, m_transaction->toBeReplaced().keys()) {
QList<Akabei::Package*> older = m_transaction->toBeReplaced().value(pkg); QList<Akabei::Package*> older = m_transaction->toBeReplaced().value(pkg);
out << pkg->name() << " -> ("; out << pkg->name() << " -> (";
......
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