[Kst] kdeextragear-2/kst/kst/datasources
George Staikos
staikos at kde.org
Wed Dec 1 18:21:50 CET 2004
CVS commit by staikos:
indirect files no longer have to end in .cur, adjust ascii to return a weaker
match percentage if it also looks like an indirect file.
FEATURE: 94197
M +1 -1 ascii/ascii.cpp 1.28
M +5 -3 indirect/indirect.cpp 1.12
--- kdeextragear-2/kst/kst/datasources/ascii/ascii.cpp #1.27:1.28
@@ -364,5 +364,5 @@ int understands_ascii(KConfig *cfg, cons
} else if (QRegExp("^[\\s]*(([Nn][Aa][Nn]|(\\-\\+)?[Ii][Nn][Ff]|[0-9\\+\\-\\.eE]+)[\\s]*)+").exactMatch(s)) {
// a number - this may be an ascii file - assume that it is
- return 75;
+ return QFile::exists(s.stripWhiteSpace()) ? 49 : 75;
} else {
return 20;
--- kdeextragear-2/kst/kst/datasources/indirect/indirect.cpp #1.11:1.12
@@ -131,6 +131,8 @@ QStringList provides_indirect() {
int understands_indirect(KConfig*, const QString& filename) {
- if (!filename.endsWith(".cur")) { // Do we really have to do this?
- return 0;
+ int percent = 50;
+
+ if (filename.endsWith(".cur")) { // Do we really have to do this?
+ percent = 100;
}
@@ -145,5 +147,5 @@ int understands_indirect(KConfig*, const
}
- return QFile::exists(ifn.stripWhiteSpace()) ? 100 : 0;
+ return QFile::exists(ifn.stripWhiteSpace()) ? percent : 0;
}
More information about the Kst
mailing list