Changeset View
Changeset View
Standalone View
Standalone View
src/tools/balooctl/configcommand.cpp
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Line(s) | 249 | if (value.compare(QLatin1String("includeFolders"), Qt::CaseInsensitive) == 0) { | |||
---|---|---|---|---|---|
267 | QStringList folders = config.includeFolders(); | 267 | QStringList folders = config.includeFolders(); | ||
268 | if (folders.contains(path)) { | 268 | if (folders.contains(path)) { | ||
269 | out << i18n("%1 is already in the list of include folders", path) << endl; | 269 | out << i18n("%1 is already in the list of include folders", path) << endl; | ||
270 | return 1; | 270 | return 1; | ||
271 | } | 271 | } | ||
272 | 272 | | |||
273 | if (config.excludeFolders().contains(path)) { | 273 | if (config.excludeFolders().contains(path)) { | ||
274 | out << i18n("%1 is in the list of exclude folders", path) << endl; | 274 | out << i18n("%1 is in the list of exclude folders", path) << endl; | ||
275 | out << "Aborting" << endl; | 275 | return 1; | ||
276 | } | 276 | } | ||
277 | 277 | | |||
278 | folders.append(path); | 278 | folders.append(path); | ||
279 | config.setIncludeFolders(folders); | 279 | config.setIncludeFolders(folders); | ||
280 | 280 | | |||
281 | return 0; | 281 | return 0; | ||
282 | } | 282 | } | ||
283 | 283 | | |||
Show All 18 Lines | 284 | if (value.compare(QLatin1String("excludeFolders"), Qt::CaseInsensitive) == 0) { | |||
302 | QStringList folders = config.excludeFolders(); | 302 | QStringList folders = config.excludeFolders(); | ||
303 | if (folders.contains(path)) { | 303 | if (folders.contains(path)) { | ||
304 | out << i18n("%1 is already in the list of exclude folders", path) << endl; | 304 | out << i18n("%1 is already in the list of exclude folders", path) << endl; | ||
305 | return 1; | 305 | return 1; | ||
306 | } | 306 | } | ||
307 | 307 | | |||
308 | if (config.includeFolders().contains(path)) { | 308 | if (config.includeFolders().contains(path)) { | ||
309 | out << i18n("%1 is in the list of exclude folders", path) << endl; | 309 | out << i18n("%1 is in the list of exclude folders", path) << endl; | ||
310 | out << "Aborting" << endl; | 310 | return 1; | ||
311 | } | 311 | } | ||
312 | 312 | | |||
313 | folders.append(path); | 313 | folders.append(path); | ||
314 | config.setExcludeFolders(folders); | 314 | config.setExcludeFolders(folders); | ||
315 | 315 | | |||
316 | return 0; | 316 | return 0; | ||
317 | } | 317 | } | ||
318 | 318 | | |||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |