Changeset 71310 in vbox
- Timestamp:
- Mar 13, 2018 9:39:12 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestControlFileManager.cpp
r71298 r71310 395 395 { 396 396 connect(m_pQtGuestListener->getWrapped(), &UIMainEventListener::sigGuestSessionUnregistered, 397 this, &UIGuestControlFileManager::sltGuestSessionUnregistered , Qt::DirectConnection);397 this, &UIGuestControlFileManager::sltGuestSessionUnregistered); 398 398 } 399 399 if (m_pSessionCreateWidget) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestControlTreeItem.cpp
r71191 r71310 221 221 void UIGuestSessionTreeItem::prepareConnections() 222 222 { 223 224 qRegisterMetaType<CGuestProcess>(); 223 225 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigGuestSessionStatedChanged, 224 this, &UIGuestSessionTreeItem::sltGuestSessionUpdated , Qt::DirectConnection);226 this, &UIGuestSessionTreeItem::sltGuestSessionUpdated); 225 227 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigGuestProcessRegistered, 226 this, &UIGuestSessionTreeItem::sltGuestProcessRegistered , Qt::DirectConnection);228 this, &UIGuestSessionTreeItem::sltGuestProcessRegistered); 227 229 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigGuestProcessUnregistered, 228 this, &UIGuestSessionTreeItem::sltGuestProcessUnregistered , Qt::DirectConnection);230 this, &UIGuestSessionTreeItem::sltGuestProcessUnregistered); 229 231 } 230 232 … … 275 277 void UIGuestSessionTreeItem::addGuestProcess(CGuestProcess guestProcess) 276 278 { 279 /* Dont add the tree items for already terminated or currently being terminated 280 guest processes: */ 281 KProcessStatus processStatus = guestProcess.GetStatus(); 282 if (processStatus != KProcessStatus_Starting && 283 processStatus != KProcessStatus_Started && 284 processStatus != KProcessStatus_Paused) 285 return; 286 277 287 UIGuestProcessTreeItem *newItem = new UIGuestProcessTreeItem(this, guestProcess); 278 288 connect(newItem, &UIGuestProcessTreeItem::sigGuestProcessErrorText, … … 329 339 void UIGuestProcessTreeItem::prepareConnections() 330 340 { 341 qRegisterMetaType<CGuestProcessStateChangedEvent>(); 331 342 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigGuestProcessStateChanged, 332 this, &UIGuestProcessTreeItem::sltGuestProcessUpdated , Qt::DirectConnection);343 this, &UIGuestProcessTreeItem::sltGuestProcessUpdated); 333 344 } 334 345 … … 359 370 CVirtualBoxErrorInfo cErrorInfo = cEvent.GetError(); 360 371 if (cErrorInfo.isOk() && cErrorInfo.GetResultCode() != S_OK) 361 { 362 /* For some reason I am yet to find this emit is not working. 363 Thus we are calling the parent's function directly: */ 364 //emit sigGuestProcessErrorText(cErrorInfo.GetText()); 365 UIGuestSessionTreeItem *sessionParent = dynamic_cast<UIGuestSessionTreeItem*>(QTreeWidgetItem::parent()); 366 if (sessionParent) 367 { 368 sessionParent->errorString(cErrorInfo.GetText().toStdString().c_str()); 369 } 370 } 372 emit sigGuestProcessErrorText(cErrorInfo.GetText()); 373 371 374 } 372 375 setColumnText(); 376 KProcessStatus processStatus = m_comGuestProcess.GetStatus(); 377 if (processStatus != KProcessStatus_Starting && 378 processStatus != KProcessStatus_Started && 379 processStatus != KProcessStatus_Paused) 380 { 381 this->deleteLater(); 382 } 373 383 } 374 384 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestControlWidget.cpp
r71191 r71310 251 251 { 252 252 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigGuestSessionRegistered, 253 this, &UIGuestControlWidget::sltGuestSessionRegistered , Qt::DirectConnection);253 this, &UIGuestControlWidget::sltGuestSessionRegistered); 254 254 connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigGuestSessionUnregistered, 255 this, &UIGuestControlWidget::sltGuestSessionUnregistered , Qt::DirectConnection);255 this, &UIGuestControlWidget::sltGuestSessionUnregistered); 256 256 } 257 257 }
Note:
See TracChangeset
for help on using the changeset viewer.