VirtualBox

Changeset 104594 in vbox


Ignore:
Timestamp:
May 13, 2024 12:40:24 PM (7 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10450: Get rid of pre-Qt6 code related to time/date stuff.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp

    r104229 r104594  
    387387        propertyStringList << UIFileManager::tr("<b>Type:</b> %1<br/>").arg(fileTypeString(fileType(fileInfo)));
    388388        /* Creation Date: */
    389 #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
    390389        propertyStringList << UIFileManager::tr("<b>Created:</b> %1<br/>").arg(fileInfo.birthTime().toString());
    391 #else
    392         propertyStringList << UIFileManager::tr("<b>Created:</b> %1<br/>").arg(fileInfo.created().toString());
    393 #endif
    394390        /* Last Modification Date: */
    395391        propertyStringList << UIFileManager::tr("<b>Modified:</b> %1<br/>").arg(fileInfo.lastModified().toString());
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp

    r104251 r104594  
    8686        CSnapshot comSnapshot = m_comMachine.GetCurrentSnapshot();
    8787        m_strSnapshotName = comSnapshot.isNull() ? QString() : comSnapshot.GetName();
    88 #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
    8988        m_lastStateChange.setSecsSinceEpoch(m_comMachine.GetLastStateChange() / 1000);
    90 #else
    91         m_lastStateChange.setTime_t(m_comMachine.GetLastStateChange() / 1000);
    92 #endif
    9389        m_cSnaphot = m_comMachine.GetSnapshotCount();
    9490
     
    269265{
    270266    /* This is used in tool-tip generation: */
    271 #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
    272267    const QString strDateTime = m_lastStateChange.date() == QDate::currentDate()
    273268                              ? QLocale::system().toString(m_lastStateChange.time(), QLocale::ShortFormat)
    274269                              : QLocale::system().toString(m_lastStateChange, QLocale::ShortFormat);
    275 #else
    276     const QString strDateTime = (m_lastStateChange.date() == QDate::currentDate())
    277                               ? m_lastStateChange.time().toString(Qt::LocalDate)
    278                               : m_lastStateChange.toString(Qt::LocalDate);
    279 #endif
    280270
    281271    /* If machine is accessible: */
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp

    r104358 r104594  
    391391        setIcon(Column_Name, *m_pSnapshotWidget->snapshotItemIcon(m_fOnline));
    392392        m_strDescription = m_comSnapshot.GetDescription();
    393 #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
    394393        m_timestamp.setSecsSinceEpoch(m_comSnapshot.GetTimeStamp() / 1000);
    395 #else
    396         m_timestamp.setTime_t(m_comSnapshot.GetTimeStamp() / 1000);
    397 #endif
    398394        m_fCurrentStateModified = false;
    399395    }
     
    424420    setIcon(Column_Name, gpConverter->toIcon(m_enmMachineState));
    425421    /* Update timestamp: */
    426 #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
    427422    m_timestamp.setSecsSinceEpoch(m_comMachine.GetLastStateChange() / 1000);
    428 #else
    429     m_timestamp.setTime_t(m_comMachine.GetLastStateChange() / 1000);
    430 #endif
    431423}
    432424
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