~ubuntu-branches/ubuntu/vivid/muon/vivid-proposed

« back to all changes in this revision

Viewing changes to libmuon/backends/AkabeiBackend/AkabeiResource.cpp

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark
  • Date: 2015-03-24 07:36:31 UTC
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: package-import@ubuntu.com-20150324073631-7nmay5episnfkdlt
Tags: upstream-5.2.2
ImportĀ upstreamĀ versionĀ 5.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
{
174
174
    QList<PackageState> states;
175
175
    foreach (const QString &optdep, m_pkg->optionalDependencies()) {
176
 
        QStringList split = optdep.split(":");
 
176
        QStringList split = optdep.split(':');
177
177
        if (split.count() >= 2) {
178
178
            bool installed = !Akabei::Backend::instance()->localDatabase()->queryPackages(Akabei::Queries::selectPackages("name", "LIKE", split.first())).isEmpty();
179
179
            if (!installed) {
180
 
                installed = !Akabei::Backend::instance()->localDatabase()->queryPackages("SELECT * FROM packages JOIN provides WHERE provides.provides LIKE \"" + split.first() + "\"").isEmpty();
 
180
                installed = !Akabei::Backend::instance()->localDatabase()->queryPackages("SELECT * FROM packages JOIN provides WHERE provides.provides LIKE \"" + split.first() + '\"').isEmpty();
181
181
            }
182
182
            states.append(PackageState(split.first(), split.at(1), installed));
183
183
        }