瀏覽代碼

Added new record behavior to QtTesting.

You can choose to flush the data after each action.
You can ask the file after or before the recording.

Modify the ctkXMLEventObserver to support the continuous flush.
Benjamin Long 13 年之前
父節點
當前提交
d4ee01baca
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 1 1
      CMakeExternals/QtTesting.cmake
  2. 6 0
      Libs/QtTesting/ctkXMLEventObserver.cpp

+ 1 - 1
CMakeExternals/QtTesting.cmake

@@ -23,7 +23,7 @@ if(CTK_USE_QTTESTING)
 
     if(NOT DEFINED QtTesting_DIR)
 
-      set(revision_tag ca08897251254b8f88b40c0ed9d57dfa3454a063)
+      set(revision_tag dac049b06724862583f6b64b2b038c0726bd2ba0)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()

+ 6 - 0
Libs/QtTesting/ctkXMLEventObserver.cpp

@@ -146,5 +146,11 @@ void ctkXMLEventObserver::onRecordEvent(const QString& widget,
     this->XMLStream->writeAttribute("command", command);
     this->XMLStream->writeAttribute("arguments", arguments);
     this->XMLStream->writeEndElement();
+    if (this->Stream)
+      {
+      *this->Stream << this->XMLString;
+      }
+    this->XMLString = QString();
+    emit this->eventRecorded(widget, command, arguments);
     }
 }