Changeset View
Changeset View
Standalone View
Standalone View
src/provider/core/provider.h
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Line(s) | 120 | #endif | |||
---|---|---|---|---|---|
177 | */ | 177 | */ | ||
178 | void addDataSource(AbstractDataSource *source); | 178 | void addDataSource(AbstractDataSource *source); | ||
179 | 179 | | |||
180 | /*! Returns all data sources that have been added to this provider. | 180 | /*! Returns all data sources that have been added to this provider. | ||
181 | * @see addDataSource | 181 | * @see addDataSource | ||
182 | */ | 182 | */ | ||
183 | QVector<AbstractDataSource*> dataSources() const; | 183 | QVector<AbstractDataSource*> dataSources() const; | ||
184 | 184 | | |||
185 | /*! Returns a data source with matched @p id | ||||
186 | * @param id data source unique identifier | ||||
187 | * @return pointer to found data source or nullptr if data source is not found | ||||
188 | */ | ||||
189 | AbstractDataSource *dataSource(const QString &id) const; | ||||
vkrause: I think the more Qt-like API would be to not use the "find" prefix and just call this… | |||||
Well, we have actually both styles. But I agree, that for this case omitting prefix is better choice. vitalyf: Well, we have actually both styles. But I agree, that for this case omitting prefix is better… | |||||
190 | | ||||
185 | /*! Returns the minimum time between two surveys in days. | 191 | /*! Returns the minimum time between two surveys in days. | ||
186 | * The default is -1 (no surveys enabled). | 192 | * The default is -1 (no surveys enabled). | ||
187 | */ | 193 | */ | ||
188 | int surveyInterval() const; | 194 | int surveyInterval() const; | ||
189 | 195 | | |||
190 | /*! Sets the minimum time in days between two surveys. | 196 | /*! Sets the minimum time in days between two surveys. | ||
191 | * @c -1 indicates no surveys should be requested. | 197 | * @c -1 indicates no surveys should be requested. | ||
192 | */ | 198 | */ | ||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |
I think the more Qt-like API would be to not use the "find" prefix and just call this dataSource(const QString &id)?