on xenial help sign in
Consolidate code style of the scope mock
b12681eMichal Hruby
tests/mocks/Unity/fake_scope.cpp+38−19
@@ -35,91 +35,110 @@ Scope::Scope(QString const& id, QString const& name, bool visible, QObject* pare
35{
35{
36}
36}
37
37
38−QString Scope::id() const {
38+QString Scope::id() const
39+{
39 return m_id;
40 return m_id;
40}
41}
41
42
42−QString Scope::name() const {
43+QString Scope::name() const
44+{
43 return m_name;
45 return m_name;
44}
46}
45
47
46−QString Scope::searchQuery() const {
48+QString Scope::searchQuery() const
49+{
47 return m_searchQuery;
50 return m_searchQuery;
48}
51}
49
52
50−QString Scope::iconHint() const {
53+QString Scope::iconHint() const
54+{
51 return m_iconHint;
55 return m_iconHint;
52}
56}
53
57
54−QString Scope::description() const {
58+QString Scope::description() const
59+{
55 return m_description;
60 return m_description;
56}
61}
57
62
58−QString Scope::searchHint() const {
63+QString Scope::searchHint() const
64+{
59 return QString("");
65 return QString("");
60}
66}
61
67
62−QString Scope::shortcut() const {
68+QString Scope::shortcut() const
69+{
63 return QString("");
70 return QString("");
64}
71}
65
72
66−bool Scope::searchInProgress() const {
73+bool Scope::searchInProgress() const
74+{
67 return m_searching;
75 return m_searching;
68}
76}
69
77
70−unity::shell::scopes::CategoriesInterface* Scope::categories() const {
78+unity::shell::scopes::CategoriesInterface* Scope::categories() const
79+{
71 return m_categories;
80 return m_categories;
72}
81}
73
82
74−unity::shell::scopes::SettingsModelInterface* Scope::settings() const {
83+unity::shell::scopes::SettingsModelInterface* Scope::settings() const
84+{
75 return nullptr;
85 return nullptr;
76}
86}
77
87
78−QString Scope::noResultsHint() const {
88+QString Scope::noResultsHint() const
89+{
79 return m_noResultsHint;
90 return m_noResultsHint;
80}
91}
81
92
82−QString Scope::formFactor() const {
93+QString Scope::formFactor() const
94+{
83 return m_formFactor;
95 return m_formFactor;
84}
96}
85
97
86−bool Scope::visible() const {
98+bool Scope::visible() const
99+{
87 return m_visible;
100 return m_visible;
88}
101}
89
102
90−bool Scope::isActive() const {
103+bool Scope::isActive() const
104+{
91 return m_isActive;
105 return m_isActive;
92}
106}
93
107
94−void Scope::setSearchQuery(const QString &str) {
108+void Scope::setSearchQuery(const QString &str)
109+{
95 if (str != m_searchQuery) {
110 if (str != m_searchQuery) {
96 m_searchQuery = str;
111 m_searchQuery = str;
97 Q_EMIT searchQueryChanged();
112 Q_EMIT searchQueryChanged();
98 }
113 }
99}
114}
100
115
101−void Scope::setFormFactor(const QString &str) {
116+void Scope::setFormFactor(const QString &str)
117+{
102 if (str != m_formFactor) {
118 if (str != m_formFactor) {
103 m_formFactor = str;
119 m_formFactor = str;
104 Q_EMIT formFactorChanged();
120 Q_EMIT formFactorChanged();
105 }
121 }
106}
122}
107
123
108−void Scope::setActive(const bool active) {
124+void Scope::setActive(const bool active)
125+{
109 if (active != m_isActive) {
126 if (active != m_isActive) {
110 m_isActive = active;
127 m_isActive = active;
111 Q_EMIT isActiveChanged();
128 Q_EMIT isActiveChanged();
112 }
129 }
113}
130}
114
131
115−void Scope::setSearchInProgress(const bool inProg) {
132+void Scope::setSearchInProgress(const bool inProg)
133+{
116 if (inProg != m_searching) {
134 if (inProg != m_searching) {
117 m_searching = inProg;
135 m_searching = inProg;
118 Q_EMIT searchInProgressChanged();
136 Q_EMIT searchInProgressChanged();
119 }
137 }
120}
138}
121
139
122−void Scope::setNoResultsHint(const QString& str) {
140+void Scope::setNoResultsHint(const QString& str)
141+{
123 if (str != m_noResultsHint) {
142 if (str != m_noResultsHint) {
124 m_noResultsHint = str;
143 m_noResultsHint = str;
125 Q_EMIT noResultsHintChanged();
144 Q_EMIT noResultsHintChanged();