Просмотр исходного кода

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
Родитель
Сommit
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);
     }
 }