Cleaning up variable names in image loading

Use more explicit variabel names and make the get timestamp function actually
return the timestamp rather than getting a pointer argument

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2015-04-24 14:19:41 +02:00 committed by Dirk Hohndel
parent c97e136435
commit a0a3c6ec15
4 changed files with 39 additions and 45 deletions

View file

@ -272,7 +272,6 @@ void ShiftImageTimesDialog::buttonClicked(QAbstractButton *button)
void ShiftImageTimesDialog::syncCameraClicked()
{
timestamp_t timestamp;
QPixmap picture;
QDateTime dcDateTime = QDateTime();
QStringList fileNames = QFileDialog::getOpenFileNames(this,
@ -289,8 +288,7 @@ void ShiftImageTimesDialog::syncCameraClicked()
scene->addPixmap(picture.scaled(ui.DCImage->size()));
ui.DCImage->setScene(scene);
picture_get_timestamp(fileNames.at(0).toUtf8().data(), &timestamp);
dcImageEpoch = timestamp;
dcImageEpoch = picture_get_timestamp(fileNames.at(0).toUtf8().data());
dcDateTime.setTime_t(dcImageEpoch);
ui.dcTime->setDateTime(dcDateTime);
connect(ui.dcTime, SIGNAL(dateTimeChanged(const QDateTime &)), this, SLOT(dcDateTimeChanged(const QDateTime &)));
@ -342,7 +340,7 @@ void ShiftImageTimesDialog::updateInvalid()
continue;
// We've found invalid image
picture_get_timestamp(fileName.toUtf8().data(), &timestamp);
timestamp = picture_get_timestamp(fileName.toUtf8().data());
dcImageEpoch = timestamp;
time.setTime_t(timestamp + m_amount);
ui.invalidLabel->setText(ui.invalidLabel->text() + fileName + " " + time.toString() + "\n");