VirtualBox

Changeset 100035 in vbox


Ignore:
Timestamp:
Jun 1, 2023 12:59:18 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157713
Message:

FE/Qt: bugref:10450: Runtime UI: Qt6 compatibility bits for UIDnDMIMEData; QVariant::Type is obsolete and repalced with QMetaType::Type but I don't really wish to put #ifdef to each place where QVariant::Type is used, it's better to get rid of obsolete stuff after we traversed to Qt6 already.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp

    r98103 r100035  
    9797 * @return QVariant
    9898 */
     99#ifndef VBOX_IS_QT6_OR_LATER /* QVariant::Type is repalced with QMetaType in Qt6 */
    99100QVariant UIDnDMIMEData::retrieveData(const QString &strMIMEType, QVariant::Type vaType) const
    100101{
     102#else
     103QVariant UIDnDMIMEData::retrieveData(const QString &strMIMEType, QMetaType metaType) const
     104{
     105    /* In Qt6 deprecated QVariant::Type is redefined through QMetaType::Type: */
     106    const QVariant::Type vaType = (QVariant::Type)metaType.id();
     107#endif
     108
    101109    LogFlowFunc(("state=%RU32, curAction=0x%x, defAction=0x%x, mimeType=%s, type=%d (%s)\n",
    102110                 m_enmState, m_curAction, m_defAction, strMIMEType.toStdString().c_str(), vaType, QVariant::typeToName(vaType)));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.h

    r98103 r100035  
    105105    virtual bool hasFormat(const QString &mimeType) const;
    106106
    107     virtual QVariant retrieveData(const QString &strMIMEType, QVariant::Type vaType) const;
     107#ifndef VBOX_IS_QT6_OR_LATER /* QVariant::Type is repalced with QMetaType in Qt6 */
     108    virtual QVariant retrieveData(const QString &strMIMEType, QVariant::Type vaType) const RT_OVERRIDE;
     109#else
     110    virtual QVariant retrieveData(const QString &strMIMEType, QMetaType metaType) const RT_OVERRIDE;
     111#endif
    108112    /** @}  */
    109113
Note: See TracChangeset for help on using the changeset viewer.

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