[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Feb 8 04:29:08 CET 2005


CVS commit by staikos: 

repair loading from relative paths


  M +8 -1      kstdatasource.cpp   1.54


--- kdeextragear-2/kst/kst/kstdatasource.cpp  #1.53:1.54
@@ -28,4 +28,5 @@
 #include <qdeepcopy.h>
 #include <qfile.h>
+#include <qfileinfo.h>
 #include <qstylesheet.h>
 
@@ -194,5 +195,11 @@ void KstDataSource::cleanupForExit() {
 
 static QString obtainFile(const QString& source) {
-  KURL url(source);
+  KURL url;
+  if (QFile::exists(source) && QFileInfo(source).isRelative()) {
+    url.setPath(source);
+  } else {
+    url = KURL::fromPathOrURL(source);
+  }
+
   if (url.isLocalFile()) {
     return source;




More information about the Kst mailing list