Commit 023dad27 authored by Lisa's avatar Lisa

Small fix. Function isInstalled used instead of direct query

parent 7fcf13cb
......@@ -216,7 +216,6 @@ void SyncOperation::searchResult(QUuid , QList< Akabei::Package* > packages)
if (p->database() == Akabei::Backend::instance()->localDatabase())
continue;
bool installed = !Akabei::Backend::instance()->localDatabase()->queryPackages("SELECT * FROM packages WHERE name=\"" + p->name() + "\" AND version=\"" + p->version().toByteArray() + "\"").isEmpty();
AkabeiClient::DatabaseHandler * db = 0;
foreach (AkabeiClient::DatabaseHandler *database, AkabeiClient::Backend::instance()->databases()) {
if (database->database() == p->database()) {
......@@ -229,11 +228,10 @@ void SyncOperation::searchResult(QUuid , QList< Akabei::Package* > packages)
continue;
out << db->name() << '/' << p->name() << ' ' << p->version().toByteArray().data();
if (installed)
out << ' ' << i18n("[Installed]");
if (p->isInstalled())
out << ' ' << i18n("[Installed]") << endl;
if (!m_options.contains(APM::ShowLess)) {
out << endl;
out << " " << p->description() << endl;
}
}
......
......@@ -37,6 +37,8 @@ private slots:
void install(QUuid,QList<Akabei::Package*>);
void upgrade(QUuid,QList<Akabei::Package*>);
void nextOperation();
private:
int m_currentDatabasePos;
int m_maxDbNameLenght;
......@@ -45,7 +47,6 @@ private:
void updateSystem();
void updateNextDatabase();
void nextOperation();
bool isIgnored(Akabei::Package *);
QList<APM::OperationName> m_operations;
......
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