Changeset 101561 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 23, 2023 4:25:05 PM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 159639
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp
r100344 r101561 760 760 void UIVMActivityOverviewTableView::mousePressEvent(QMouseEvent *pEvent) 761 761 { 762 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */763 if (!indexAt(pEvent->pos()).isValid())764 #else765 762 if (!indexAt(pEvent->position().toPoint()).isValid()) 766 #endif767 763 clearSelection(); 768 764 QTableView::mousePressEvent(pEvent); -
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp
r100351 r101561 361 361 void UIChart::mouseMoveEvent(QMouseEvent *pEvent) 362 362 { 363 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos, x, y were replaced with QSinglePointEvent::position in Qt6 */ 364 int iX = width() - pEvent->x() - m_iMarginRight; 365 #else 366 int iX = width() - pEvent->position().x() - m_iMarginRight; 367 #endif 363 const int iX = width() - pEvent->position().x() - m_iMarginRight; 368 364 m_iDataIndexUnderCursor = -1; 369 365 if (iX > m_iMarginLeft && iX <= width() - m_iMarginRight) -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabel.cpp
r100344 r101561 169 169 { 170 170 /* Start dragging: */ 171 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */172 if (pEvent->button() == Qt::LeftButton && geometry().contains(pEvent->pos()) && m_fFullSizeSelection)173 #else174 171 if (pEvent->button() == Qt::LeftButton && geometry().contains(pEvent->position().toPoint()) && m_fFullSizeSelection) 175 #endif176 172 m_fStartDragging = true; 177 173 /* Call to base-class: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QISplitter.cpp
r100086 r101561 316 316 const int margin = 3; 317 317 QMouseEvent *pMouseEvent = static_cast<QMouseEvent*>(pEvent); 318 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */319 const QPoint gPos = pMouseEvent->globalPos();320 #else321 318 const QPoint gPos = pMouseEvent->globalPosition().toPoint(); 322 #endif323 319 for (int i=1; i < count(); ++i) 324 320 { -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.cpp
r101560 r101561 66 66 if (pEvent->button() == Qt::LeftButton) 67 67 { 68 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */69 QContextMenuEvent cme(QContextMenuEvent::Mouse, pEvent->pos(), pEvent->globalPos());70 #else71 68 QContextMenuEvent cme(QContextMenuEvent::Mouse, pEvent->position().toPoint(), pEvent->globalPosition().toPoint()); 72 #endif73 69 emit sigContextMenuRequest(this, &cme); 74 70 if (cme.isAccepted()) -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r100344 r101561 459 459 void UIBookmarksListWidget::mousePressEvent(QMouseEvent *pEvent) 460 460 { 461 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */462 if (!indexAt(pEvent->pos()).isValid())463 #else464 461 if (!indexAt(pEvent->position().toPoint()).isValid()) 465 #endif466 462 { 467 463 clearSelection(); -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp
r100344 r101561 298 298 { 299 299 QMouseEvent *pMouseEvent = static_cast<QMouseEvent*>(pEvent); 300 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */301 const QPoint gPos = pMouseEvent->globalPos();302 #else303 300 const QPoint gPos = pMouseEvent->globalPosition().toPoint(); 304 #endif305 301 if (pMouseEvent->buttons() == Qt::LeftButton) 306 302 { … … 681 677 if (fOverlayMode) 682 678 return; 683 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */684 QString strAnchor = anchorAt(pEvent->pos());685 #else686 679 QString strAnchor = anchorAt(pEvent->position().toPoint()); 687 #endif688 680 689 681 if (!strAnchor.isEmpty()) -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.cpp
r100344 r101561 180 180 { 181 181 if (m_pTextEdit) 182 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */183 m_pTextEdit->setMouseCursorLine(m_pTextEdit->lineNumberForPos(pEvent->pos()));184 #else185 182 m_pTextEdit->setMouseCursorLine(m_pTextEdit->lineNumberForPos(pEvent->position().toPoint())); 186 #endif187 183 update(); 188 184 } … … 191 187 { 192 188 if (m_pTextEdit) 193 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */194 m_pTextEdit->toggleBookmark(m_pTextEdit->bookmarkForPos(pEvent->pos()));195 #else196 189 m_pTextEdit->toggleBookmark(m_pTextEdit->bookmarkForPos(pEvent->position().toPoint())); 197 #endif198 190 } 199 191 … … 396 388 void UIVMLogViewerTextEdit::mouseMoveEvent(QMouseEvent *pEvent) 397 389 { 398 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */399 setMouseCursorLine(lineNumberForPos(pEvent->pos()));400 #else401 390 setMouseCursorLine(lineNumberForPos(pEvent->position().toPoint())); 402 #endif403 391 if (m_pLineNumberArea) 404 392 m_pLineNumberArea->update(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r100344 r101561 2011 2011 { 2012 2012 /* Get mouse-pointer location. */ 2013 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */2014 const QPoint &cpnt = viewportToContents(pEvent->pos());2015 #else2016 2013 const QPoint &cpnt = viewportToContents(pEvent->position().toPoint()); 2017 #endif2018 2014 2019 2015 /* Ask the target for starting a DnD event. */ … … 2041 2037 { 2042 2038 /* Get mouse-pointer location. */ 2043 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */2044 const QPoint &cpnt = viewportToContents(pEvent->pos());2045 #else2046 2039 const QPoint &cpnt = viewportToContents(pEvent->position().toPoint()); 2047 #endif2048 2040 2049 2041 /* Ask the guest for moving the drop cursor. */ … … 2086 2078 { 2087 2079 /* Get mouse-pointer location. */ 2088 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */2089 const QPoint &cpnt = viewportToContents(pEvent->pos());2090 #else2091 2080 const QPoint &cpnt = viewportToContents(pEvent->position().toPoint()); 2092 #endif2093 2081 2094 2082 /* Ask the guest for dropping data. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r100351 r101561 650 650 /* Get mouse-event: */ 651 651 QMouseEvent *pOldMouseEvent = static_cast<QMouseEvent*>(pEvent); 652 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */653 const QPoint gPos = pOldMouseEvent->globalPos();654 #else655 652 const QPoint gPos = pOldMouseEvent->globalPosition().toPoint(); 656 #endif657 653 658 654 /* Check which viewport(s) we *probably* hover: */ … … 736 732 m_iLastMouseWheelDelta = 0; 737 733 738 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */739 if (mouseEvent(pMouseEvent->type(), uScreenId,740 pMouseEvent->pos(), pMouseEvent->globalPos(),741 pMouseEvent->buttons(), 0, Qt::Horizontal))742 #else743 734 if (mouseEvent(pMouseEvent->type(), uScreenId, 744 735 pMouseEvent->position().toPoint(), pMouseEvent->globalPosition().toPoint(), 745 736 pMouseEvent->buttons(), 0, Qt::Horizontal)) 746 #endif747 737 return true; 748 738 break; … … 1258 1248 { 1259 1249 /* Get absolute touch-point origin: */ 1260 #ifndef VBOX_IS_QT6_OR_LATER /* QEventPoint::pos was replaced with QEventPoint::position in Qt6 */1261 QPoint currentTouchPoint = touchPoint.pos().toPoint();1262 #else1263 1250 QPoint currentTouchPoint = touchPoint.position().toPoint(); 1264 #endif1265 1251 1266 1252 /* Pass absolute touch-point data: */ … … 1274 1260 } else { 1275 1261 /* Get relative touch-point normalized position: */ 1276 #ifndef VBOX_IS_QT6_OR_LATER /* QEventPoint::pos was replaced with QEventPoint::position in Qt6 */1277 QPointF rawTouchPoint = touchPoint.normalizedPos();1278 #else1279 1262 QPointF rawTouchPoint = touchPoint.normalizedPosition(); 1280 #endif1281 1263 1282 1264 /* Pass relative touch-point data as Normalized Integer: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStatusBarEditor.cpp
r101560 r101561 303 303 304 304 /* Remember mouse-press position: */ 305 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */306 const QPoint gPos = pEvent->globalPos();307 #else308 305 const QPoint gPos = pEvent->globalPosition().toPoint(); 309 #endif310 306 m_mousePressPosition = gPos; 311 307 } … … 359 355 360 356 /* Make sure item is really dragged: */ 361 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */362 const QPoint gPos = pEvent->globalPos();363 #else364 357 const QPoint gPos = pEvent->globalPosition().toPoint(); 365 #endif366 358 if (QLineF(gPos, m_mousePressPosition).length() < 367 359 QApplication::startDragDistance()) … … 642 634 643 635 /* Get event position: */ 644 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */645 const QPoint lPos = pEvent->pos();646 #else647 636 const QPoint lPos = pEvent->position().toPoint(); 648 #endif649 637 /* Search for most suitable button: */ 650 638 foreach (const IndicatorType &enmType, m_order) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.cpp
r101498 r101561 4062 4062 /* Make sure event is valid: */ 4063 4063 AssertPtrReturnVoid(pEvent); 4064 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */4065 const QPoint gPos = pEvent->globalPos();4066 const QPoint lPos = pEvent->pos();4067 #else4068 4064 const QPoint gPos = pEvent->globalPosition().toPoint(); 4069 4065 const QPoint lPos = pEvent->position().toPoint(); 4070 #endif4071 4066 4072 4067 const QModelIndex index = m_pTreeViewStorage->indexAt(lPos); … … 4194 4189 /* Make sure event is valid: */ 4195 4190 AssertPtrReturnVoid(pEvent); 4196 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */4197 const QPoint gPos = pEvent->globalPos();4198 const QPoint lPos = pEvent->pos();4199 #else4200 4191 const QPoint gPos = pEvent->globalPosition().toPoint(); 4201 4192 const QPoint lPos = pEvent->position().toPoint(); 4202 #endif4203 4193 4204 4194 /* Acquire indexes: */ … … 4300 4290 4301 4291 /* Check what item we are hovering currently: */ 4302 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */4303 QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->pos());4304 #else4305 4292 QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->position().toPoint()); 4306 #endif4307 4293 AbstractItem *pItem = static_cast<AbstractItem*>(index.internalPointer()); 4308 4294 /* And make sure this is controller item, we are supporting dropping for this kind only: */ … … 4332 4318 4333 4319 /* Check what item we are hovering currently: */ 4334 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */4335 QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->pos());4336 #else4337 4320 QModelIndex index = m_pTreeViewStorage->indexAt(pEvent->position().toPoint()); 4338 #endif4339 4321 AbstractItem *pItem = static_cast<AbstractItem*>(index.internalPointer()); 4340 4322 /* And make sure this is controller item, we are supporting dropping for this kind only: */ -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r100896 r101561 2838 2838 UISoftKeyboardKey *UISoftKeyboardWidget::keyUnderMouse(QMouseEvent *pEvent) 2839 2839 { 2840 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */2841 const QPoint lPos = pEvent->pos();2842 #else2843 2840 const QPoint lPos = pEvent->position().toPoint(); 2844 #endif2845 2841 QPoint eventPosition(lPos.x() / m_fScaleFactorX, lPos.y() / m_fScaleFactorY); 2846 2842 if (m_fHideMultimediaKeys) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp
r100344 r101561 174 174 void UIHelpButton::mousePressEvent(QMouseEvent *pEvent) 175 175 { 176 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */177 if (hitButton(pEvent->pos()))178 #else179 176 if (hitButton(pEvent->position().toPoint())) 180 #endif181 177 m_pButtonPressed = true; 182 178 QPushButton::mousePressEvent(pEvent); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UITabBar.cpp
r101560 r101561 544 544 545 545 /* Remember mouse-press position: */ 546 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */547 m_mousePressPosition = pEvent->globalPos();548 #else549 546 m_mousePressPosition = pEvent->globalPosition().toPoint(); 550 #endif551 547 } 552 548 … … 571 567 572 568 /* Make sure item is now being dragged: */ 573 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::globalPos was replaced with QSinglePointEvent::globalPosition in Qt6 */574 const QPoint gPos = pEvent->globalPos();575 #else576 569 const QPoint gPos = pEvent->globalPosition().toPoint(); 577 #endif578 570 if (QLineF(gPos, m_mousePressPosition).length() < QApplication::startDragDistance()) 579 571 return QWidget::mouseMoveEvent(pEvent); … … 907 899 /* Make sure event is valid: */ 908 900 AssertPtrReturnVoid(pEvent); 909 #ifndef VBOX_IS_QT6_OR_LATER /* QMouseEvent::pos was replaced with QSinglePointEvent::position in Qt6 */910 const QPoint lPos = pEvent->pos();911 #else912 901 const QPoint lPos = pEvent->position().toPoint(); 913 #endif914 902 915 903 /* And mime-data is set: */
Note:
See TracChangeset
for help on using the changeset viewer.