Changeset 90563 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 7, 2021 11:05:15 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp
r90562 r90563 123 123 124 124 /* static */ 125 void UINotificationCenter::create(QWidget *pParent )125 void UINotificationCenter::create(QWidget *pParent /* = 0 */) 126 126 { 127 127 AssertReturnVoid(!s_pInstance); … … 140 140 { 141 141 return s_pInstance; 142 } 143 144 void UINotificationCenter::setParent(QWidget *pParent) 145 { 146 if (!pParent) 147 hide(); 148 if (parent()) 149 parent()->removeEventFilter(this); 150 QWidget::setParent(pParent); 151 if (parent()) 152 parent()->installEventFilter(this); 153 if (parent()) 154 show(); 142 155 } 143 156 … … 279 292 { 280 293 /* Listen for parent events: */ 281 parent()->installEventFilter(this); 294 if (parent()) 295 parent()->installEventFilter(this); 282 296 283 297 /* Prepare the rest of stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r90552 r90563 55 55 56 56 /** Creates notification-center for passed @a pParent. */ 57 static void create(QWidget *pParent );57 static void create(QWidget *pParent = 0); 58 58 /** Destroys notification-center. */ 59 59 static void destroy(); 60 60 /** Returns notification-center singleton instance. */ 61 61 static UINotificationCenter *instance(); 62 63 /** Defines notification-center @a pParent. */ 64 void setParent(QWidget *pParent); 62 65 63 66 /** Invokes notification-center. */
Note:
See TracChangeset
for help on using the changeset viewer.