Changeset 52874 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Sep 26, 2014 5:03:08 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r52873 r52874 86 86 void UIRuntimeMiniToolBar::setAlignment(Qt::Alignment alignment) 87 87 { 88 /* Make sure toolbar created: */ 89 AssertPtrReturnVoid(m_pToolbar); 90 88 91 /* Make sure alignment really changed: */ 89 92 if (m_alignment == alignment) … … 102 105 void UIRuntimeMiniToolBar::setAutoHide(bool fAutoHide, bool fPropagateToChild /* = true */) 103 106 { 107 /* Make sure toolbar created: */ 108 AssertPtrReturnVoid(m_pToolbar); 109 104 110 /* Make sure auto-hide really changed: */ 105 111 if (m_fAutoHide == fAutoHide) … … 119 125 void UIRuntimeMiniToolBar::setText(const QString &strText) 120 126 { 127 /* Make sure toolbar created: */ 128 AssertPtrReturnVoid(m_pToolbar); 129 121 130 /* Propagate to child: */ 122 131 m_pToolbar->setText(strText); … … 125 134 void UIRuntimeMiniToolBar::addMenus(const QList<QMenu*> &menus) 126 135 { 136 /* Make sure toolbar created: */ 137 AssertPtrReturnVoid(m_pToolbar); 138 127 139 /* Propagate to child: */ 128 140 m_pToolbar->addMenus(menus); … … 330 342 { 331 343 /* Stop hover-enter/leave timers: */ 332 if (m_pHoverEnterTimer ->isActive())344 if (m_pHoverEnterTimer && m_pHoverEnterTimer->isActive()) 333 345 m_pHoverEnterTimer->stop(); 334 if (m_pHoverLeaveTimer ->isActive())346 if (m_pHoverLeaveTimer && m_pHoverLeaveTimer->isActive()) 335 347 m_pHoverLeaveTimer->stop(); 336 348 … … 347 359 { 348 360 /* Stop the hover-leave timer if necessary: */ 349 if (m_pHoverLeaveTimer ->isActive())361 if (m_pHoverLeaveTimer && m_pHoverLeaveTimer->isActive()) 350 362 m_pHoverLeaveTimer->stop(); 351 363 352 364 /* Start the hover-enter timer: */ 353 if (m_fAutoHide )365 if (m_fAutoHide && m_pHoverEnterTimer) 354 366 m_pHoverEnterTimer->start(); 355 367 } … … 358 370 { 359 371 /* Stop the hover-enter timer if necessary: */ 360 if (m_pHoverEnterTimer ->isActive())372 if (m_pHoverEnterTimer && m_pHoverEnterTimer->isActive()) 361 373 m_pHoverEnterTimer->stop(); 362 374 363 375 /* Start the hover-leave timer: */ 364 if (m_fAutoHide )376 if (m_fAutoHide && m_pHoverLeaveTimer) 365 377 m_pHoverLeaveTimer->start(); 366 378 }
Note:
See TracChangeset
for help on using the changeset viewer.