@@ -25,7 +25,6 @@
2525#include <QDBusArgument>
2626#include <QFileInfo>
2727#include <QGSettings>
28−#include <QDebug>
2928
3029class LauncherBackendItem
3130{
@@ -107,10 +106,8 @@ QString LauncherBackend::displayName(const QString &appId) const
107106
108107QString LauncherBackend::icon(const QString &appId) const
109108{
110− qDebug() << "searching for icon >>>>>>>>>>>>>>>>>>>>" << appId;
111109 QString iconName;
112110 if (m_itemCache.contains(appId)) {
113− qDebug() << "found icon in cache" << m_itemCache.value(appId)->icon;
114111 iconName = m_itemCache.value(appId)->icon;
115112 } else {
116113 QString df = findDesktopFile(appId);
@@ -147,7 +144,6 @@ bool LauncherBackend::isPinned(const QString &appId) const
147144void LauncherBackend::setPinned(const QString &appId, bool pinned)
148145{
149146 if (!m_storedApps.contains(appId)) {
150− qDebug() << "Cannot pin item. Unknown appId";
151147 return;
152148 }
153149
@@ -204,25 +200,19 @@ void LauncherBackend::syncFromAccounts()
204200
205201 m_storedApps.clear();
206202
207− qDebug() << "syncing from accounts" << m_user << m_accounts;
208203 if (m_accounts && m_user.isEmpty()) {
209− qDebug() << "loading from user" << m_user << m_accounts;
210204 QVariant variant = m_accounts->getUserProperty(m_user, "launcher-items");
211− qDebug() << "loaded launcher-items" << variant;
212205 apps = qdbus_cast<QList<QVariantMap>>(variant.value<QDBusArgument>());
213206 defaults = isDefaultsItem(apps);
214207 }
215208
216209 if (m_accounts && defaults) { // Checking accounts as it'll be null when !useStorage
217210 QGSettings gSettings("com.canonical.Unity.Launcher", "/com/canonical/unity/launcher/");
218− qDebug() << "Got launcher gSettings" << gSettings.get("favorites");
219211 Q_FOREACH(const QString &entry, gSettings.get("favorites").toStringList()) {
220212 if (entry.startsWith("application://")) {
221213 QString appId = entry;
222214 appId.remove("application://");
223− qDebug() << "searching for" << entry << appId;
224215 QString df = findDesktopFile(appId);
225− qDebug() << "desktop file path" << df;
226216
227217 if (!df.isEmpty()) {
228218 m_storedApps << appId;
@@ -243,7 +233,6 @@ void LauncherBackend::syncFromAccounts()
243233
244234void LauncherBackend::syncToAccounts()
245235{
246− qDebug() << "syncing to accounts";
247236 if (m_accounts && !m_user.isEmpty()) {
248237 QList<QVariantMap> items;
249238
@@ -286,7 +275,6 @@ LauncherBackendItem* LauncherBackend::parseDesktopFile(const QString &desktopFil
286275 item->displayName = settings.value("Desktop Entry/Name").toString();
287276 item->icon = settings.value("Desktop Entry/Icon").toString();
288277 item->pinned = false;
289− qDebug() << "reading file" << desktopFile << settings.value("Desktop Entry/Name") << item->icon;
290278 return item;
291279}
292280
@@ -329,9 +317,5 @@ bool LauncherBackend::isDefaultsItem(const QList<QVariantMap> &apps) const
329317 // To differentiate between an empty list and a list that hasn't been set
330318 // yet (and should thus be populated with the defaults), we use a special
331319 // list of one item with the 'defaults' field set to true.
332− qDebug() << apps.size();
333− if (apps.size() == 1)
334− qDebug() << apps[0].value("defaults").toBool();
335−
336320 return (apps.size() == 1 && apps[0].value("defaults").toBool());
337321}