Changeset 65547 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 31, 2017 4:00:02 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r65546 r65547 134 134 QList<QWidget*> m_margins; 135 135 }; 136 137 138 /********************************************************************************************************************************* 139 * Class UIMiniToolBarPrivate implementation. * 140 *********************************************************************************************************************************/ 136 141 137 142 UIMiniToolBarPrivate::UIMiniToolBarPrivate() … … 391 396 } 392 397 398 399 /********************************************************************************************************************************* 400 * Class UIMiniToolBar implementation. * 401 *********************************************************************************************************************************/ 402 393 403 /* static */ 394 404 Qt::WindowFlags UIMiniToolBar::defaultWindowFlags(GeometryType geometryType) … … 423 433 : QWidget(pParent, defaultWindowFlags(geometryType)) 424 434 /* Variables: General stuff: */ 435 , m_pParent(pParent) 425 436 , m_geometryType(geometryType) 426 437 , m_alignment(alignment) … … 646 657 647 658 /* Get corresponding host-screen: */ 648 const int iHostScreen = gpDesktop->screenNumber( parentWidget());659 const int iHostScreen = gpDesktop->screenNumber(m_pParent); 649 660 Q_UNUSED(iHostScreen); 650 661 /* And corresponding working area: */ … … 735 746 /* Install event-filters: */ 736 747 installEventFilter(this); 737 parent()->installEventFilter(this);748 m_pParent->installEventFilter(this); 738 749 739 750 #if defined(VBOX_WS_WIN) … … 942 953 943 954 /* If that's parent window event: */ 944 if (pWatched == parent())955 if (pWatched == m_pParent) 945 956 { 946 957 switch (pEvent->type()) … … 974 985 { 975 986 /* Skip if parent or we are invisible: */ 976 if ( ! parentWidget()->isVisible()987 if ( !m_pParent->isVisible() 977 988 || !isVisible()) 978 989 break; … … 1003 1014 QWindowStateChangeEvent *pChangeEvent = static_cast<QWindowStateChangeEvent*>(pEvent); 1004 1015 LogRel2(("GUI: UIMiniToolBar::eventFilter: Parent window state changed from %d to %d\n", 1005 (int)pChangeEvent->oldState(), (int) parentWidget()->windowState()));1006 if ( parentWidget()->windowState() & Qt::WindowMinimized)1016 (int)pChangeEvent->oldState(), (int)m_pParent->windowState())); 1017 if (m_pParent->windowState() & Qt::WindowMinimized) 1007 1018 { 1008 1019 /* Mark parent window minimized, isMinimized() is not enough due to Qt5vsX11 fight: */ … … 1011 1022 } 1012 1023 else 1013 if ( parentWidget()->windowState() == Qt::WindowFullScreen)1024 if (m_pParent->windowState() == Qt::WindowFullScreen) 1014 1025 { 1015 1026 /* Mark parent window non-minimized, isMinimized() is not enough due to Qt5vsX11 fight: */ … … 1067 1078 return m_fIsParentMinimized; 1068 1079 #else 1069 return parentWidget()->isMinimized();1080 return m_pParent->isMinimized(); 1070 1081 #endif 1071 1082 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
r65536 r65547 157 157 bool isParentMinimized() const; 158 158 159 /** Holds the parent reference. */ 160 QWidget *m_pParent; 161 159 162 /** Holds the geometry type. */ 160 163 const GeometryType m_geometryType;
Note:
See TracChangeset
for help on using the changeset viewer.