Migrates ./Lts/Viewer successfully to Qt6
This commit is contained in:
28 files changed
+250
-129
No files matched your search
@@ -24,7 +24,7 @@ DataDelegate::DataDelegate(QObject *parent)
|
||||
|
||||
QString DataDelegate::displayText(const QVariant &value, const QLocale &locale) const
|
||||
{
|
||||
if (value.type() == QVariant::Type::DateTime)
|
||||
if (value.userType() == QMetaType::QDateTime)
|
||||
return DTG::toString(value.toDateTime());
|
||||
return QStyledItemDelegate::displayText(value, locale);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QDebug>
|
||||
#include <utility>
|
||||
|
||||
/// get the list of visual index as they are display
|
||||
namespace LtsDataView
|
||||
@@ -1233,7 +1234,7 @@ void LtsDataView::slotCsvExport() // TODO: maybe save to dds (office/filemanagem
|
||||
}
|
||||
}
|
||||
|
||||
for (const int logicalIndex : qAsConst(colsHeader))
|
||||
for (const int logicalIndex : std::as_const(colsHeader))
|
||||
colsList.append(m_columnFilterProxy->headerData(logicalIndex, Qt::Horizontal).toString());
|
||||
|
||||
//qCritical() << "slotCsvExport: header colsList = " << colsList;
|
||||
@@ -1253,7 +1254,7 @@ void LtsDataView::slotCsvExport() // TODO: maybe save to dds (office/filemanagem
|
||||
for (int row = 0; row < rows; ++row)
|
||||
{
|
||||
colsList.clear();
|
||||
for (const int logicalIndex : qAsConst(colsHeader))
|
||||
for (const int logicalIndex : std::as_const(colsHeader))
|
||||
colsList.append(m_columnFilterProxy->data(m_columnFilterProxy->index(row, logicalIndex)).toString());
|
||||
// for (int col = 0; col < cols; col++)
|
||||
// if (m_ui->stackedWidget->currentIndex() != TABLE || !m_ui->tableView->isColumnHidden(col))
|
||||
|
||||
@@ -51,7 +51,7 @@ QVariant SearchModel::data(const QModelIndex &index, int role) const
|
||||
return m_displayData.value(index.column());
|
||||
case Qt::EditRole: // Editor Text
|
||||
return m_columnFilters.value(index.column());
|
||||
case Qt::TextColorRole: // Text-Color
|
||||
case Qt::ForegroundRole: // Text-Color
|
||||
if (!m_columnFilters.contains(index.column()))
|
||||
return QGuiApplication::palette().color(QPalette::Disabled, QPalette::ButtonText);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user