Changeset 489f262 for src/orm


Ignore:
Timestamp:
12/31/09 12:24:20 (12 years ago)
Author:
komarma <komarma@…>
Branches:
master, qt5
Children:
d0d0a66
Parents:
20a6010
Message:

Fixing datetime conversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/orm/ormrecord.h

    r20a6010 r489f262  
    149149QVariant OrmRecord<T>::convertToC(QVariant value, QVariant::Type colType)
    150150{
    151     if (colType == QVariant::DateTime &&
    152         (value.type() == QVariant::UInt || value.type() == QVariant::Int))
     151    if (colType == QVariant::DateTime && value.canConvert<uint>())
    153152    {
    154153        QDateTime date;
     154        date.setTimeSpec(Qt::UTC);
    155155        date.setTime_t(value.toUInt());
    156156        return date;
Note: See TracChangeset for help on using the changeset viewer.