[Kst] [Bug 94197] Indirect file datasources require a .cur extension for kst to make sense of them.

George Staikos staikos at kde.org
Wed Dec 1 18:21:57 CET 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=94197        
staikos kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From staikos kde org  2004-12-01 18:21 -------
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