Changeset View
Changeset View
Standalone View
Standalone View
src/provider/core/provider.cpp
Show First 20 Lines • Show All 332 Lines • ▼ Show 20 Line(s) | |||||
333 | } | 333 | } | ||
334 | 334 | | |||
335 | bool ProviderPrivate::selectSurvey(const SurveyInfo &survey) const | 335 | bool ProviderPrivate::selectSurvey(const SurveyInfo &survey) const | ||
336 | { | 336 | { | ||
337 | qCDebug(Log) << "got survey:" << survey.url() << survey.target(); | 337 | qCDebug(Log) << "got survey:" << survey.url() << survey.target(); | ||
338 | if (!q->isEnabled() || !survey.isValid() || completedSurveys.contains(survey.uuid().toString())) | 338 | if (!q->isEnabled() || !survey.isValid() || completedSurveys.contains(survey.uuid().toString())) | ||
339 | return false; | 339 | return false; | ||
340 | 340 | | |||
341 | if (lastSurveyTime.addDays(surveyInterval) > QDateTime::currentDateTime()) | 341 | if (surveyInterval != 0 && lastSurveyTime.addDays(surveyInterval) > QDateTime::currentDateTime()) | ||
342 | return false; | 342 | return false; | ||
343 | 343 | | |||
344 | if (!survey.target().isEmpty()) { | 344 | if (!survey.target().isEmpty()) { | ||
345 | SurveyTargetExpressionParser parser; | 345 | SurveyTargetExpressionParser parser; | ||
346 | if (!parser.parse(survey.target())) { | 346 | if (!parser.parse(survey.target())) { | ||
347 | qCDebug(Log) << "failed to parse target expression"; | 347 | qCDebug(Log) << "failed to parse target expression"; | ||
348 | return false; | 348 | return false; | ||
349 | } | 349 | } | ||
▲ Show 20 Lines • Show All 391 Lines • Show Last 20 Lines |