Commit 30200a85 authored by Karl Ove Hufthammer's avatar Karl Ove Hufthammer

Correctly parse the ‘created’ and ‘last updated’ dates

The ‘created’ date was set to the ‘last updated’ date,
and the ‘last updated’ date was never set.
parent f099c491
......@@ -275,9 +275,9 @@ void DlgBundleManager::itemSelected(QListWidgetItem *current, QListWidgetItem *)
m_ui->lblCreated->setText(QDate::fromString(bundle->getMeta("created"), "dd/MM/yyyy").toString());
}
if (QDateTime::fromString(bundle->getMeta("updated"), Qt::ISODate).isValid()) {
m_ui->lblCreated->setText(QDateTime::fromString(bundle->getMeta("updated"), Qt::ISODate).toString());
m_ui->lblUpdated->setText(QDateTime::fromString(bundle->getMeta("updated"), Qt::ISODate).toString());
} else {
m_ui->lblCreated->setText(QDate::fromString(bundle->getMeta("updated"), "dd/MM/yyyy").toString());
m_ui->lblUpdated->setText(QDate::fromString(bundle->getMeta("updated"), "dd/MM/yyyy").toString());
}
m_ui->lblPreview->setPixmap(QPixmap::fromImage(bundle->image().scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation)));
m_ui->listBundleContents->clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment