VirtualBox

Changeset 94006 in vbox for trunk


Ignore:
Timestamp:
Mar 1, 2022 1:03:46 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: qt6: QDateTime::setTime_t -> QDateTime::setSecsSinceEpoch (5.8+). bugref:9898

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp

    r93115 r94006  
    7575        CSnapshot comSnapshot = m_comMachine.GetCurrentSnapshot();
    7676        m_strSnapshotName = comSnapshot.isNull() ? QString() : comSnapshot.GetName();
     77#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
     78        m_lastStateChange.setSecsSinceEpoch(m_comMachine.GetLastStateChange() / 1000);
     79#else
    7780        m_lastStateChange.setTime_t(m_comMachine.GetLastStateChange() / 1000);
     81#endif
    7882        m_cSnaphot = m_comMachine.GetSnapshotCount();
    7983
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp

    r93996 r94006  
    308308        setIcon(Column_Name, *m_pSnapshotWidget->snapshotItemIcon(m_fOnline));
    309309        m_strDescription = m_comSnapshot.GetDescription();
     310#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
     311        m_timestamp.setSecsSinceEpoch(m_comSnapshot.GetTimeStamp() / 1000);
     312#else
    310313        m_timestamp.setTime_t(m_comSnapshot.GetTimeStamp() / 1000);
     314#endif
    311315        m_fCurrentStateModified = false;
    312316    }
     
    337341    setIcon(Column_Name, gpConverter->toIcon(m_enmMachineState));
    338342    /* Update timestamp: */
     343#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
     344    m_timestamp.setSecsSinceEpoch(m_comMachine.GetLastStateChange() / 1000);
     345#else
    339346    m_timestamp.setTime_t(m_comMachine.GetLastStateChange() / 1000);
     347#endif
    340348}
    341349
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette