diff options
| author | Peter Penz <[email protected]> | 2009-12-04 00:18:24 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-12-04 00:18:24 +0000 |
| commit | 521f826ad9fdbe791ab4bdbb962dbfe116e8c938 (patch) | |
| tree | e6b4ca5f362f43340696efdbf3befa839d52413d /src | |
| parent | 9337b232b89f1221b7e12a25ffd877fec210719a (diff) | |
Minor adjustments for searching: at least searching for tags works now again :-)
svn path=/trunk/KDE/kdebase/apps/; revision=1058137
Diffstat (limited to 'src')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 4 | ||||
| -rw-r--r-- | src/search/searchcriterionselector.cpp | 8 | ||||
| -rw-r--r-- | src/search/searchcriterionvalue.cpp | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 507becabd..1dcb381dd 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -61,8 +61,8 @@ DolphinSearchCompleter::DolphinSearchCompleter(KLineEdit* linedit) : foreach (const Nepomuk::Tag& tag, tags) { const QString tagText = tag.label(); addCompletionItem(tagText, - "tag:\"" + tagText + '\"', - i18nc("Tag as in Nepomuk::Tag", "Tag"), + "hasTag:\"" + tagText + '\"', + i18nc("Tag as in Nepomuk::Tag", "Tag"), // TODO: change to "hasTag" after msg freeze QString(), KIcon("mail-tagged")); } diff --git a/src/search/searchcriterionselector.cpp b/src/search/searchcriterionselector.cpp index ab447bb83..f9c122d46 100644 --- a/src/search/searchcriterionselector.cpp +++ b/src/search/searchcriterionselector.cpp @@ -210,12 +210,16 @@ void SearchCriterionSelector::createDescriptions() QList<SearchCriterionDescription::Comparator> tagComps; tagComps.append(SearchCriterionDescription::Comparator(i18nc("@label All (tags)", "All"))); tagComps.append(SearchCriterionDescription::Comparator(i18nc("@label", "Equal to"), Nepomuk::Query::ComparisonTerm::Equal)); - tagComps.append(SearchCriterionDescription::Comparator(i18nc("@label", "Not Equal to"), Nepomuk::Query::ComparisonTerm::Equal)); // TODO + // It is unclear yet how to express != for tags with the new Nepomuk query API. Disable it for KDE 4.4, + // but leave the translation string there to be able to enable this functionality for KDE 4.4.x: + const QString dummy = i18nc("@label", "Not Equal to"); + Q_UNUSED(dummy); + //tagComps.append(SearchCriterionDescription::Comparator(i18nc("@label", "Not Equal to"), Nepomuk::Query::ComparisonTerm::Equal)); // TODO TagValue* tagValue = new TagValue(this); tagValue->hide(); SearchCriterionDescription tag(i18nc("@label", "Tag:"), - Soprano::Vocabulary::NAO::Tag(), + Soprano::Vocabulary::NAO::hasTag(), tagComps, tagValue); Q_ASSERT(static_cast<int>(SearchCriterionSelector::Tag) == 2); diff --git a/src/search/searchcriterionvalue.cpp b/src/search/searchcriterionvalue.cpp index eda297b83..065100e4e 100644 --- a/src/search/searchcriterionvalue.cpp +++ b/src/search/searchcriterionvalue.cpp @@ -67,7 +67,8 @@ DateValue::~DateValue() Nepomuk::Query::LiteralTerm DateValue::value() const { - return Nepomuk::Query::LiteralTerm(m_dateWidget->date()); + const QDateTime dateTime(m_dateWidget->date()); + return Nepomuk::Query::LiteralTerm(dateTime); } void DateValue::initializeValue(const QString& valueType) |
