Changeset 56077 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 26, 2015 2:19:08 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r55939 r56077 182 182 #ifdef VBOX_WITH_DRAG_AND_DROP 183 183 if (pMachineView->m_pDnDHandler) 184 { 184 185 delete pMachineView->m_pDnDHandler; 186 pMachineView->m_pDnDHandler = NULL; 187 } 185 188 #endif 186 189 delete pMachineView; … … 1417 1420 1418 1421 #ifdef VBOX_WITH_DRAG_AND_DROP 1422 bool UIMachineView::dragAndDropIsActive(void) const 1423 { 1424 return ( m_pDnDHandler 1425 && machine().GetDnDMode() != KDnDMode_Disabled); 1426 } 1427 1419 1428 void UIMachineView::dragEnterEvent(QDragEnterEvent *pEvent) 1420 1429 { 1421 1430 AssertPtrReturnVoid(pEvent); 1431 1432 if (!dragAndDropIsActive()) 1433 return; 1422 1434 1423 1435 /* Get mouse-pointer location. */ … … 1441 1453 AssertPtrReturnVoid(pEvent); 1442 1454 1455 if (!dragAndDropIsActive()) 1456 return; 1457 1443 1458 /* Get mouse-pointer location. */ 1444 1459 const QPoint &cpnt = viewportToContents(pEvent->pos()); … … 1461 1476 AssertPtrReturnVoid(pEvent); 1462 1477 1478 if (!dragAndDropIsActive()) 1479 return; 1480 1463 1481 m_pDnDHandler->dragLeave(screenId()); 1464 1482 … … 1468 1486 void UIMachineView::dragIsPending(void) 1469 1487 { 1488 if (!dragAndDropIsActive()) 1489 return; 1490 1470 1491 /** @todo Add guest->guest DnD functionality here by getting 1471 1492 * the source of guest B (when copying from B to A). */ … … 1476 1497 { 1477 1498 AssertPtrReturnVoid(pEvent); 1499 1500 if (!dragAndDropIsActive()) 1501 return; 1478 1502 1479 1503 /* Get mouse-pointer location. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r55845 r56077 259 259 #ifdef VBOX_WITH_DRAG_AND_DROP 260 260 /** 261 * Returns @true if drag and drop for this machine is active 262 * (that is, host->guest, guest->host or bidirectional), @false if not. 263 */ 264 bool dragAndDropIsActive(void) const; 265 266 /** 261 267 * Host -> Guest: Issued when the host cursor enters the guest (VM) window. 262 268 * The guest will receive the relative cursor coordinates of the
Note:
See TracChangeset
for help on using the changeset viewer.