- Timestamp:
- Oct 8, 2014 4:24:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r52998 r52999 1027 1027 /* Create action-pool: */ 1028 1028 m_pActionPool = UIActionPool::create(UIActionPoolType_Runtime); 1029 m_pActionPool->toRuntime()->setSession(this); 1029 AssertPtrReturnVoid(actionPool()); 1030 { 1031 /* Configure action-pool: */ 1032 actionPool()->toRuntime()->setSession(this); 1030 1033 1031 1034 /* Get host/machine: */ … … 1109 1112 } 1110 1113 #endif /* Q_WS_MAC */ 1114 } 1111 1115 } 1112 1116 … … 1258 1262 1259 1263 /* Remember if guest should autoresize: */ 1260 gEDataManager->setGuestScreenAutoResizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid()); 1264 if (actionPool()) 1265 { 1266 const QAction *pGuestAutoresizeSwitch = actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize); 1267 gEDataManager->setGuestScreenAutoResizeEnabled(pGuestAutoresizeSwitch->isChecked(), vboxGlobal().managedVMUuid()); 1268 } 1261 1269 1262 1270 #ifndef Q_WS_MAC … … 1273 1281 for (int i = m_frameBufferVector.size() - 1; i >= 0; --i) 1274 1282 { 1275 UIFrameBuffer *pF b= m_frameBufferVector[i];1276 if (pF b)1283 UIFrameBuffer *pFrameBuffer = m_frameBufferVector[i]; 1284 if (pFrameBuffer) 1277 1285 { 1278 1286 /* Mark framebuffer as unused: */ 1279 pF b->setMarkAsUnused(true);1287 pFrameBuffer->setMarkAsUnused(true); 1280 1288 /* Detach framebuffer from Display: */ 1281 1289 CDisplay display = session().GetConsole().GetDisplay(); … … 1291 1299 void UISession::cleanupConsoleEventHandlers() 1292 1300 { 1293 /* Destroy console event-handler: */ 1301 /* Destroy console event-handler if necessary: */ 1302 if (gConsoleEvents) 1294 1303 UIConsoleEventHandler::destroy(); 1295 1304 } … … 1306 1315 { 1307 1316 #ifdef Q_WS_MAC 1317 /* Destroy Mac OS X menu-bar: */ 1308 1318 delete m_pMenuBar; 1309 1319 m_pMenuBar = 0; 1310 1320 #endif /* Q_WS_MAC */ 1311 1321 1312 /* Destroy action-pool: */ 1313 UIActionPool::destroy(m_pActionPool); 1322 /* Destroy action-pool if necessary: */ 1323 if (actionPool()) 1324 UIActionPool::destroy(actionPool()); 1314 1325 } 1315 1326
Note:
See TracChangeset
for help on using the changeset viewer.