Tidy up some debug outputs
This commit is contained in:
+4
-5
@@ -125,7 +125,6 @@ QStringList Database::getMarkedFiles()
|
|||||||
files << markedFiles.value("file").toString();
|
files << markedFiles.value("file").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << files.size();
|
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,7 +287,7 @@ bool Database::indexFile(const QFileInfo &file)
|
|||||||
m_insertFileWcs.bindValue(7, crVal2);
|
m_insertFileWcs.bindValue(7, crVal2);
|
||||||
if(!m_insertFileWcs.exec())
|
if(!m_insertFileWcs.exec())
|
||||||
{
|
{
|
||||||
qDebug() << m_insertFileWcs.lastError();
|
qDebug() << "Database error" << m_insertFileWcs.lastError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
last_id = m_insertFileWcs.lastInsertId().toLongLong();
|
last_id = m_insertFileWcs.lastInsertId().toLongLong();
|
||||||
@@ -299,7 +298,7 @@ bool Database::indexFile(const QFileInfo &file)
|
|||||||
m_insertFile.bindValue(1, mtime);
|
m_insertFile.bindValue(1, mtime);
|
||||||
if(!m_insertFile.exec())
|
if(!m_insertFile.exec())
|
||||||
{
|
{
|
||||||
qDebug() << m_insertFile.lastError();
|
qDebug() << "Database error" << m_insertFile.lastError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
last_id = m_insertFile.lastInsertId().toLongLong();
|
last_id = m_insertFile.lastInsertId().toLongLong();
|
||||||
@@ -319,10 +318,10 @@ bool Database::indexFile(const QFileInfo &file)
|
|||||||
m_insertFitsHeader.bindValue(3, comments);
|
m_insertFitsHeader.bindValue(3, comments);
|
||||||
if(!m_insertFitsHeader.execBatch())
|
if(!m_insertFitsHeader.execBatch())
|
||||||
{
|
{
|
||||||
qDebug() << m_insertFitsHeader.lastError();
|
qDebug() << "Database error" << m_insertFitsHeader.lastError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << filePath << last_id;
|
qDebug() << "Indexed" << filePath << last_id;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -20,7 +20,7 @@ double RA(const QString &ra)
|
|||||||
double h = match.captured(1).toDouble();
|
double h = match.captured(1).toDouble();
|
||||||
double m = match.captured(2).toDouble();
|
double m = match.captured(2).toDouble();
|
||||||
double s = match.captured(3).toDouble();
|
double s = match.captured(3).toDouble();
|
||||||
qDebug() << match.capturedTexts() << h << m << s;
|
qDebug() << "RA" << match.capturedTexts() << h << m << s;
|
||||||
return h*15 + m*0.25 + s*15/3600;
|
return h*15 + m*0.25 + s*15/3600;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ double DEC(const QString &dec)
|
|||||||
double d = match.captured(2).toDouble();
|
double d = match.captured(2).toDouble();
|
||||||
double m = match.captured(3).toDouble();
|
double m = match.captured(3).toDouble();
|
||||||
double s = match.captured(4).toDouble();
|
double s = match.captured(4).toDouble();
|
||||||
qDebug() << match.capturedTexts() << sign << d << m << s;
|
qDebug() << "DEC" << match.capturedTexts() << sign << d << m << s;
|
||||||
return sign * (d + m/60 + s/3600);
|
return sign * (d + m/60 + s/3600);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ void FITSFileModel::prepareQuery()
|
|||||||
}
|
}
|
||||||
std::cout << sql.toStdString() << std::endl;
|
std::cout << sql.toStdString() << std::endl;
|
||||||
if(lastError().type() != QSqlError::NoError)
|
if(lastError().type() != QSqlError::NoError)
|
||||||
qDebug() << lastError();
|
qDebug() << "Database error" << lastError();
|
||||||
|
|
||||||
m_markedFiles = m_database->getMarkedFiles().toSet();
|
m_markedFiles = m_database->getMarkedFiles().toSet();
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-4
@@ -280,7 +280,7 @@ bool loadFITS(const QString path, ImageInfoData &info, RawImage **image)
|
|||||||
char err[100];
|
char err[100];
|
||||||
fits_get_errstatus(status, err);
|
fits_get_errstatus(status, err);
|
||||||
info.info.append({QObject::tr("Error"), QString(err)});
|
info.info.append({QObject::tr("Error"), QString(err)});
|
||||||
qDebug() << err;
|
qDebug() << "Failed to load FITS file" << err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -370,7 +370,7 @@ bool loadXISF(const QString &path, ImageInfoData &info, RawImage **image)
|
|||||||
catch (pcl::Error err)
|
catch (pcl::Error err)
|
||||||
{
|
{
|
||||||
info.info.append(QPair<QString, QString>("Error", err.FormatInfo().ToUTF8().c_str()));
|
info.info.append(QPair<QString, QString>("Error", err.FormatInfo().ToUTF8().c_str()));
|
||||||
qDebug() << err.FormatInfo().ToUTF8().c_str();
|
qDebug() << "Failed to load XISF" << err.FormatInfo().ToUTF8().c_str();
|
||||||
}
|
}
|
||||||
info.info.append({QObject::tr("Error"), QObject::tr("Unsupported sample format")});
|
info.info.append({QObject::tr("Error"), QObject::tr("Unsupported sample format")});
|
||||||
return false;
|
return false;
|
||||||
@@ -389,20 +389,22 @@ void LoadRunable::run()
|
|||||||
|
|
||||||
RawImage *rawImage = nullptr;
|
RawImage *rawImage = nullptr;
|
||||||
bool raw = false;
|
bool raw = false;
|
||||||
|
timer.start();
|
||||||
if(m_file.endsWith(".CR2", Qt::CaseInsensitive) || m_file.endsWith(".NEF", Qt::CaseInsensitive) || m_file.endsWith(".DNG", Qt::CaseInsensitive))
|
if(m_file.endsWith(".CR2", Qt::CaseInsensitive) || m_file.endsWith(".NEF", Qt::CaseInsensitive) || m_file.endsWith(".DNG", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
timer.start();
|
|
||||||
loadRAW(m_file, info, &rawImage);
|
loadRAW(m_file, info, &rawImage);
|
||||||
raw = true;
|
raw = true;
|
||||||
qDebug() << "LoadRaw" << timer.elapsed();
|
qDebug() << "LoadRAW" << timer.elapsed();
|
||||||
}
|
}
|
||||||
else if(m_file.endsWith(".FIT", Qt::CaseInsensitive) || m_file.endsWith(".FITS", Qt::CaseInsensitive))
|
else if(m_file.endsWith(".FIT", Qt::CaseInsensitive) || m_file.endsWith(".FITS", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
loadFITS(m_file, info, &rawImage);
|
loadFITS(m_file, info, &rawImage);
|
||||||
|
qDebug() << "LoadFITS" << timer.elapsed();
|
||||||
}
|
}
|
||||||
else if(m_file.endsWith(".XISF", Qt::CaseInsensitive))
|
else if(m_file.endsWith(".XISF", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
loadXISF(m_file, info, &rawImage);
|
loadXISF(m_file, info, &rawImage);
|
||||||
|
qDebug() << "LoadXISF" << timer.elapsed();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -376,7 +376,6 @@ void MainWindow::copyOrMove(bool copy, const QString &dest)
|
|||||||
QMessageBox::StandardButton button = QMessageBox::warning(this, t,
|
QMessageBox::StandardButton button = QMessageBox::warning(this, t,
|
||||||
m.arg(srcFile.fileName()).arg(dir.absolutePath()),
|
m.arg(srcFile.fileName()).arg(dir.absolutePath()),
|
||||||
QMessageBox::Ignore | QMessageBox::Abort);
|
QMessageBox::Ignore | QMessageBox::Abort);
|
||||||
qDebug() << button;
|
|
||||||
if(button == QMessageBox::Abort)return;
|
if(button == QMessageBox::Abort)return;
|
||||||
}
|
}
|
||||||
progress.setValue(i++);
|
progress.setValue(i++);
|
||||||
|
|||||||
Reference in New Issue
Block a user