- else {
- // Search the text in the filename only
- QString regex = QRegExp::escape(text);
- regex.replace("\\*", QLatin1String(".*"));
- regex.replace("\\?", QLatin1String("."));
- regex.replace("\\", "\\\\");
- term = Nepomuk::Query::ComparisonTerm(
- Nepomuk::Vocabulary::NFO::fileName(),
- Nepomuk::Query::LiteralTerm(regex),
- Nepomuk::Query::ComparisonTerm::Regexp);
+
+ if (m_contentButton->isChecked()) {
+ queryStrings << text;
+ } else if (!text.isEmpty()) {
+ queryStrings << QStringLiteral("filename:\"%1\"").arg(text);