[Kst] branches/work/kst/portto4/kst/src/libkst

Peter Kümmel syntheticpp at gmx.net
Thu Apr 28 21:20:14 CEST 2011


SVN commit 1229654 by kuemmel:

No DataSource without existing file.
But why are all other curves gone when there is one invalid datasource?
CC: 271831

 M  +6 -2      datasourcepluginmanager.cpp  


--- branches/work/kst/portto4/kst/src/libkst/datasourcepluginmanager.cpp #1229653:1229654
@@ -321,16 +321,20 @@
 #endif
   QString fn = obtainFile(filename);
   if (fn.isEmpty()) {
-    return 0L;
+    return 0;
   }
 
+  if (!QFileInfo(fn).exists()) {
+    Debug::self()->log(QObject::tr("File '%1' does not exists.").arg(fn), Debug::Warning);
+    return 0;
+  }
+
   DataSourcePtr dataSource = findPluginFor(store, fn, type);
   if (dataSource) {
     store->addObject<DataSource>(dataSource);
   }
 
   return dataSource;
-
 }
 
 


More information about the Kst mailing list