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

George Staikos staikos at kde.org
Fri Feb 23 00:04:08 CET 2007


SVN commit 636388 by staikos:

a bit of work done on indirect and comment out uncompilable sources for now


 M  +3 -3      CMakeLists.txt  
 M  +2 -18     indirect/CMakeLists.txt  
 M  +12 -17    indirect/indirect.cpp  


--- branches/work/kst/portto4/kst/src/datasources/CMakeLists.txt #636387:636388
@@ -1,10 +1,10 @@
 
-add_subdirectory( ascii )
+#add_subdirectory( ascii )
 add_subdirectory( qimagesource )
 add_subdirectory( dirfile )
 add_subdirectory( frame )
-add_subdirectory( indirect )
-add_subdirectory( scuba2 )
+#add_subdirectory( indirect )
+#add_subdirectory( scuba2 )
 
 message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(PIOLIB_SUBDIR)")
 message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(CDF_SUBDIR)")
--- branches/work/kst/portto4/kst/src/datasources/indirect/CMakeLists.txt #636387:636388
@@ -1,5 +1,5 @@
 
-include_directories( ${CMAKE_SOURCE_DIR}/kst/src/libkst ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
+include_directories( ${CMAKE_SOURCE_DIR}/src/libkst ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
 
 
 ########### next target ###############
@@ -10,7 +10,7 @@
 
 kde4_add_plugin(kstdata_indirect ${kstdata_indirect_PART_SRCS})
 
-target_link_libraries(kstdata_indirect  ${KDE4_KDECORE_LIBS} )
+target_link_libraries(kstdata_indirect  ${KDE4_KDECORE_LIBS} kst)
 
 install(TARGETS kstdata_indirect DESTINATION ${PLUGIN_INSTALL_DIR} )
 
@@ -19,19 +19,3 @@
 
 install( FILES  kstdata_indirect.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kst )
 
-
-
-#original Makefile.am contents follow:
-
-#INCLUDES=-I$(top_srcdir)/kst/src/libkst -I$(srcdir)/../../extdate $(all_includes)
-#
-#kde_module_LTLIBRARIES=kstdata_indirect.la
-#
-#kstdata_indirect_la_LDFLAGS=$(all_libraries) -module -avoid-version
-#kstdata_indirect_la_SOURCES=indirect.cpp
-#
-#METASOURCES=AUTO
-#
-#services_DATA=kstdata_indirect.desktop
-#servicesdir=$(kde_servicesdir)/kst
-#
--- branches/work/kst/portto4/kst/src/datasources/indirect/indirect.cpp #636387:636388
@@ -47,7 +47,7 @@
 
   // recheck the indirect file for a changed filename
   QFile f(_filename);
-  if (f.open(IO_ReadOnly)) {
+  if (f.open(QIODevice::ReadOnly)) {
     QString ifn;
     if (0 < f.readLine(ifn, 1000)) {
       KURL url = KURL::fromPathOrURL(ifn);
@@ -57,9 +57,9 @@
         }
       }
 
-      if (!_child || ifn.stripWhiteSpace() != _child->fileName()) {
+      if (!_child || ifn.trimmed() != _child->fileName()) {
         _child = 0L; // release
-        KstDataSourcePtr p = KstDataSource::loadSource(ifn.stripWhiteSpace());
+        KstDataSourcePtr p = KstDataSource::loadSource(ifn.trimmed());
         if (p) {
           _child = p;
           _fieldList = p->fieldList();
@@ -105,7 +105,7 @@
 }
 
 
-void IndirectSource::save(QTextStream &ts, const QString& indent) {
+void IndirectSource::save(Q3TextStream &ts, const QString& indent) {
   KstDataSource::save(ts, indent);
 }
 
@@ -127,7 +127,7 @@
   }
 
   QFile f(filename);
-  if (!f.open(IO_ReadOnly)) {
+  if (!f.open(QIODevice::ReadOnly)) {
     return 0L;
   }
 
@@ -143,7 +143,7 @@
     }
   }
 
-  KstDataSourcePtr p = KstDataSource::loadSource(ifn.stripWhiteSpace());
+  KstDataSourcePtr p = KstDataSource::loadSource(ifn.trimmed());
   f.close();
 
   return new IndirectSource(cfg, filename, p);
@@ -165,7 +165,7 @@
   }
 
   QFile f(filename);
-  if (!f.open(IO_ReadOnly)) {
+  if (!f.open(QIODevice::ReadOnly)) {
     return 0;
   }
 
@@ -174,19 +174,14 @@
     return 0;
   }
 
-  KURL url = KURL::fromPathOrURL(ifn.stripWhiteSpace());
+  KURL url = KURL::fromPathOrURL(ifn.trimmed());
   if (url.isLocalFile() || url.protocol().isEmpty()) {
     if (QFileInfo(ifn).isRelative()) {
       ifn = QFileInfo(filename).dirPath(true) + QDir::separator() + ifn;
     }
-    return QFile::exists(ifn.stripWhiteSpace()) ? percent : 0;
-  } else {
-#if KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
-    return KIO::NetAccess::exists(url, true, 0L) ? percent : 0;
-#else
-    return KIO::NetAccess::exists(url, true) ? percent : 0;
-#endif
+    return QFile::exists(ifn.trimmed()) ? percent : 0;
   }
+  return KIO::NetAccess::exists(url, true, 0L) ? percent : 0;
 }
 
 
@@ -196,7 +191,7 @@
   }
 
   QFile f(filename);
-  if (!f.open(IO_ReadOnly)) {
+  if (!f.open(QIODevice::ReadOnly)) {
     return QStringList();
   }
 
@@ -212,7 +207,7 @@
     }
   }
 
-  return KstDataSource::fieldListForSource(ifn.stripWhiteSpace(), type, typeSuggestion, complete);
+  return KstDataSource::fieldListForSource(ifn.trimmed(), type, typeSuggestion, complete);
 }
 
 }


More information about the Kst mailing list