on xenial help sign in
Some cleanups.
5fbee09Pawel Stolowski
plugins/Unity/lenses.cpp+5−6
@@ -44,7 +44,6 @@ Lenses::Lenses(QObject *parent)
44 m_unityLenses->scope_removed.connect(sigc::mem_fun(this, &Lenses::onScopeRemoved));
44 m_unityLenses->scope_removed.connect(sigc::mem_fun(this, &Lenses::onScopeRemoved));
45 m_unityLenses->scopes_reordered.connect(sigc::mem_fun(this, &Lenses::onScopesReordered));
45 m_unityLenses->scopes_reordered.connect(sigc::mem_fun(this, &Lenses::onScopesReordered));
46 m_unityLenses->LoadScopes();
46 m_unityLenses->LoadScopes();
47− //std::dynamic_pointer_cast<unity::dash::FilesystemLenses>(m_unityLenses)->lenses_loaded.connect(sigc::mem_fun(this, &Lenses::onLensesLoaded));
48}
47}
49
48
50QHash<int, QByteArray> Lenses::roleNames() const
49QHash<int, QByteArray> Lenses::roleNames() const
@@ -115,20 +114,20 @@ void Lenses::onScopeAdded(const unity::dash::Scope::Ptr& scope, int position)
115
114
116void Lenses::onScopeRemoved(const unity::dash::Scope::Ptr& scope)
115void Lenses::onScopeRemoved(const unity::dash::Scope::Ptr& scope)
117{
116{
118− //TODO pawel
117+ //TODO
119}
118}
120
119
121void Lenses::onScopesReordered(const unity::dash::Scopes::ScopeList& scopes)
120void Lenses::onScopesReordered(const unity::dash::Scopes::ScopeList& scopes)
122{
121{
123− //TODO pawel
122+ //TODO
124}
123}
125
124
126−void Lenses::onLensesLoaded()
125+void Lenses::loadMocks()
127{
126{
128 /* FIXME: this is temporary code that is required on mobile to order
127 /* FIXME: this is temporary code that is required on mobile to order
129 the lenses according to the design.
128 the lenses according to the design.
130 */
129 */
131− /*QStringList staticLenses;
130+ QStringList staticLenses;
132 staticLenses << "mockmusic.lens" << "people.lens" << "home.lens" << "applications.lens" << "mockvideos.lens";
131 staticLenses << "mockmusic.lens" << "people.lens" << "home.lens" << "applications.lens" << "mockvideos.lens";
133
132
134 // not all the lenses are guaranteed to go into the model (only if their UnitCore counterparts exist);
133 // not all the lenses are guaranteed to go into the model (only if their UnitCore counterparts exist);
@@ -159,7 +158,7 @@ void Lenses::onLensesLoaded()
159 addUnityLens(lens);
158 addUnityLens(lens);
160 }
159 }
161 endInsertRows();
160 endInsertRows();
162− }*/
161+ }
163
162
164 m_loaded = true;
163 m_loaded = true;
165 Q_EMIT loadedChanged(m_loaded);
164 Q_EMIT loadedChanged(m_loaded);
plugins/Unity/lenses.h+1−1
@@ -72,10 +72,10 @@ Q_SIGNALS:
72 void loadedChanged(bool loaded);
72 void loadedChanged(bool loaded);
73
73
74private Q_SLOTS:
74private Q_SLOTS:
75+ void loadMocks();
75 void onScopeAdded(const unity::dash::Scope::Ptr& lens, int position);
76 void onScopeAdded(const unity::dash::Scope::Ptr& lens, int position);
76 void onScopeRemoved(const unity::dash::Scope::Ptr& scope);
77 void onScopeRemoved(const unity::dash::Scope::Ptr& scope);
77 void onScopesReordered(const unity::dash::Scopes::ScopeList& scopes);
78 void onScopesReordered(const unity::dash::Scopes::ScopeList& scopes);
78− void onLensesLoaded();
79 void onLensPropertyChanged();
79 void onLensPropertyChanged();
80
80
81private:
81private: