mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
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
This commit is contained in:
parent
aebe7a9010
commit
4c99efe4d2
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue