fix Warning
This commit is contained in:
1 parent
593c221d23
commit
8345470273
316 files changed
+1246
-929
No files matched your search
@@ -41,12 +41,12 @@ void DataModel::addLine(const Data& data)
|
||||
}
|
||||
|
||||
|
||||
void DataModel::addColumn(const QString& columnName, QVariant::Type type)
|
||||
void DataModel::addColumn(const QString& columnName, QMetaType::Type type)
|
||||
{
|
||||
// QPair<QString,QVariant::Type> pair;
|
||||
// pair.first = columnName;
|
||||
// pair.second = type;
|
||||
m_newHeaderList.append(QPair<QString,QVariant::Type>(columnName, type));
|
||||
m_newHeaderList.append(QPair<QString,QMetaType::Type>(columnName, type));
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ QVariant DataModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant();
|
||||
|
||||
case Qt::ToolTipRole:
|
||||
if ((element.type() == QVariant::ULongLong || element.type() == QVariant::LongLong)
|
||||
if ((element.typeId() == QMetaType::ULongLong || element.typeId() == QMetaType::LongLong)
|
||||
&& element.toLongLong() > 1000000000)
|
||||
return QDateTime::fromMSecsSinceEpoch(element.toLongLong()).toString(QStringLiteral("dd.MM.yyyy hh:mm:ss.zzz"));
|
||||
|
||||
@@ -137,8 +137,8 @@ QVariant DataModel::headerData(int section, Qt::Orientation orientation, int rol
|
||||
case Qt::DisplayRole:
|
||||
return m_headerList.at(section).first;
|
||||
case Qt::ToolTipRole:
|
||||
int type = m_headerList.at(section).second;
|
||||
return QString::fromUtf8(QMetaType::typeName(type));
|
||||
QMetaType::Type type = m_headerList.at(section).second;
|
||||
return QString::fromUtf8(QMetaType(type).name());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user