Ver código fonte

Style: put schema version in implementation not header

Also clean up some dangling whitespace.
Steve Pieper 13 anos atrás
pai
commit
f9e14edf8d

+ 9 - 4
Libs/DICOM/Core/ctkDICOMDatabase.cpp

@@ -432,6 +432,11 @@ QString ctkDICOMDatabase::schemaVersionLoaded()
   return QString("");
 }
 
+//------------------------------------------------------------------------------
+QString ctkDICOMDatabase::schemaVersion()
+{
+  return QString("0.5.1");
+};
 
 //------------------------------------------------------------------------------
 bool ctkDICOMDatabase::updateSchemaIfNeeded(const char* schemaFile)
@@ -449,16 +454,16 @@ bool ctkDICOMDatabase::updateSchema(const char* schemaFile)
   // backup filelist
   // reinit with the new schema
   // reinsert everything
- 
+
   Q_D(ctkDICOMDatabase);
   d->createBackupFileList();
- 
+
   d->resetLastInsertedValues();
   this->initializeDatabase(schemaFile);
 
   QStringList allFiles = d->filenames("Filenames_backup");
   emit schemaUpdateStarted(allFiles.length());
-  
+
   int progressValue = 0;
   foreach(QString file, allFiles)
   {
@@ -1024,7 +1029,7 @@ void ctkDICOMDatabasePrivate::insert( const ctkDICOMDataset& ctkDataset, const Q
   QString studyInstanceUID(ctkDataset.GetElementAsString(DCM_StudyInstanceUID) );
   QString seriesInstanceUID(ctkDataset.GetElementAsString(DCM_SeriesInstanceUID) );
   QString patientID(ctkDataset.GetElementAsString(DCM_PatientID) );
-  if ( patientID.isEmpty() && !studyInstanceUID.isEmpty() ) 	 
+  if ( patientID.isEmpty() && !studyInstanceUID.isEmpty() )
   { // Use study instance uid as patient id if patient id is empty - can happen on anonymized datasets
     // see: http://www.na-mic.org/Bug/view.php?id=2040
     logger.warn("Patient ID is empty, using studyInstanceUID as patient ID");

+ 1 - 1
Libs/DICOM/Core/ctkDICOMDatabase.h

@@ -119,7 +119,7 @@ public:
   Q_INVOKABLE bool updateSchemaIfNeeded(const char* schemaFile = ":/dicom/dicom-schema.sql");
 
   /// returns the schema version needed by the current version of this code
-  Q_INVOKABLE QString schemaVersion() { return QString("0.5"); };
+  Q_INVOKABLE QString schemaVersion();
 
   /// returns the schema version for the currently open database
   /// in order to support schema updating