Changeset View
Changeset View
Standalone View
Standalone View
tests/units/widgets/availablepagesviewtest.cpp
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Line(s) | 135 | public slots: | |||
---|---|---|---|---|---|
140 | } | 140 | } | ||
141 | 141 | | |||
142 | void addContext(const QString &name, const Domain::DataSource::Ptr &source) | 142 | void addContext(const QString &name, const Domain::DataSource::Ptr &source) | ||
143 | { | 143 | { | ||
144 | contextNames << name; | 144 | contextNames << name; | ||
145 | sources << source; | 145 | sources << source; | ||
146 | } | 146 | } | ||
147 | 147 | | |||
148 | void addTag(const QString &name) | | |||
149 | { | | |||
150 | tagNames << name; | | |||
151 | } | | |||
152 | | ||||
153 | void removeItem(const QModelIndex &index) | 148 | void removeItem(const QModelIndex &index) | ||
154 | { | 149 | { | ||
155 | projectRemoved = index.data().toString(); | 150 | projectRemoved = index.data().toString(); | ||
156 | } | 151 | } | ||
157 | 152 | | |||
158 | public Q_SLOTS: | 153 | public Q_SLOTS: | ||
159 | QObject *createPageForIndex(const QModelIndex &) { return nullptr; } | 154 | QObject *createPageForIndex(const QModelIndex &) { return nullptr; } | ||
160 | 155 | | |||
161 | public: | 156 | public: | ||
162 | QStringList projectNames; | 157 | QStringList projectNames; | ||
163 | QStringList contextNames; | 158 | QStringList contextNames; | ||
164 | QStringList tagNames; | | |||
165 | QList<Domain::DataSource::Ptr> sources; | 159 | QList<Domain::DataSource::Ptr> sources; | ||
166 | QString projectRemoved; | 160 | QString projectRemoved; | ||
167 | }; | 161 | }; | ||
168 | 162 | | |||
169 | class AvailablePagesViewTest : public QObject | 163 | class AvailablePagesViewTest : public QObject | ||
170 | { | 164 | { | ||
171 | Q_OBJECT | 165 | Q_OBJECT | ||
172 | private slots: | 166 | private slots: | ||
▲ Show 20 Lines • Show All 357 Lines • Show Last 20 Lines |