Changeset View
Changeset View
Standalone View
Standalone View
runners/appstream/appstreamrunner.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 109 | { | |||
---|---|---|---|---|---|
111 | if (!QDesktopServices::openUrl(appstreamUrl)) | 111 | if (!QDesktopServices::openUrl(appstreamUrl)) | ||
112 | qCWarning(RUNNER_APPSTREAM) << "couldn't open" << appstreamUrl; | 112 | qCWarning(RUNNER_APPSTREAM) << "couldn't open" << appstreamUrl; | ||
113 | } | 113 | } | ||
114 | 114 | | |||
115 | QList<AppStream::Component> InstallerRunner::findComponentsByString(const QString &query) | 115 | QList<AppStream::Component> InstallerRunner::findComponentsByString(const QString &query) | ||
116 | { | 116 | { | ||
117 | QMutexLocker locker(&m_appstreamMutex); | 117 | QMutexLocker locker(&m_appstreamMutex); | ||
118 | QString error; | 118 | QString error; | ||
119 | static bool warnedOnce = false; | ||||
119 | static bool opened = m_db.load(&error); | 120 | static bool opened = m_db.load(&error); | ||
120 | if(!opened) { | 121 | if(!opened) { | ||
122 | if (warnedOnce) { | ||||
123 | qCDebug(RUNNER_APPSTREAM) << "Had errors when loading AppStream metadata pool" << error; | ||||
124 | } else { | ||||
121 | qCWarning(RUNNER_APPSTREAM) << "Had errors when loading AppStream metadata pool" << error; | 125 | qCWarning(RUNNER_APPSTREAM) << "Had errors when loading AppStream metadata pool" << error; | ||
126 | warnedOnce = true; | ||||
127 | } | ||||
122 | } | 128 | } | ||
123 | 129 | | |||
124 | return m_db.search(query); | 130 | return m_db.search(query); | ||
125 | } | 131 | } | ||
126 | 132 | | |||
127 | #include "appstreamrunner.moc" | 133 | #include "appstreamrunner.moc" |