on xenial help sign in
Making the functions static to make testing them easier
commitef92825c049916043b67916549e76be05e498987 authorTed Gould <ted@gould.cx> dateMon 14 Apr 2014, 12:41 (13 years ago) parent4624bcc
2 files changed+6−5
plugins/Unity/Launcher/backend/launcherbackend.cpp+2−2 plugins/Unity/Launcher/backend/launcherbackend.h+4−3
plugins/Unity/Launcher/backend/launcherbackend.cpp+2−2
@@ -491,7 +491,7 @@ QString LauncherBackend::introspect (const QString &path) const
491491 return nodeiface;
492492}
493493
494−QString LauncherBackend::decodeAppId (const QString& path) const
494+QString LauncherBackend::decodeAppId (const QString& path)
495495{
496496 QByteArray bytes = path.toUtf8();
497497 QByteArray decoded;
@@ -518,7 +518,7 @@ QString LauncherBackend::decodeAppId (const QString& path) const
518518 return decoded;
519519}
520520
521−QString LauncherBackend::encodeAppId (const QString& appId) const
521+QString LauncherBackend::encodeAppId (const QString& appId)
522522{
523523 QByteArray bytes = appId.toUtf8();
524524 QString encoded;
plugins/Unity/Launcher/backend/launcherbackend.h+4−3
@@ -183,10 +183,11 @@ private:
183183 AccountsServiceDBusAdaptor *m_accounts;
184184 QString m_user;
185185
186− QString decodeAppId (const QString& path) const;
187− QString encodeAppId (const QString& appId) const;
188−
189186 void emitPropChangedDbus (const QString& appId, const QString& property, QVariant &value) const;
187+
188+public: /* Only public to make them easier to test independently */
189+ static QString decodeAppId (const QString& path);
190+ static QString encodeAppId (const QString& appId);
190191};
191192
192193#endif // LAUNCHERBACKEND_H