Commit 74a38143 authored by Stefan Brüns's avatar Stefan Brüns

[AppStream Runner] Pass on error message from the library

Summary:
AppStreamQt since 0.10.6 allows to pass on error messages in case some
errors occured when loading the AppStream data.

CCBUG: 374279

Reviewers: #plasma, apol, ngraham

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14804
parent 0ec3f768
......@@ -91,7 +91,7 @@ if(X11_FOUND AND XCB_XCB_FOUND)
set(HAVE_X11 1)
endif()
find_package(AppStreamQt 0.10.4)
find_package(AppStreamQt 0.10.6)
set_package_properties(AppStreamQt PROPERTIES DESCRIPTION "Access metadata for listing available software"
URL "https://www.freedesktop.org/wiki/Distributions/AppStream/"
TYPE OPTIONAL
......
......@@ -113,9 +113,10 @@ void InstallerRunner::run(const Plasma::RunnerContext &/*context*/, const Plasma
QList<AppStream::Component> InstallerRunner::findComponentsByString(const QString &query)
{
QMutexLocker locker(&m_appstreamMutex);
static bool opened = m_db.load();
QString error;
static bool opened = m_db.load(&error);
if(!opened) {
qWarning() << "no appstream for you";
qWarning() << "Had errors when loading AppStream metadata pool" << error;
}
return m_db.search(query);
......
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