Skip to content
Snippets Groups Projects
Commit c342f25b authored by t.knopff's avatar t.knopff
Browse files

Fix warnings in JobPropertiesTableModel

parent 30b3a9a3
No related branches found
No related tags found
1 merge request!406Fix warnings
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "GUI/Views/JobWidgets/JobPropertiesTableModel.h" #include "GUI/Views/JobWidgets/JobPropertiesTableModel.h"
#include "GUI/Models/JobItem.h" #include "GUI/Models/JobItem.h"
#include <QLocale>
namespace { namespace {
namespace Column { namespace Column {
...@@ -86,11 +87,11 @@ QVariant JobPropertiesTableModel::data(const QModelIndex& index, int role) const ...@@ -86,11 +87,11 @@ QVariant JobPropertiesTableModel::data(const QModelIndex& index, int role) const
return jobStatusToString(m_item->getStatus()); return jobStatusToString(m_item->getStatus());
case Row::Begin: case Row::Begin:
if (role == Qt::ToolTipRole) if (role == Qt::ToolTipRole)
return m_item->beginTime().toString(Qt::DefaultLocaleLongDate); return QLocale().toString(m_item->beginTime(), QLocale::LongFormat);
return m_item->beginTime().toString(ModelDateShortFormat); return m_item->beginTime().toString(ModelDateShortFormat);
case Row::End: case Row::End:
if (role == Qt::ToolTipRole) if (role == Qt::ToolTipRole)
return m_item->endTime().toString(Qt::DefaultLocaleLongDate); return QLocale().toString(m_item->endTime(), QLocale::LongFormat);
return m_item->endTime().toString(ModelDateShortFormat); return m_item->endTime().toString(ModelDateShortFormat);
case Row::Duration: { case Row::Duration: {
std::optional<size_t> duration = m_item->duration(); std::optional<size_t> duration = m_item->duration();
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// ************************************************************************************************ // ************************************************************************************************
#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESTABLEMODEL_H #ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESTABLEMODEL_H
#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESTABLEMODE_H #define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESTABLEMODEL_H
#include <QAbstractTableModel> #include <QAbstractTableModel>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment