| Summary: | Lowercase for RegExp Scoring | ||
|---|---|---|---|
| Product: | [Unmaintained] knode | Reporter: | philipp |
| Component: | general | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 0.6 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Solaris | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
philipp
2001-08-30 17:49:55 UTC
The last update to this bug report was over 1 year ago. Can you please give us an updated on whether this is still a problem for you with a more recent version of knode? Sorry I do not use "Scoring" so I do not know how to test this feature. If it is not a problem - the status of this bug report will be changed to closed. Can somebody with more knowledge in RegExp have a look if this is still valid? CVS commit by vkrause:
Add case sensitive regexp matching.
FEATURE: 31862
M +10 -0 kscoring.cpp 1.52
M +2 -2 kscoring.h 1.28
M +1 -0 kscoringeditor.cpp 1.46
--- kdepim/libkdepim/kscoring.cpp #1.51:1.52
@@ -371,4 +371,9 @@ KScoringExpression::KScoringExpression(c
expr.setCaseSensitive(false);
}
+ else if ( t == "MATCHCS" ) {
+ cond = MATCHCS;
+ expr.setPattern( expr_str );
+ expr.setCaseSensitive( true );
+ }
else if (t == "CONTAINS" ) cond = CONTAINS;
else if (t == "EQUALS" ) cond = EQUALS;
@@ -397,4 +402,5 @@ int KScoringExpression::getConditionForN
if (s == getNameForCondition(CONTAINS)) return CONTAINS;
else if (s == getNameForCondition(MATCH)) return MATCH;
+ else if (s == getNameForCondition(MATCHCS)) return MATCHCS;
else if (s == getNameForCondition(EQUALS)) return EQUALS;
else if (s == getNameForCondition(SMALLER)) return SMALLER;
@@ -413,4 +419,5 @@ QString KScoringExpression::getNameForCo
case CONTAINS: return i18n("Contains Substring");
case MATCH: return i18n("Matches Regular Expression");
+ case MATCHCS: return i18n("Matches Regular Expression (Case Sensitive)");
case EQUALS: return i18n("Is Exactly the Same As");
case SMALLER: return i18n("Less Than");
@@ -429,4 +436,5 @@ QStringList KScoringExpression::conditio
l << getNameForCondition(CONTAINS);
l << getNameForCondition(MATCH);
+ l << getNameForCondition(MATCHCS);
l << getNameForCondition(EQUALS);
l << getNameForCondition(SMALLER);
@@ -477,4 +485,5 @@ bool KScoringExpression::match(ScorableA
break;
case MATCH:
+ case MATCHCS:
res = (expr.search(head)!=-1);
break;
@@ -527,4 +536,5 @@ QString KScoringExpression::getTypeStrin
case CONTAINS: return "CONTAINS";
case MATCH: return "MATCH";
+ case MATCHCS: return "MATCHCS";
case EQUALS: return "EQUALS";
case SMALLER: return "SMALLER";
--- kdepim/libkdepim/kscoring.h #1.27:1.28
@@ -174,5 +174,5 @@ class KDE_EXPORT KScoringExpression
friend class KScoringRule;
public:
- enum Condition { CONTAINS, MATCH, EQUALS, SMALLER, GREATER };
+ enum Condition { CONTAINS, MATCH, EQUALS, SMALLER, GREATER, MATCHCS };
KScoringExpression(const QString&,const QString&,const QString&, const QString&);
--- kdepim/libkdepim/kscoringeditor.cpp #1.45:1.46
@@ -128,4 +128,5 @@ void SingleConditionWidget::toggleRegExp
{
bool isRegExp = KScoringExpression::MATCH == selected &&
+ KScoringExpression::MATCHCS == selected &&
!KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty();
regExpButton->setEnabled( isRegExp );
|