Changeset 57288 in vbox
- Timestamp:
- Aug 12, 2015 11:45:18 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 102047
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
r57227 r57288 383 383 m_pMIMEData, SLOT(sltDropActionChanged(Qt::DropAction))); 384 384 385 /* Invoke this handler as data needs to be retrieved by our derived QMimeData class. */ 386 connect(m_pMIMEData, SIGNAL(sigGetData(Qt::DropAction, const QString&, QVariant::Type, QVariant&)), 387 this, SLOT(sltGetData(Qt::DropAction, const QString&, QVariant::Type, QVariant&))); 388 385 389 /* 386 390 * Set MIME data object and start the (modal) drag'n drop operation on the host. … … 651 655 int rc = VINF_SUCCESS; 652 656 657 /* Send a mouse event with released mouse buttons into the guest that triggers 658 * the "drop" event in our proxy window on the guest. */ 659 AssertPtr(m_pSession); 660 m_pSession->mouse().PutMouseEvent(0, 0, 0, 0, 0); 661 653 662 /* Start getting the data from the source. Request and transfer data 654 663 * from the source and display a modal progress dialog while doing this. */ … … 703 712 m_enmMode = enmMode; 704 713 LogFlowFunc(("Mode is now: %RU32\n", m_enmMode)); 714 } 715 716 int UIDnDHandler::sltGetData( Qt::DropAction dropAction, 717 const QString &strMIMEType, 718 QVariant::Type vaType, 719 QVariant &vaData) 720 { 721 int rc = retrieveData(dropAction, strMIMEType, vaType, vaData); 722 LogFlowFuncLeaveRC(rc); 723 return rc; 705 724 } 706 725 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
r57221 r57288 100 100 static Qt::DropActions toQtDnDActions(const QVector<KDnDAction> &vecActions); 101 101 102 public slots: 103 104 /** 105 * Called by UIDnDMIMEData (Linux, OS X, Solaris) to start retrieving the actual data 106 * from the guest. This function will block and show a modal progress dialog until 107 * the data transfer is complete. 108 * 109 * @return IPRT status code. 110 * @param dropAction Drop action to perform. 111 * @param strMIMEType MIME data type. 112 * @param vaType Qt's variant type of the MIME data. 113 * @param vaData Reference to QVariant where to store the retrieved data. 114 */ 115 int sltGetData(Qt::DropAction dropAction, const QString &strMIMEType, QVariant::Type vaType, QVariant &vaData); 116 102 117 protected: 103 118 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.cpp
r57221 r57288 159 159 { 160 160 QVariant vaData; 161 rc = m_pDnDHandler->retrieveData(Qt::CopyAction, strMIMEType, vaType, vaData);161 rc = emit sigGetData(Qt::CopyAction, strMIMEType, vaType, vaData); 162 162 if (RT_SUCCESS(rc)) 163 163 { … … 174 174 LogRel(("DnD: Retrieving data failed with %Rrc\n", rc)); 175 175 176 return Q MimeData::retrieveData(strMIMEType, vaType);176 return QVariant(QVariant::Invalid); 177 177 } 178 178 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDMIMEData.h
r57221 r57288 70 70 * 71 71 * @returns IPRT status code. 72 * @param strMIMEType MIME type to retrieve data for. 72 * @param dropAction Drop action to perform. 73 * @param strMimeType MIME data type. 74 * @param vaType Qt's variant type of the MIME data. 75 * @param vaData Reference to QVariant where to store the retrieved data. 73 76 */ 74 int getData(const QString &strMIMEType) const; 75 76 #ifdef RT_OS_DARWIN 77 void notifyDropped(void) const; 78 #endif 77 int sigGetData(Qt::DropAction dropAction, const QString &strMIMEType, QVariant::Type vaType, QVariant &vaData) const; 79 78 80 79 public slots:
Note:
See TracChangeset
for help on using the changeset viewer.