From 4c99efe4d2d0b4558a563732d13bccf26f9e922f Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Wed, 26 Jun 2013 00:26:45 +0530 Subject: [PATCH] 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 --- src/search/dolphinfacetswidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index de715d78fd..d786117c91 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(),