- Timestamp:
- Oct 25, 2021 1:36:03 PM (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/UINotificationObjects.cpp
r92013 r92034 1155 1155 const QString &strDetails, 1156 1156 const QString &strInternalName /* = QString() */, 1157 const QString &strHelpKeyword /* = QString() */) 1157 const QString &strHelpKeyword /* = QString() */, 1158 UINotificationCenter *pParent /* = 0 */) 1158 1159 { 1159 1160 /* Check if message suppressed: */ … … 1165 1166 return; 1166 1167 1168 /* Choose effective parent: */ 1169 UINotificationCenter *pEffectiveParent = pParent ? pParent : gpNotificationCenter; 1170 1167 1171 /* Create message finally: */ 1168 const QUuid uId = gpNotificationCenter->append(new UINotificationMessage(strName,1169 1170 1171 1172 const QUuid uId = pEffectiveParent->append(new UINotificationMessage(strName, 1173 strDetails, 1174 strInternalName, 1175 strHelpKeyword)); 1172 1176 if (!strInternalName.isEmpty()) 1173 1177 m_messages[strInternalName] = uId; … … 1175 1179 1176 1180 /* static */ 1177 void UINotificationMessage::destroyMessage(const QString &strInternalName) 1181 void UINotificationMessage::destroyMessage(const QString &strInternalName, 1182 UINotificationCenter *pParent /* = 0 */) 1178 1183 { 1179 1184 /* Check if message really exists: */ … … 1181 1186 return; 1182 1187 1188 /* Choose effective parent: */ 1189 UINotificationCenter *pEffectiveParent = pParent ? pParent : gpNotificationCenter; 1190 1183 1191 /* Destroy message finally: */ 1184 gpNotificationCenter->revoke(m_messages.value(strInternalName));1192 pEffectiveParent->revoke(m_messages.value(strInternalName)); 1185 1193 m_messages.remove(strInternalName); 1186 1194 } -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r92013 r92034 49 49 50 50 /* Forward declarations: */ 51 class UINotificationCenter; 51 52 class CAudioAdapter; 52 53 class CEmulatedUSB; … … 491 492 * @param strDetails Brings the message details. 492 493 * @param strInternalName Brings the message internal name. 493 * @param strHelpKeyword Brings the message help keyword. */ 494 * @param strHelpKeyword Brings the message help keyword. 495 * @param pParent Brings the local notification-center reference. */ 494 496 static void createMessage(const QString &strName, 495 497 const QString &strDetails, 496 498 const QString &strInternalName = QString(), 497 const QString &strHelpKeyword = QString()); 499 const QString &strHelpKeyword = QString(), 500 UINotificationCenter *pParent = 0); 498 501 /** Destroys message. 499 * @param strInternalName Brings the message internal name. */ 500 static void destroyMessage(const QString &strInternalName); 502 * @param strInternalName Brings the message internal name. 503 * @param pParent Brings the local notification-center reference. */ 504 static void destroyMessage(const QString &strInternalName, 505 UINotificationCenter *pParent = 0); 501 506 502 507 /** Holds the IDs of messages registered. */
Note:
See TracChangeset
for help on using the changeset viewer.