소스 검색

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);
     }
 }