Commit 23a51334 authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Ensure resource bundle date is decoded appropriately.

parent 7fb30201
...@@ -269,13 +269,13 @@ void DlgBundleManager::itemSelected(QListWidgetItem *current, QListWidgetItem *) ...@@ -269,13 +269,13 @@ void DlgBundleManager::itemSelected(QListWidgetItem *current, QListWidgetItem *)
m_ui->lblWebsite->setText(metrics.elidedText(bundle->getMeta("website"), Qt::ElideRight, m_ui->lblWebsite->width())); m_ui->lblWebsite->setText(metrics.elidedText(bundle->getMeta("website"), Qt::ElideRight, m_ui->lblWebsite->width()));
m_ui->lblWebsite->setToolTip(bundle->getMeta("website")); m_ui->lblWebsite->setToolTip(bundle->getMeta("website"));
m_ui->lblDescription->setPlainText(bundle->getMeta("description")); m_ui->lblDescription->setPlainText(bundle->getMeta("description"));
if (QDateTime::fromString(bundle->getMeta("created")).isValid()) { if (QDateTime::fromString(bundle->getMeta("created"), Qt::ISODate).isValid()) {
m_ui->lblCreated->setText(QDateTime::fromString(bundle->getMeta("created")).toString()); m_ui->lblCreated->setText(QDateTime::fromString(bundle->getMeta("created"), Qt::ISODate).toString());
} else { } else {
m_ui->lblCreated->setText(QDate::fromString(bundle->getMeta("created"), "dd/MM/yyyy").toString()); m_ui->lblCreated->setText(QDate::fromString(bundle->getMeta("created"), "dd/MM/yyyy").toString());
} }
if (QDateTime::fromString(bundle->getMeta("updated")).isValid()) { if (QDateTime::fromString(bundle->getMeta("updated"), Qt::ISODate).isValid()) {
m_ui->lblCreated->setText(QDateTime::fromString(bundle->getMeta("updated")).toString()); m_ui->lblCreated->setText(QDateTime::fromString(bundle->getMeta("updated"), Qt::ISODate).toString());
} else { } else {
m_ui->lblCreated->setText(QDate::fromString(bundle->getMeta("updated"), "dd/MM/yyyy").toString()); m_ui->lblCreated->setText(QDate::fromString(bundle->getMeta("updated"), "dd/MM/yyyy").toString());
} }
......
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