ソースを参照

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