@@ -82,7 +82,7 @@ void LauncherBackend::setStoredApplications(const QStringList &appIds)
82 m_itemCache.insert(appId, item);
82 m_itemCache.insert(appId, item);
84 // Cannot find any data for that app... ignoring it.
84 // Cannot find any data for that app... ignoring it.
85− qDebug() << "cannot find desktop file for" << appId << ". discarding app";
85+ qWarning() << "cannot find desktop file for" << appId << ". discarding app.";
86 m_storedApps.removeAll(appId);
86 m_storedApps.removeAll(appId);
@@ -213,16 +213,12 @@ void LauncherBackend::syncFromAccounts()
214 m_storedApps.clear();
214 m_storedApps.clear();
216− qDebug() << "syncing from accounts" << m_accounts << m_user;
218 if (m_accounts && !m_user.isEmpty()) {
216 if (m_accounts && !m_user.isEmpty()) {
219 QVariant variant = m_accounts->getUserProperty(m_user, "launcher-items");
217 QVariant variant = m_accounts->getUserProperty(m_user, "launcher-items");
220 apps = qdbus_cast<QList<QVariantMap>>(variant.value<QDBusArgument>());
218 apps = qdbus_cast<QList<QVariantMap>>(variant.value<QDBusArgument>());
221 defaults = isDefaultsItem(apps);
219 defaults = isDefaultsItem(apps);
224− qDebug() << "--------------------- should load defaults?" << defaults;
226 if (m_accounts && defaults) { // Checking accounts as it'll be null when !useStorage
222 if (m_accounts && defaults) { // Checking accounts as it'll be null when !useStorage
227 QGSettings gSettings("com.canonical.Unity.Launcher", "/com/canonical/unity/launcher/");
223 QGSettings gSettings("com.canonical.Unity.Launcher", "/com/canonical/unity/launcher/");
228 Q_FOREACH(const QString &entry, gSettings.get("favorites").toStringList()) {
224 Q_FOREACH(const QString &entry, gSettings.get("favorites").toStringList()) {
@@ -243,7 +239,6 @@ void LauncherBackend::syncFromAccounts()
245 for (const QVariant &app: apps) {
241 for (const QVariant &app: apps) {
246− qDebug() << "should load app" << app;
247 loadFromVariant(app.toMap());
242 loadFromVariant(app.toMap());
@@ -251,19 +246,15 @@ void LauncherBackend::syncFromAccounts()
252void LauncherBackend::syncToAccounts()
247void LauncherBackend::syncToAccounts()
254− qDebug() << "syncing to accounts" << m_accounts << m_user << m_storedApps;
255 if (m_accounts && !m_user.isEmpty()) {
249 if (m_accounts && !m_user.isEmpty()) {
256 QList<QVariantMap> items;
250 QList<QVariantMap> items;
258 Q_FOREACH(const QString &appId, m_storedApps) {
252 Q_FOREACH(const QString &appId, m_storedApps) {
259− qDebug() << "appending item" << appId;
260 items << itemToVariant(appId);
253 items << itemToVariant(appId);
263− qDebug() << "syncing apps" << items;
264 m_accounts->setUserProperty(m_user, "launcher-items", QVariant::fromValue(items));
256 m_accounts->setUserProperty(m_user, "launcher-items", QVariant::fromValue(items));
266− qDebug() << "done synving";
269QString LauncherBackend::findDesktopFile(const QString &appId) const
260QString LauncherBackend::findDesktopFile(const QString &appId) const
@@ -340,6 +331,5 @@ bool LauncherBackend::isDefaultsItem(const QList<QVariantMap> &apps) const
340 // To differentiate between an empty list and a list that hasn't been set
331 // To differentiate between an empty list and a list that hasn't been set
341 // yet (and should thus be populated with the defaults), we use a special
332 // yet (and should thus be populated with the defaults), we use a special
342 // list of one item with the 'defaults' field set to true.
333 // list of one item with the 'defaults' field set to true.
343− qDebug() << "checking isDefaults" << apps;
344 return (apps.size() == 1 && apps[0].value("defaults").toBool());
334 return (apps.size() == 1 && apps[0].value("defaults").toBool());