VirtualBox

Ignore:
Timestamp:
Feb 14, 2014 9:46:58 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92295
Message:

DnD: Update.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
8 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r50305 r50460  
    455455 ifdef VBOX_WITH_DRAG_AND_DROP_GH
    456456  VirtualBox_QT_MOCHDRS += \
    457         src/runtime/UIDnDMIMEData.h
     457        src/runtime/UIDnDMIMEData.h \
     458        src/runtime/UIDnDDrag.h
    458459 endif
    459460endif
     
    492493
    493494ifdef VBOX_WITH_DRAG_AND_DROP
     495 VirtualBox_QT_MOCSRCS += \
     496        src/runtime/UIDnDHandler.cpp
    494497 ifdef VBOX_WITH_DRAG_AND_DROP_GH
    495498  VirtualBox_QT_MOCSRCS += \
     499        src/runtime/UIDnDDrag.cpp \
    496500        src/runtime/UIDnDMIMEData.cpp
    497501 endif
     
    781785 ifdef VBOX_WITH_DRAG_AND_DROP_GH
    782786  VirtualBox_SOURCES += \
    783         src/runtime/UIDnDMIMEData.cpp
    784   VirtualBox_QT_MOCSRCS += \
    785         src/runtime/UIDnDMIMEData.cpp
     787        src/runtime/UIDnDMIMEData.cpp \
     788        src/runtime/UIDnDDrag.cpp
     789  VirtualBox_SOURCES.win += \
     790        src/runtime/UIDnDDropSource_win.cpp \
     791        src/runtime/UIDnDDataObject_win.cpp \
     792        src/runtime/UIDnDEnumFormat_win.cpp
    786793 endif
    787794endif
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp

    r50306 r50460  
    3434#include "UIDnDHandler.h"
    3535#ifdef VBOX_WITH_DRAG_AND_DROP_GH
    36 # include "UIDnDMIMEData.h"
     36# include "UIDnDDrag.h"
    3737#endif
    3838#include "UIMessageCenter.h"
     
    4646
    4747UIDnDHandler::UIDnDHandler(void)
    48 #ifdef VBOX_WITH_DRAG_AND_DROP_GH
    49     : pMData(NULL)
    50 #endif
     48    : mMode(Unknown)
    5149{
    5250}
     
    6058                                         const QMimeData *pMimeData, QWidget * /* pParent = NULL */)
    6159{
     60    if (mMode == GH) /* Wrong mode? Bail out. */
     61        return Qt::IgnoreAction;
     62
    6263    LogFlowFunc(("screenId=%RU32, x=%d, y=%d, action=%ld\n",
    6364                 screenId, x, y, toVBoxDnDAction(proposedAction)));
     
    7879                                        const QMimeData *pMimeData, QWidget * /* pParent = NULL */)
    7980{
     81    if (mMode == GH) /* Wrong mode? Bail out. */
     82        return Qt::IgnoreAction;
     83
    8084#ifdef DEBUG_andy
    8185    LogFlowFunc(("screenId=%RU32, x=%d, y=%d, action=%ld\n",
     
    99103                                        const QMimeData *pMimeData, QWidget *pParent /* = NULL */)
    100104{
     105    if (mMode == GH) /* Wrong mode? Bail out. */
     106        return Qt::IgnoreAction;
     107
    101108    LogFlowFunc(("screenId=%RU32, x=%d, y=%d, action=%ld\n",
    102109                 screenId, x, y, toVBoxDnDAction(proposedAction)));
     
    114121    if (result != KDragAndDropAction_Ignore)
    115122    {
    116         /* Get the actually data */
     123        /* Get the actual MIME data in the requested format. */
    117124        const QByteArray &d = pMimeData->data(format);
    118125        if (   !d.isEmpty()
    119126            && !format.isEmpty())
    120127        {
    121             /* We need the data in the vector format. */
     128            /* Convert the actual MIME data to a vector (needed
     129             * for the COM wrapper). */
    122130            QVector<uint8_t> dv(d.size());
    123131            memcpy(dv.data(), d.constData(), d.size());
     
    126134            if (guest.isOk())
    127135            {
    128                 msgCenter().showModalProgressDialog(progress, tr("Dropping data ..."), ":/progress_dnd_hg_90px.png", pParent);
    129                 if (!progress.GetCanceled() && (!progress.isOk() || progress.GetResultCode() != 0))
     136                msgCenter().showModalProgressDialog(progress,
     137                                                    tr("Dropping data ..."), ":/progress_dnd_hg_90px.png",
     138                                                    pParent);
     139                if (   !progress.GetCanceled()
     140                    && (   !progress.isOk()
     141                        ||  progress.GetResultCode() != 0))
    130142                {
    131143                    msgCenter().cannotDropData(progress, pParent);
     
    146158void UIDnDHandler::dragHGLeave(CGuest &guest, ulong screenId, QWidget * /* pParent = NULL */)
    147159{
     160    if (mMode == GH) /* Wrong mode? Bail out. */
     161        return;
     162
    148163    LogFlowFunc(("screenId=%RU32\n", screenId));
    149164    guest.DragHGLeave(screenId);
     
    154169    int rc;
    155170#ifdef VBOX_WITH_DRAG_AND_DROP_GH
     171    if (mMode == HG) /* Wrong mode? Bail out. */
     172        return VERR_WRONG_ORDER;
     173
    156174    /*
    157175     * How this works: Host is asking the guest if there is any DnD
     
    169187    LogFlowFunc(("defaultAction=%d, numFormats=%d\n", defaultAction, vecFmtGuest.size()));
    170188
    171     /*
    172      * Do guest -> host format conversion, if needed.
    173      * On X11 this already maps to the Xdnd protocol.
    174      ** @todo What about the MacOS Carbon Drag Manager? Needs testing.
    175      *
    176      * See: https://www.iana.org/assignments/media-types/media-types.xhtml
    177      */
    178     LogFlowFunc(("Number of guest formats: %d\n", vecFmtGuest.size()));
    179189    QStringList lstFmtNative;
    180     for (int i = 0; i < vecFmtGuest.size(); i++)
     190    if (defaultAction != KDragAndDropAction_Ignore)
    181191    {
    182         const QString &strFmtGuest = vecFmtGuest.at(i);
    183         LogFlowFunc(("\tFormat %d: %s\n", i,
    184                      strFmtGuest.toAscii().constData()));
     192        /*
     193         * Do guest -> host format conversion, if needed.
     194         * On X11 this already maps to the Xdnd protocol.
     195         ** @todo What about the MacOS Carbon Drag Manager? Needs testing.
     196         *
     197         * See: https://www.iana.org/assignments/media-types/media-types.xhtml
     198         */
     199        LogFlowFunc(("Number of guest formats: %d\n", vecFmtGuest.size()));
     200        for (int i = 0; i < vecFmtGuest.size(); i++)
     201        {
     202            const QString &strFmtGuest = vecFmtGuest.at(i);
     203            LogFlowFunc(("\tFormat %d: %s\n", i,
     204                         strFmtGuest.toAscii().constData()));
    185205# ifdef RT_OS_WINDOWS
    186         /* CF_TEXT */
    187         if (   strFmtGuest.contains("text/plain", Qt::CaseInsensitive)
    188             && !lstFmtNative.contains("text/plain"))
    189         {
    190             lstFmtNative << "text/plain";
    191         }
    192         /* CF_HDROP */
    193         else if (   strFmtGuest.contains("text/uri-list", Qt::CaseInsensitive)
    194                  && !lstFmtNative.contains("text/uri-list"))
    195         {
    196             lstFmtNative << "text/uri-list";
    197         }
     206            /* CF_TEXT */
     207            if (   strFmtGuest.contains("text/plain", Qt::CaseInsensitive)
     208                && !lstFmtNative.contains("text/plain"))
     209            {
     210                lstFmtNative << "text/plain";
     211            }
     212            /* CF_HDROP */
     213            else if (   strFmtGuest.contains("text/uri-list", Qt::CaseInsensitive)
     214                     && !lstFmtNative.contains("text/uri-list"))
     215            {
     216                lstFmtNative << "text/uri-list";
     217            }
    198218# else
    199         /* On non-Windows just do a 1:1 mapping. */
    200         lstFmtNative << strFmtGuest;
     219            /* On non-Windows just do a 1:1 mapping. */
     220            lstFmtNative << strFmtGuest;
    201221#  ifdef RT_OS_MACOS
    202         /** @todo Does the mapping apply here? Don't think so ... */
     222            /** @todo Does the mapping apply here? Don't think so ... */
    203223#  endif
    204224# endif /* !RT_OS_WINDOWS */
     225        }
     226
     227        LogFlowFunc(("Number of native formats: %d\n", lstFmtNative.size()));
     228# ifdef DEBUG
     229        for (int i = 0; i < lstFmtNative.size(); i++)
     230            LogFlowFunc(("\tFormat %d: %s\n", i, lstFmtNative.at(i).toAscii().constData()));
     231# endif
    205232    }
    206233
    207     LogFlowFunc(("Number of native formats: %d\n", lstFmtNative.size()));
    208 # ifdef DEBUG
    209     for (int i = 0; i < lstFmtNative.size(); i++)
    210         LogFlowFunc(("\tFormat %d: %s\n", i, lstFmtNative.at(i).toAscii().constData()));
    211 # endif
    212 
    213     if (    defaultAction != KDragAndDropAction_Ignore
    214         && !lstFmtNative.isEmpty())
     234    if (!lstFmtNative.isEmpty())
    215235    {
    216236        try
    217237        {
    218             QDrag *pDrag = new QDrag(pParent);
    219 
    220             /* pMData is transfered to the QDrag object, so no need for deletion. */
    221             pMData = new UIDnDMimeData(session, lstFmtNative,
    222                                                       toQtDnDAction(defaultAction),
    223                                                       toQtDnDActions(vecActions), pParent);
    224 
    225             /* Inform this object that MIME data from the guest is available so that
    226              * it can update the MIME data object accordingly. */
    227             connect(pMData, SIGNAL(sigDataAvailable(QString)),
    228                     this, SLOT(sltDataAvailable(QString)), Qt::DirectConnection);
    229 
    230             /* Inform the MIME data object of any changes in the current action. */
    231             connect(pDrag, SIGNAL(actionChanged(Qt::DropAction)),
    232                     pMData, SLOT(sltDropActionChanged(Qt::DropAction)));
    233 
    234             /* Fire it up.
    235              *
    236              * On Windows this will start a modal operation using OLE's
    237              * DoDragDrop() method, so this call will block until the DnD operation
    238              * is finished. */
    239             pDrag->setMimeData(pMData);
    240             Qt::DropAction dropAction =
    241                  pDrag->exec(toQtDnDActions(vecActions), toQtDnDAction(defaultAction));
    242             LogFlowFunc(("dropAction=%ld\n", toVBoxDnDAction(dropAction)));
    243 # ifdef RT_OS_WINDOWS
    244             /* Since the QDrag::exec() call above was blocking on Windows, decide what
    245              * to do now, e.g. if there was a "drop" action.
    246              *
    247              * Note: The UIDnDMimeData object will not be not accessible here anymore,
    248              *       since QDrag had its ownership and deleted it after the (blocking)
    249              *       QDrag::exec() call. */
    250 # endif
    251             rc = VINF_SUCCESS;
     238            UIDnDDrag *pDrag = new UIDnDDrag(session, lstFmtNative,
     239                                             toQtDnDAction(defaultAction),
     240                                             toQtDnDActions(vecActions), pParent);
     241            rc = pDrag->DoDragDrop();
     242
     243            delete pDrag;
    252244        }
    253245        catch (std::bad_alloc)
     
    258250    else
    259251        rc = VINF_SUCCESS;
    260 #else
     252#else /* !VBOX_WITH_DRAG_AND_DROP_GH */
    261253    NOREF(session);
    262254    NOREF(screenId);
     
    274266 */
    275267
     268/* static */
    276269KDragAndDropAction UIDnDHandler::toVBoxDnDAction(Qt::DropAction action)
    277270{
     
    286279}
    287280
     281/* static */
    288282QVector<KDragAndDropAction> UIDnDHandler::toVBoxDnDActions(Qt::DropActions actions)
    289283{
     
    301295}
    302296
     297/* static */
    303298Qt::DropAction UIDnDHandler::toQtDnDAction(KDragAndDropAction action)
    304299{
     
    315310}
    316311
     312/* static */
    317313Qt::DropActions UIDnDHandler::toQtDnDActions(const QVector<KDragAndDropAction> &vecActions)
    318314{
     
    343339}
    344340
    345 void UIDnDHandler::sltDataAvailable(const QString &mimeType)
    346 {
    347 #ifdef VBOX_WITH_DRAG_AND_DROP_GH
    348     LogFlowFunc(("pMData=0x%p, mimeType=%s\n",
    349                  pMData, mimeType.toAscii().constData()));
    350 
    351     if (pMData)
    352         pMData->setData(mimeType);
    353 #endif
    354 }
    355 
    356341#include "UIDnDHandler.moc"
    357342
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h

    r50306 r50460  
    3535
    3636public:
     37
    3738    /* Singleton factory. */
    3839    static UIDnDHandler* instance(void)
     
    4243        return m_pInstance;
    4344    }
     45
    4446    static void destroy(void)
    4547    {
     
    5052        }
    5153    }
     54
     55    /**
     56     * Current operation mode.
     57     */
     58    enum Mode
     59    {
     60        /** Unknown mode. */
     61        Unknown = 0,
     62        /** Host to guest. */
     63        HG,
     64        /** Guest to host. */
     65        GH
     66    };
    5267
    5368    /* Host -> Guest. */
     
    6075    int            dragGHPending(CSession &session, ulong screenId, QWidget *pParent = NULL);
    6176
    62 public slots:
     77public:
    6378
    64     void sltDataAvailable(const QString &mimetype);
     79    static KDragAndDropAction          toVBoxDnDAction(Qt::DropAction action);
     80    static QVector<KDragAndDropAction> toVBoxDnDActions(Qt::DropActions actions);
     81    static Qt::DropAction              toQtDnDAction(KDragAndDropAction action);
     82    static Qt::DropActions             toQtDnDActions(const QVector<KDragAndDropAction> &vecActions);
    6583
    6684private:
     
    7088    virtual ~UIDnDHandler(void) {}
    7189
    72     /* Private helpers. */
    73     static KDragAndDropAction          toVBoxDnDAction(Qt::DropAction action);
    74     static QVector<KDragAndDropAction> toVBoxDnDActions(Qt::DropActions actions);
    75     static Qt::DropAction              toQtDnDAction(KDragAndDropAction action);
    76     static Qt::DropActions             toQtDnDActions(const QVector<KDragAndDropAction> &vecActions);
    77 
    78 #ifdef VBOX_WITH_DRAG_AND_DROP_GH
    79     UIDnDMimeData *pMData;
    80     friend class UIDnDMimeData;
    81 #endif
     90    /** The current operation mode. */
     91    Mode mMode;
    8292};
    8393
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp

    r50305 r50460  
    2020/* Qt includes: */
    2121#include <QApplication>
     22#include <QFileInfo>
    2223#include <QKeyEvent>
    2324#include <QMimeData>
     
    3435/* GUI includes: */
    3536#include "UIDnDMIMEData.h"
     37#include "UIDnDDrag.h"
    3638#include "UIMessageCenter.h"
    3739
    3840UIDnDMimeData::UIDnDMimeData(CSession &session, QStringList formats,
    3941                             Qt::DropAction defAction, Qt::DropActions actions,
    40                              QWidget *pParent)
     42                             UIDnDDrag *pParent)
    4143    : m_pParent(pParent)
    4244    , m_session(session)
     
    9698}
    9799
    98 bool UIDnDMimeData::hasFormat(const QString &mimeType) const
    99 {
    100     bool fRc = m_lstFormats.contains(mimeType);
     100bool UIDnDMimeData::hasFormat(const QString &strMIMEType) const
     101{
     102    bool fRc = m_lstFormats.contains(strMIMEType);
    101103    LogFlowFunc(("%s: %RTbool (QtMimeData: %RTbool)\n",
    102                  mimeType.toStdString().c_str(),
    103                  fRc, QMimeData::hasFormat(mimeType)));
     104                 strMIMEType.toStdString().c_str(),
     105                 fRc, QMimeData::hasFormat(strMIMEType)));
    104106    return fRc;
    105107}
    106108
    107 QVariant UIDnDMimeData::retrieveData(const QString &mimeType,
     109QVariant UIDnDMimeData::retrieveData(const QString &strMIMEType,
    108110                                     QVariant::Type type) const
    109111{
    110112    LogFlowFunc(("m_enmState=%d, mimeType=%s, type=%d (%s)\n",
    111                  m_enmState, mimeType.toStdString().c_str(),
     113                 m_enmState, strMIMEType.toStdString().c_str(),
    112114                 type, QVariant::typeToName(type)));
    113115
    114116    bool fCanDrop = true;
    115117
    116 #if 0
    117118#ifdef RT_OS_WINDOWS
    118     Qt::MouseButtons mouseBtns = Qt::NoButton;
    119     bool fLeftBtnDown = RT_BOOL(GetAsyncKeyState(VK_LBUTTON) & 0x8000);
    120     if (fLeftBtnDown)
    121         mouseBtns |= Qt::LeftButton;
    122 # ifdef DEBUG_andy
    123     LogFlowFunc(("mouseButtons=0x%x, GetAsyncKeyState(VK_LBUTTON)=%RTbool\n",
    124                  mouseBtns, fLeftBtnDown));
    125 # endif
    126     if (mouseBtns == Qt::NoButton)
    127         m_enmState = Dropped;
    128 #endif
    129 #endif
    130 
    131 #ifdef RT_OS_WINDOWS
    132     /* On Windows we only will get into this function if OLE's DoDragDrop
    133      * routine (called by QtDrag) decides that a drop event just happened.
    134      * So just update our internal state to reflect the same as on other
    135      * platforms. */
     119    /* On Windows this function will be called several times by Qt's
     120     * OLE-specific internals to figure out which data formats we have
     121     * to offer. So just assume we can drop data here for a start.* */
    136122    fCanDrop = true;
    137123#else
    138     /* Mouse button released? See eventFilter for more information. */
     124    /* On non-Windows our state gets updated via an own event filter
     125     * (see UIDnDMimeData::eventFilter). This filter will update the current
     126     * operation state for us (based on the mouse buttons). */
    139127    if (m_enmState != Dropped)
    140128        fCanDrop = false;
     
    143131    /* Do we support the requested MIME type? */
    144132    if (   fCanDrop
    145         && !m_lstFormats.contains(mimeType))
     133        && !m_lstFormats.contains(strMIMEType))
    146134    {
    147135        LogFlowFunc(("Unsupported MIME type=%s\n",
    148                      mimeType.toStdString().c_str()));
     136                     strMIMEType.toStdString().c_str()));
    149137        fCanDrop = false;
    150138    }
     
    169157        LogFlowFunc(("Skipping request, m_enmState=%d ...\n",
    170158                     m_enmState));
    171         return QMimeData::retrieveData(mimeType, type);
    172     }
    173 
    174     if (m_enmState == Dragging)
    175     {
    176         int rc = VINF_SUCCESS;
    177 
    178         CGuest guest = m_session.GetConsole().GetGuest();
    179         /* Start getting the data from the guest. First inform the guest we
    180          * want the data in the specified MIME type. */
    181         CProgress progress = guest.DragGHDropped(mimeType,
    182                                                  UIDnDHandler::toVBoxDnDAction(m_defAction));
    183         if (guest.isOk())
    184         {
    185             msgCenter().showModalProgressDialog(progress,
    186                                                 tr("Retrieving data ..."), ":/progress_dnd_gh_90px.png",
    187                                                 m_pParent);
    188             if (!progress.GetCanceled())
    189             {
    190                 if (   progress.isOk()
    191                     && progress.GetResultCode() == 0)
    192                 {
    193                     /** @todo What about retrieving bigger files? Loop? */
    194 
    195                     /* After the data successfully arrived from the guest, we query it from Main. */
    196                     QVector<uint8_t> data = guest.DragGHGetData();
    197                     if (!data.isEmpty())
    198                     {
    199                         switch (type)
    200                         {
    201                             case QVariant::String:
    202                             {
    203                                 m_data = QVariant(QString(reinterpret_cast<const char*>(data.data())));
    204                                 break;
    205                             }
    206 
    207                             case QVariant::ByteArray:
    208                             {
    209                                 QByteArray ba(reinterpret_cast<const char*>(data.constData()), data.size());
    210                                 m_data = QVariant(ba);
    211                                 break;
    212                             }
    213 
    214                             case QVariant::List:
    215                             {
    216                                 QString strData = QString(reinterpret_cast<const char*>(data.data()));
    217                                 QStringList lstString = strData.split("\r\n", QString::SkipEmptyParts);
    218 
    219                                 m_data = QVariant(lstString);
    220                                 break;
    221                             }
    222 
    223                             default:
    224                                 AssertMsgFailed(("Should never happen, d'oh!\n"));
    225                                 rc = VERR_NOT_SUPPORTED;
    226                                 break;
    227                         }
    228                     }
    229                     /** @todo How often to retry on empty data received? */
    230 
    231                     if (RT_SUCCESS(rc))
    232                         emit sigDataAvailable(mimeType);
    233 
    234                     m_enmState = DataRetrieved;
    235                 }
    236                 else
    237                     msgCenter().cannotDropData(progress, m_pParent);
    238             }
    239             else
    240                 m_enmState = Canceled;
     159        return QMimeData::retrieveData(strMIMEType, type);
     160    }
     161
     162    int rc = VINF_SUCCESS;
     163    if (m_enmState == Dropped)
     164    {
     165        AssertPtr(m_pParent);
     166        rc = m_pParent->RetrieveData(strMIMEType, type, m_data);
     167        if (RT_SUCCESS(rc))
     168        {
     169            /* Tell ourselves that data became available. */
     170            emit sigDataAvailable(strMIMEType);
    241171        }
    242172        else
    243             msgCenter().cannotDropData(guest, m_pParent);
    244     }
    245 
    246     //return QMimeData::retrieveData(mimeType, type);
    247     return m_data;
     173        {
     174            m_enmState = Canceled;
     175        }
     176    }
     177
     178    LogFlowFunc(("Returning rc=%Rrc, m_enmState=%ld\n",
     179                 rc, m_enmState));
     180    return QMimeData::retrieveData(strMIMEType, type);
    248181}
    249182
     
    327260            for (int i = 0; i < lstData.size(); i++)
    328261            {
    329                 QString strURL = lstData.at(i).toString();
    330                 LogFlowFunc(("\tURL: %s\n",
    331                              strURL.toAscii().constData()));
    332                 lstURL << QUrl(strURL.toAscii());
     262                QFileInfo fileInfo(lstData.at(i).toString());
     263#ifdef DEBUG
     264                LogFlowFunc(("\tURL: %s (fExists=%RTbool, fIsDir=%RTbool, cb=%RU64)\n",
     265                             fileInfo.absoluteFilePath().constData(), fileInfo.exists(),
     266                             fileInfo.isDir(), fileInfo.size()));
     267#endif
     268                lstURL << QUrl::fromLocalFile(fileInfo.absoluteFilePath());
    333269            }
    334270            LogFlowFunc(("Number of URLs: %d\n",  lstURL.size()));
    335271
    336             QMimeData::setUrls(f);
     272            if (RT_SUCCESS(rc))
     273                QMimeData::setUrls(lstURL);
    337274            break;
    338275        }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.h

    r50305 r50460  
    3232#include "UIDnDHandler.h"
    3333
     34/* Forward declarations: */
     35class UIDnDDrag;
     36
    3437/** @todo Subclass QWindowsMime / QMacPasteboardMime
    3538 *  to register own/more MIME types. */
     
    4548    enum State
    4649    {
     50        /** Host is in dragging state, without
     51         *  having retrieved the metadata from the guest yet. */
    4752        Dragging = 0,
    48         DataRetrieved,
     53        /** Guest sent over the (MIME) metadata so that the
     54         *  host knows which DnD targets can be used. */
     55        MetaDataRetrieved,
     56        /** There has been a "dropped" action which indicates
     57         *  that the guest can continue sending more data (if any)
     58         *  over to the host, based on the (MIME) metadata. */
    4959        Dropped,
     60        /** The operation has been canceled. */
    5061        Canceled
    5162    };
     
    5566    UIDnDMimeData(CSession &session, QStringList formats,
    5667                  Qt::DropAction defAction,
    57                   Qt::DropActions actions, QWidget *pParent);
     68                  Qt::DropActions actions, UIDnDDrag *pParent);
    5869
    5970    int setData(const QString &mimeType);
     
    89100private:
    90101
    91     /* Private members. */
    92     QWidget          *m_pParent;
     102    UIDnDDrag        *m_pParent;
    93103    CSession          m_session;
    94104    QStringList       m_lstFormats;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r50265 r50460  
    10921092
    10931093#ifdef VBOX_WITH_DRAG_AND_DROP
    1094 
    10951094void UIMachineView::dragEnterEvent(QDragEnterEvent *pEvent)
    10961095{
     
    11781177    gDnD->dragGHPending(session(), screenId(), this);
    11791178}
    1180 
    11811179#endif /* VBOX_WITH_DRAG_AND_DROP */
    11821180
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