Changeset 49647 in vbox
- Timestamp:
- Nov 25, 2013 6:48:56 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 2 edited
-
UIMediumEnumerator.cpp (modified) (3 diffs)
-
UIMediumEnumerator.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
r49646 r49647 71 71 connect(gVBoxEvents, SIGNAL(sigMachineDataChange(QString)), this, SLOT(sltHandleMachineUpdate(QString))); 72 72 connect(gVBoxEvents, SIGNAL(sigSnapshotTake(QString, QString)), this, SLOT(sltHandleMachineUpdate(QString))); 73 connect(gVBoxEvents, SIGNAL(sigSnapshotDelete(QString, QString)), this, SLOT(sltHandle MachineUpdate(QString)));73 connect(gVBoxEvents, SIGNAL(sigSnapshotDelete(QString, QString)), this, SLOT(sltHandleSnapshotDeleted(QString, QString))); 74 74 connect(gVBoxEvents, SIGNAL(sigSnapshotChange(QString, QString)), this, SLOT(sltHandleMachineUpdate(QString))); 75 75 connect(gVBoxEvents, SIGNAL(sigMachineRegistered(QString, bool)), this, SLOT(sltHandleMachineRegistration(QString, bool))); … … 177 177 /* Gather previously used UIMedium IDs: */ 178 178 QStringList previousUIMediumIDs; 179 calculateCachedUsage(strMachineID, previousUIMediumIDs, true );179 calculateCachedUsage(strMachineID, previousUIMediumIDs, true /* take into account current state only */); 180 180 LogRel(("UIMediumEnumerator: Old usage: %s\n", 181 181 previousUIMediumIDs.isEmpty() ? "<empty>" : previousUIMediumIDs.join(", ").toAscii().constData())); … … 243 243 fRegistered ? "registration" : "unregistration", 244 244 strMachineID.toAscii().constData())); 245 } 246 247 void UIMediumEnumerator::sltHandleSnapshotDeleted(QString strMachineID, QString strSnapshotID) 248 { 249 LogRel(("UIMediumEnumerator: Snapshot-deleted event received, Machine ID = {%s}, Snapshot ID = {%s}\n", 250 strMachineID.toAscii().constData(), strSnapshotID.toAscii().constData())); 251 252 /* Gather previously used UIMedium IDs: */ 253 QStringList previousUIMediumIDs; 254 calculateCachedUsage(strMachineID, previousUIMediumIDs, false /* take into account current state only */); 255 LogRel(("UIMediumEnumerator: Old usage: %s\n", 256 previousUIMediumIDs.isEmpty() ? "<empty>" : previousUIMediumIDs.join(", ").toAscii().constData())); 257 258 /* Gather currently used CMediums and their IDs: */ 259 CMediumMap currentCMediums; 260 QStringList currentCMediumIDs; 261 calculateActualUsage(strMachineID, currentCMediums, currentCMediumIDs); 262 LogRel(("UIMediumEnumerator: New usage: %s\n", 263 currentCMediumIDs.isEmpty() ? "<empty>" : currentCMediumIDs.join(", ").toAscii().constData())); 264 265 /* Update everything: */ 266 recacheFromCachedUsage(previousUIMediumIDs); 267 recacheFromActualUsage(currentCMediums, currentCMediumIDs); 268 269 LogRel(("UIMediumEnumerator: Snapshot-deleted event processed, Machine ID = {%s}, Snapshot ID = {%s}\n", 270 strMachineID.toAscii().constData(), strSnapshotID.toAscii().constData())); 245 271 } 246 272 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h
r49646 r49647 70 70 /** Handles machine-[un]registration events. */ 71 71 void sltHandleMachineRegistration(QString strMachineID, bool fRegistered); 72 /** Handles snapshot-deleted events. */ 73 void sltHandleSnapshotDeleted(QString strMachineID, QString strSnapshotID); 72 74 73 75 /* Handler: Medium-enumeration stuff: */
Note:
See TracChangeset
for help on using the changeset viewer.

