[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Apr 5 21:07:55 CEST 2005


CVS commit by staikos: 

stdin is a special case


  M +5 -5      stdinsource.cpp   1.13


--- kdeextragear-2/kst/kst/stdinsource.cpp  #1.12:1.13
@@ -40,5 +40,6 @@ KstStdinSource::KstStdinSource(KConfig *
   _file = new KTempFile;
   _filename = _file->name();
-  update(); // FIXME
+  // Unfortunately we have to update here.  stdin is a special case.
+  update();
   _src = KstDataSource::loadSource(_filename, "ASCII");
   if (_src && _src->isValid()) {
@@ -98,9 +99,8 @@ KstObject::UpdateType KstStdinSource::up
   fflush(fp);
 
-  if (got_some) {
-    return setLastUpdateResult(_src ? _src->update(u) : KstObject::NO_CHANGE);
-  } else {
-    return setLastUpdateResult(KstObject::NO_CHANGE);
+  if (got_some && _src) {
+    return setLastUpdateResult(_src->update(u));
   }
+  return setLastUpdateResult(KstObject::NO_CHANGE);
 }
 




More information about the Kst mailing list