From a0a3c6ec1507c86d49d7851b54d781321e3d4ef6 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Fri, 24 Apr 2015 14:19:41 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/simplewidgets.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index fbb613f32..2b8605a69 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -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(), ×tamp); - 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(), ×tamp); + 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"); -- cgit v1.2.3-70-g09d2