diff options
| author | Vishesh Handa <[email protected]> | 2013-06-26 00:26:45 +0530 |
|---|---|---|
| committer | Vishesh Handa <[email protected]> | 2013-06-26 01:32:33 +0530 |
| commit | 4c99efe4d2d0b4558a563732d13bccf26f9e922f (patch) | |
| tree | 12cb0bcead2e7ce4e07e8fbb668af318978ec628 /src/search | |
| parent | aebe7a9010926c4eb2c24e4e5af39e5f3c6a386b (diff) | |
Dolphin Search Date: Set the proper date
QDate's api is not that intuitive and the addDays functions return a
QDate with those amount of days. They do not modify the original QDate.
BUG: 321198
Diffstat (limited to 'src/search')
| -rw-r--r-- | src/search/dolphinfacetswidget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index de715d78f..d786117c9 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -175,13 +175,13 @@ Nepomuk2::Query::Term DolphinFacetsWidget::facetsTerm() const if (!m_anytime->isChecked()) { QDate date = QDate::currentDate(); // represents m_today if (m_yesterday->isChecked()) { - date.addDays(-1); + date = date.addDays(-1); } else if (m_thisWeek->isChecked()) { - date.addDays(1 - date.dayOfWeek()); + date = date.addDays(1 - date.dayOfWeek()); } else if (m_thisMonth->isChecked()) { - date.addDays(1 - date.day()); + date = date.addDays(1 - date.day()); } else if (m_thisYear->isChecked()) { - date.addDays(1 - date.dayOfYear()); + date = date.addDays(1 - date.dayOfYear()); } Nepomuk2::Query::ComparisonTerm term(Nepomuk2::Vocabulary::NIE::lastModified(), |
