diff --git a/Libs/DICOM/Core/ctkDICOMDatabase.cpp b/Libs/DICOM/Core/ctkDICOMDatabase.cpp index 70cf79c938..cd54b77858 100644 --- a/Libs/DICOM/Core/ctkDICOMDatabase.cpp +++ b/Libs/DICOM/Core/ctkDICOMDatabase.cpp @@ -159,16 +159,6 @@ bool ctkDICOMDatabasePrivate::loggedExec(QSqlQuery& query, const QString& queryS { success = query.exec(); } - if (!success) - { - QSqlError sqlError = query.lastError(); - logger.debug("SQL failed\n Bad SQL: " + query.lastQuery()); - logger.debug("Error text: " + sqlError.text()); - } - else - { - logger.debug("SQL worked!\n SQL: " + query.lastQuery()); - } return (success); } @@ -177,16 +167,6 @@ bool ctkDICOMDatabasePrivate::loggedExecBatch(QSqlQuery& query) { bool success; success = query.execBatch(); - if (!success) - { - QSqlError sqlError = query.lastError(); - logger.debug( "SQL failed\n Bad SQL: " + query.lastQuery()); - logger.debug( "Error text: " + sqlError.text()); - } - else - { - logger.debug("SQL worked!\n SQL: " + query.lastQuery()); - } return (success); } @@ -280,7 +260,6 @@ bool ctkDICOMDatabasePrivate::executeScript(const QString script) { if (! (*it).startsWith("--") ) { - logger.debug(*it + "\n"); query.exec(*it); if (query.lastError().type()) { @@ -834,8 +813,6 @@ void ctkDICOMDatabasePrivate::insert(const ctkDICOMItem& dataset, const QString& QString sopInstanceUID(dataset.GetElementAsString(DCM_SOPInstanceUID)); // Check to see if the file has already been loaded - logger.debug("inserting filePath: " + filePath); - // Check if the file has been already indexed and skip indexing if it is bool datasetInDatabase = false; bool datasetUpToDate = false; @@ -851,13 +828,11 @@ void ctkDICOMDatabasePrivate::insert(const ctkDICOMItem& dataset, const QString& { if (datasetUpToDate) { - logger.debug("File " + databaseFilename + " already added"); return; } // File is updated, delete record and re-index if (!this->removeImage(sopInstanceUID)) { - logger.debug("File " + filePath + " cannot be added, failed to update existing values in the database"); return; } } @@ -884,7 +859,6 @@ void ctkDICOMDatabasePrivate::insert(const ctkDICOMItem& dataset, const QString& bool databaseWasChanged = this->insertPatientStudySeries(dataset, patientID, patientsName); if (!sopInstanceUID.isEmpty() && !seriesInstanceUID.isEmpty() && !storedFilePath.isEmpty()) { - logger.debug("Maybe add Instance"); bool alreadyInserted = false; if (!storeFile) { @@ -933,7 +907,6 @@ void ctkDICOMDatabasePrivate::insert(const ctkDICOMItem& dataset, const QString& // let users of this class track when things happen emit q->instanceAdded(sopInstanceUID); - logger.debug("Instance Added"); databaseWasChanged = true; } if (generateThumbnail) @@ -2373,12 +2346,9 @@ void ctkDICOMDatabase::insert( const QString& filePath, bool storeFile, bool gen /// first we check if the file is already in the database if (fileExistsAndUpToDate(filePath)) { - logger.debug( "File " + filePath + " already added."); return; } - logger.debug( "Processing " + filePath ); - ctkDICOMItem dataset; dataset.InitializeFromFile(filePath); @@ -2517,7 +2487,6 @@ void ctkDICOMDatabase::insert(const QList& ind insertImageStatement.addBindValue(QDateTime::currentDateTime()); insertImageStatement.exec(); emit instanceAdded(sopInstanceUID); - logger.debug( "Instance Added" ); databaseWasChanged = true; if (generateThumbnail) @@ -2737,7 +2706,6 @@ void ctkDICOMDatabase::insert(QList> jobR (!storedFilePath.isEmpty() || !url.isEmpty())) { - logger.debug( "Maybe add Instance" ); bool alreadyInserted = false; if (!storeFile) { @@ -2785,7 +2753,6 @@ void ctkDICOMDatabase::insert(QList> jobR // let users of this class track when things happen emit instanceAdded(sopInstanceUID); - logger.debug( "Instance Added" ); databaseWasChanged = true; } if (generateThumbnail) @@ -2971,7 +2938,6 @@ bool ctkDICOMDatabase::removeSeries(const QString& seriesInstanceUID, bool clear { if (file.remove()) { - logger.debug("Removed file " + absPath); QString fileFolder = QFileInfo(absPath).absoluteDir().path(); if (foldersToRemove.isEmpty() || foldersToRemove.last() != fileFolder) {