소스 검색

Restore API for waitForImportFinished but mark as deprecated

Since the threaded indexing implementation was removed, this is
no longer needed.  However removing it changes the API and this
can break code that depends on the method being available.
Steve Pieper 12 년 전
부모
커밋
ac7cf1665a
2개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      Libs/DICOM/Core/Testing/Cpp/ctkDICOMIndexerTest1.cpp
  2. 8 0
      Libs/DICOM/Core/ctkDICOMIndexer.h

+ 3 - 0
Libs/DICOM/Core/Testing/Cpp/ctkDICOMIndexerTest1.cpp

@@ -54,5 +54,8 @@ int ctkDICOMIndexerTest1( int argc, char * argv [] )
   // make sure it doesn't crash
   indexer.refreshDatabase(database, QDir::tempPath());
 
+  // ensure all concurrent inserts are complete
+  indexer.waitForImportFinished();
+
   return EXIT_SUCCESS;
 }

+ 8 - 0
Libs/DICOM/Core/ctkDICOMIndexer.h

@@ -82,6 +82,14 @@ public:
 
   Q_INVOKABLE void refreshDatabase(ctkDICOMDatabase& database, const QString& directoryName);
 
+  ///
+  /// \brief Deprecated - no op.
+  /// \deprecated
+  /// Previously ensured that the QFuture threads have all finished indexing
+  /// before returning control.
+  ///
+  Q_INVOKABLE void waitForImportFinished();
+
 Q_SIGNALS:
   void foundFilesToIndex(int);
   void indexingFileNumber(int);