mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
c97e136435
commit
a0a3c6ec15
4 changed files with 39 additions and 45 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue