on xenial help sign in
Removed ViewType.
commit87faa27e5026de6d36aea0789ae2c99ce2d4b114 authorPawel Stolowski <pawel.stolowski@canonical.com> dateWed 12 Jun 2013, 17:15 (13 years ago) parent4c9df2c
2 files changed−29
plugins/Unity/scope.cpp−17 plugins/Unity/scope.h−12
plugins/Unity/scope.cpp−17
@@ -87,11 +87,6 @@ Categories* Scope::categories() const
8787 return m_categories;
8888}
8989
90−Scope::ViewType Scope::viewType() const
91−{
92− return (Scope::ViewType) m_unityScope->view_type();
93−}
94−
9590QString Scope::searchQuery() const
9691{
9792 return m_searchQuery;
@@ -102,11 +97,6 @@ QString Scope::noResultsHint() const
10297 return m_noResultsHint;
10398}
10499
105−void Scope::setViewType(const Scope::ViewType& viewType)
106−{
107− m_unityScope->view_type = (unity::dash::ScopeViewType) viewType;
108−}
109−
110100void Scope::setSearchQuery(const QString& search_query)
111101{
112102 /* Checking for m_searchQuery.isNull() which returns true only when the string
@@ -205,8 +195,6 @@ void Scope::setUnityScope(const unity::dash::Scope::Ptr& scope)
205195 m_unityScope->categories()->model.changed.connect(sigc::mem_fun(this, &Scope::onCategoriesModelChanged));
206196 m_unityScope->categories.changed.connect(sigc::mem_fun(this, &Scope::onCategoriesChanged));
207197 m_unityScope->categories()->swarm_name.changed.connect(sigc::mem_fun(this, &Scope::onCategoriesSwarmNameChanged));
208− m_unityScope->view_type.changed.connect(sigc::mem_fun(this, &Scope::onViewTypeChanged));
209−
210198 /* Signals forwarding */
211199 connect(this, SIGNAL(searchFinished(const std::string &, unity::glib::HintsMap const &, unity::glib::Error const &)), SLOT(onSearchFinished(const std::string &, unity::glib::HintsMap const &)));
212200
@@ -265,11 +253,6 @@ void Scope::onCategoriesModelChanged(unity::glib::Object<DeeModel> model)
265253 m_categories->setModel(model);
266254}
267255
268−void Scope::onViewTypeChanged(unity::dash::ScopeViewType viewType)
269−{
270− Q_EMIT viewTypeChanged( (Scope::ViewType) viewType);
271−}
272−
273256void Scope::onSearchFinished(const std::string &query, unity::glib::HintsMap const &hints)
274257{
275258 QString hint;
plugins/Unity/scope.h−12
@@ -37,7 +37,6 @@ class Categories;
3737class Scope : public QObject
3838{
3939 Q_OBJECT
40− Q_ENUMS(ViewType)
4140
4241 Q_PROPERTY(QString id READ id NOTIFY idChanged)
4342 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
@@ -49,7 +48,6 @@ class Scope : public QObject
4948 Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
5049 Q_PROPERTY(DeeListModel* results READ results NOTIFY resultsChanged)
5150 Q_PROPERTY(Categories* categories READ categories NOTIFY categoriesChanged)
52− Q_PROPERTY(ViewType viewType READ viewType WRITE setViewType NOTIFY viewTypeChanged)
5351
5452 Q_PROPERTY(QString searchQuery READ searchQuery WRITE setSearchQuery NOTIFY searchQueryChanged)
5553 Q_PROPERTY(QString noResultsHint READ noResultsHint WRITE setNoResultsHint NOTIFY noResultsHintChanged)
@@ -57,12 +55,6 @@ class Scope : public QObject
5755public:
5856 explicit Scope(QObject *parent = 0);
5957
60− enum ViewType {
61− Hidden,
62− HomeView,
63− ScopeView
64− };
65−
6658 /* getters */
6759 QString id() const;
6860 QString name() const;
@@ -75,12 +67,10 @@ public:
7567 DeeListModel* results() const;
7668 DeeListModel* globalResults() const;
7769 Categories* categories() const;
78− ViewType viewType() const;
7970 QString searchQuery() const;
8071 QString noResultsHint() const;
8172
8273 /* setters */
83− void setViewType(const ViewType& viewType);
8474 void setSearchQuery(const QString& search_query);
8575 void setNoResultsHint(const QString& hint);
8676
@@ -101,7 +91,6 @@ Q_SIGNALS:
10191 void connectedChanged(bool);
10292 void resultsChanged();
10393 void categoriesChanged();
104− void viewTypeChanged(ViewType);
10594 void searchFinished(const std::string&, unity::glib::HintsMap const&, unity::glib::Error const&);
10695 void searchQueryChanged();
10796 void noResultsHintChanged();
@@ -117,7 +106,6 @@ private:
117106 void onCategoriesSwarmNameChanged(const std::string&);
118107 void onCategoriesModelChanged(unity::glib::Object<DeeModel>);
119108 void onCategoriesChanged(const unity::dash::Categories::Ptr&);
120− void onViewTypeChanged(unity::dash::ScopeViewType);
121109
122110 void onActivated(unity::dash::LocalResult const& result, unity::dash::ScopeHandledType type, unity::glib::HintsMap const&);
123111 void fallbackActivate(const QString& uri);