- Timestamp:
- Nov 6, 2018 1:28:12 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126389
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r75222 r75284 840 840 src/runtime/information/UIVMInformationDialog.h \ 841 841 src/guestctrl/UIGuestControlConsole.h \ 842 src/guestctrl/UIGuestControlDefs.h \ 842 843 src/guestctrl/UIGuestControlFileManager.h \ 843 844 src/guestctrl/UIGuestControlFileManagerDialog.h \ … … 995 996 src/runtime/information/UIVMInformationDialog.h \ 996 997 src/guestctrl/UIGuestControlConsole.h \ 998 src/guestctrl/UIGuestControlDefs.h \ 997 999 src/guestctrl/UIGuestControlFileManager.h \ 998 1000 src/guestctrl/UIGuestControlFileManagerDialog.h \ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlDefs.h
r75279 r75284 16 16 */ 17 17 18 #ifndef ___UI SettingsDefs_h___19 #define ___UI SettingsDefs_h___18 #ifndef ___UIGuestControlDefs_h___ 19 #define ___UIGuestControlDefs_h___ 20 20 21 /* Qt includes: */ 22 #include <QMap> 23 #include <QPair> 24 #include <QString> 25 26 /* GUI includes: */ 27 #include "UILibraryDefs.h" 28 29 /* COM includes: */ 30 #include "COMEnums.h" 31 32 33 /** Settings configuration namespace. */ 34 namespace UISettingsDefs 21 enum FileManagerLogType 35 22 { 36 /** Configuration access levels. */ 37 enum ConfigurationAccessLevel 38 { 39 /** Configuration is not accessible. */ 40 ConfigurationAccessLevel_Null, 41 /** Configuration is accessible fully. */ 42 ConfigurationAccessLevel_Full, 43 /** Configuration is accessible partially, machine is in @a powered_off state. */ 44 ConfigurationAccessLevel_Partial_PoweredOff, 45 /** Configuration is accessible partially, machine is in @a saved state. */ 46 ConfigurationAccessLevel_Partial_Saved, 47 /** Configuration is accessible partially, machine is in @a running state. */ 48 ConfigurationAccessLevel_Partial_Running, 49 }; 50 51 /** Determines configuration access level for passed @a enmSessionState and @a enmMachineState. */ 52 SHARED_LIBRARY_STUFF ConfigurationAccessLevel configurationAccessLevel(KSessionState enmSessionState, 53 KMachineState enmMachineState); 54 } 55 56 57 /** Template organizing settings object cache: */ 58 template <class CacheData> class UISettingsCache 59 { 60 public: 61 62 /** Constructs empty object cache. */ 63 UISettingsCache() { m_value = qMakePair(CacheData(), CacheData()); } 64 65 /** Destructs cache object. */ 66 virtual ~UISettingsCache() { /* Makes MSC happy */ } 67 68 /** Returns the NON-modifiable REFERENCE to the initial cached data. */ 69 const CacheData &base() const { return m_value.first; } 70 /** Returns the NON-modifiable REFERENCE to the current cached data. */ 71 const CacheData &data() const { return m_value.second; } 72 /** Returns the modifiable REFERENCE to the initial cached data. */ 73 CacheData &base() { return m_value.first; } 74 /** Returns the modifiable REFERENCE to the current cached data. */ 75 CacheData &data() { return m_value.second; } 76 77 /** Returns whether the cached object was removed. 78 * We assume that cached object was removed if 79 * initial data was set but current data was NOT set. */ 80 virtual bool wasRemoved() const { return base() != CacheData() && data() == CacheData(); } 81 82 /** Returns whether the cached object was created. 83 * We assume that cached object was created if 84 * initial data was NOT set but current data was set. */ 85 virtual bool wasCreated() const { return base() == CacheData() && data() != CacheData(); } 86 87 /** Returns whether the cached object was updated. 88 * We assume that cached object was updated if 89 * current and initial data were both set and not equal to each other. */ 90 virtual bool wasUpdated() const { return base() != CacheData() && data() != CacheData() && data() != base(); } 91 92 /** Returns whether the cached object was changed. 93 * We assume that cached object was changed if 94 * it was 1. removed, 2. created or 3. updated. */ 95 virtual bool wasChanged() const { return wasRemoved() || wasCreated() || wasUpdated(); } 96 97 /** Defines initial cached object data. */ 98 void cacheInitialData(const CacheData &initialData) { m_value.first = initialData; } 99 /** Defines current cached object data: */ 100 void cacheCurrentData(const CacheData ¤tData) { m_value.second = currentData; } 101 102 /** Resets the initial and the current object data to be both empty. */ 103 void clear() { m_value.first = CacheData(); m_value.second = CacheData(); } 104 105 private: 106 107 /** Holds the cached object data. */ 108 QPair<CacheData, CacheData> m_value; 23 FileManagerLogType_Info, 24 FileManagerLogType_Error, 25 FileManagerLogType_Max 109 26 }; 110 27 111 112 /** Template organizing settings object cache with children. */ 113 template <class ParentCacheData, class ChildCacheData> class UISettingsCachePool : public UISettingsCache<ParentCacheData> 114 { 115 public: 116 117 /** Children map. */ 118 typedef QMap<QString, ChildCacheData> UISettingsCacheChildMap; 119 /** Children map iterator. */ 120 typedef QMapIterator<QString, ChildCacheData> UISettingsCacheChildIterator; 121 122 /** Constructs empty object cache. */ 123 UISettingsCachePool() : UISettingsCache<ParentCacheData>() {} 124 125 /** Returns children count. */ 126 int childCount() const { return m_children.size(); } 127 /** Returns the modifiable REFERENCE to the child cached data. */ 128 ChildCacheData &child(const QString &strChildKey) { return m_children[strChildKey]; } 129 /** Wraps method above to return the modifiable REFERENCE to the child cached data. */ 130 ChildCacheData &child(int iIndex) { return child(indexToKey(iIndex)); } 131 /** Returns the NON-modifiable COPY to the child cached data. */ 132 const ChildCacheData child(const QString &strChildKey) const { return m_children[strChildKey]; } 133 /** Wraps method above to return the NON-modifiable COPY to the child cached data. */ 134 const ChildCacheData child(int iIndex) const { return child(indexToKey(iIndex)); } 135 136 /** Returns whether the cache was updated. 137 * We assume that cache object was updated if current and 138 * initial data were both set and not equal to each other. 139 * Takes into account all the children. */ 140 bool wasUpdated() const 141 { 142 /* First of all, cache object is considered to be updated if parent data was updated: */ 143 bool fWasUpdated = UISettingsCache<ParentCacheData>::wasUpdated(); 144 /* If parent data was NOT updated but also was NOT created or removed too 145 * (e.j. was NOT changed at all), we have to check children too: */ 146 if (!fWasUpdated && !UISettingsCache<ParentCacheData>::wasRemoved() && !UISettingsCache<ParentCacheData>::wasCreated()) 147 { 148 for (int iChildIndex = 0; !fWasUpdated && iChildIndex < childCount(); ++iChildIndex) 149 if (child(iChildIndex).wasChanged()) 150 fWasUpdated = true; 151 } 152 return fWasUpdated; 153 } 154 155 /** Resets the initial and the current one data to be both empty. 156 * Removes all the children. */ 157 void clear() 158 { 159 UISettingsCache<ParentCacheData>::clear(); 160 m_children.clear(); 161 } 162 163 private: 164 165 /** Returns QString representation of passed @a iIndex. */ 166 QString indexToKey(int iIndex) const 167 { 168 UISettingsCacheChildIterator childIterator(m_children); 169 for (int iChildIndex = 0; childIterator.hasNext(); ++iChildIndex) 170 { 171 childIterator.next(); 172 if (iChildIndex == iIndex) 173 return childIterator.key(); 174 } 175 return QString("%1").arg(iIndex, 8 /* up to 8 digits */, 10 /* base */, QChar('0') /* filler */); 176 } 177 178 /** Holds the children. */ 179 UISettingsCacheChildMap m_children; 180 }; 181 182 183 /** Template organizing settings object cache with 2 groups of children. */ 184 template <class ParentCacheData, class ChildCacheData1, class ChildCacheData2> class UISettingsCachePoolOfTwo : public UISettingsCache<ParentCacheData> 185 { 186 public: 187 188 /** Group 1 children map. */ 189 typedef QMap<QString, ChildCacheData1> UISettingsCacheChildMap1; 190 /** Group 2 children map. */ 191 typedef QMap<QString, ChildCacheData2> UISettingsCacheChildMap2; 192 /** Group 1 children map iterator. */ 193 typedef QMapIterator<QString, ChildCacheData1> UISettingsCacheChildIterator1; 194 /** Group 2 children map iterator. */ 195 typedef QMapIterator<QString, ChildCacheData2> UISettingsCacheChildIterator2; 196 197 /** Constructs empty cache object. */ 198 UISettingsCachePoolOfTwo() : UISettingsCache<ParentCacheData>() {} 199 200 /** Returns group 1 children count. */ 201 int childCount1() const { return m_children1.size(); } 202 /** Returns the modifiable REFERENCE to the group 1 child cached data. */ 203 ChildCacheData1 &child1(const QString &strChildKey) { return m_children1[strChildKey]; } 204 /** Wraps method above to return the modifiable REFERENCE to the group 1 child cached data. */ 205 ChildCacheData1 &child1(int iIndex) { return child1(indexToKey1(iIndex)); } 206 /** Returns the NON-modifiable COPY to the group 1 child cached data. */ 207 const ChildCacheData1 child1(const QString &strChildKey) const { return m_children1[strChildKey]; } 208 /** Wraps method above to return the NON-modifiable COPY to the group 1 child cached data. */ 209 const ChildCacheData1 child1(int iIndex) const { return child1(indexToKey1(iIndex)); } 210 211 /** Returns group 2 children count. */ 212 int childCount2() const { return m_children2.size(); } 213 /** Returns the modifiable REFERENCE to the group 2 child cached data. */ 214 ChildCacheData2 &child2(const QString &strChildKey) { return m_children2[strChildKey]; } 215 /** Wraps method above to return the modifiable REFERENCE to the group 2 child cached data. */ 216 ChildCacheData2 &child2(int iIndex) { return child2(indexToKey2(iIndex)); } 217 /** Returns the NON-modifiable COPY to the group 2 child cached data. */ 218 const ChildCacheData2 child2(const QString &strChildKey) const { return m_children2[strChildKey]; } 219 /** Wraps method above to return the NON-modifiable COPY to the group 2 child cached data. */ 220 const ChildCacheData2 child2(int iIndex) const { return child2(indexToKey2(iIndex)); } 221 222 /** Returns whether the cache was updated. 223 * We assume that cache object was updated if current and 224 * initial data were both set and not equal to each other. 225 * Takes into account all the children of both groups. */ 226 bool wasUpdated() const 227 { 228 /* First of all, cache object is considered to be updated if parent data was updated: */ 229 bool fWasUpdated = UISettingsCache<ParentCacheData>::wasUpdated(); 230 /* If parent data was NOT updated but also was NOT created or removed too 231 * (e.j. was NOT changed at all), we have to check children too: */ 232 if (!fWasUpdated && !UISettingsCache<ParentCacheData>::wasRemoved() && !UISettingsCache<ParentCacheData>::wasCreated()) 233 { 234 for (int iChildIndex = 0; !fWasUpdated && iChildIndex < childCount1(); ++iChildIndex) 235 if (child1(iChildIndex).wasChanged()) 236 fWasUpdated = true; 237 for (int iChildIndex = 0; !fWasUpdated && iChildIndex < childCount2(); ++iChildIndex) 238 if (child2(iChildIndex).wasChanged()) 239 fWasUpdated = true; 240 } 241 return fWasUpdated; 242 } 243 244 /** Resets the initial and the current one data to be both empty. 245 * Removes all the children from both groups. */ 246 void clear() 247 { 248 UISettingsCache<ParentCacheData>::clear(); 249 m_children1.clear(); 250 m_children2.clear(); 251 } 252 253 private: 254 255 /** Returns QString representation of passed @a iIndex inside group 1. */ 256 QString indexToKey1(int iIndex) const 257 { 258 UISettingsCacheChildIterator1 childIterator(m_children1); 259 for (int iChildIndex = 0; childIterator.hasNext(); ++iChildIndex) 260 { 261 childIterator.next(); 262 if (iChildIndex == iIndex) 263 return childIterator.key(); 264 } 265 return QString("%1").arg(iIndex, 8 /* up to 8 digits */, 10 /* base */, QChar('0') /* filler */); 266 } 267 268 /** Returns QString representation of passed @a iIndex inside group 2. */ 269 QString indexToKey2(int iIndex) const 270 { 271 UISettingsCacheChildIterator2 childIterator(m_children2); 272 for (int iChildIndex = 0; childIterator.hasNext(); ++iChildIndex) 273 { 274 childIterator.next(); 275 if (iChildIndex == iIndex) 276 return childIterator.key(); 277 } 278 return QString("%1").arg(iIndex, 8 /* up to 8 digits */, 10 /* base */, QChar('0') /* filler */); 279 } 280 281 /** Holds the children of group 1. */ 282 UISettingsCacheChildMap1 m_children1; 283 /** Holds the children of group 2. */ 284 UISettingsCacheChildMap2 m_children2; 285 }; 286 287 288 #endif /* !___UISettingsDefs_h___ */ 289 28 #endif /* !___UIGuestControlDefs_h___ */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.cpp
r75247 r75284 289 289 m_pVerticalSplitter->setCollapsible(m_pVerticalSplitter->indexOf(pTopWidget), false); 290 290 m_pVerticalSplitter->setCollapsible(m_pVerticalSplitter->indexOf(m_pLogPanel), false); 291 m_pVerticalSplitter->setStretchFactor(0, 3); 292 m_pVerticalSplitter->setStretchFactor(1, 1); 291 293 } 292 294 … … 390 392 if (!UIGuestControlInterface::isGuestAdditionsAvailable(m_comGuest)) 391 393 { 392 appendLog("Could not find Guest Additions" );394 appendLog("Could not find Guest Additions", FileManagerLogType_Error); 393 395 postSessionClosed(); 394 396 return; … … 396 398 if (strUserName.isEmpty()) 397 399 { 398 appendLog("No user name is given" );400 appendLog("No user name is given", FileManagerLogType_Error); 399 401 return; 400 402 } … … 406 408 if (!m_comGuestSession.isOk()) 407 409 { 408 appendLog("Guest session is not valid" );410 appendLog("Guest session is not valid", FileManagerLogType_Error); 409 411 postSessionClosed(); 410 412 return; … … 417 419 418 420 m_comGuestSession.Close(); 419 appendLog("Guest session is closed" );421 appendLog("Guest session is closed", FileManagerLogType_Info); 420 422 postSessionClosed(); 421 423 } … … 427 429 CVirtualBoxErrorInfo cErrorInfo = cEvent.GetError(); 428 430 if (cErrorInfo.isOk()) 429 appendLog(cErrorInfo.GetText() );431 appendLog(cErrorInfo.GetText(), FileManagerLogType_Error); 430 432 } 431 433 if (m_comGuestSession.GetStatus() == KGuestSessionStatus_Started) … … 436 438 else 437 439 { 438 appendLog("Session status has changed" );439 } 440 } 441 442 void UIGuestControlFileManager::sltReceieveLogOutput(QString strOutput )443 { 444 appendLog(strOutput );440 appendLog("Session status has changed", FileManagerLogType_Info); 441 } 442 } 443 444 void UIGuestControlFileManager::sltReceieveLogOutput(QString strOutput, FileManagerLogType eLogType) 445 { 446 appendLog(strOutput, eLogType); 445 447 } 446 448 … … 533 535 if (!m_comGuestSession.isOk()) 534 536 { 535 appendLog(UIErrorString::formatErrorInfo(m_comGuestSession) );537 appendLog(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 536 538 return false; 537 539 } 538 appendLog("Guest session has been created" );540 appendLog("Guest session has been created", FileManagerLogType_Info); 539 541 if (m_pSessionPanel) 540 542 m_pSessionPanel->switchSessionCloseMode(); … … 555 557 /* Wait session to start. For some reason we cannot get GuestSessionStatusChanged event 556 558 consistently. So we wait: */ 557 appendLog("Waiting the session to start" );559 appendLog("Waiting the session to start", FileManagerLogType_Info); 558 560 const ULONG waitTimeout = 2000; 559 561 KGuestSessionWaitResult waitResult = m_comGuestSession.WaitFor(KGuestSessionWaitForFlag_Start, waitTimeout); 560 562 if (waitResult != KGuestSessionWaitResult_Start) 561 563 { 562 appendLog("The session did not start" );564 appendLog("The session did not start", FileManagerLogType_Error); 563 565 sltCloseSession(); 564 566 return false; … … 696 698 } 697 699 698 void UIGuestControlFileManager::appendLog(const QString &strLog )700 void UIGuestControlFileManager::appendLog(const QString &strLog, FileManagerLogType eLogType) 699 701 { 700 702 if (!m_pLogPanel) 701 703 return; 702 m_pLogPanel->appendLog(strLog );704 m_pLogPanel->appendLog(strLog, eLogType); 703 705 } 704 706 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.h
r75268 r75284 32 32 #include "QIManagerDialog.h" 33 33 #include "QIWithRetranslateUI.h" 34 #include "UIGuestControlDefs.h" 34 35 #include "UIMainEventListener.h" 35 36 … … 46 47 class UIGuestControlInterface; 47 48 class UIGuestControlFileManagerPanel; 49 class UIGuestControlFileManagerLogPanel; 48 50 class UIGuestControlFileManagerSessionPanel; 49 class UIGuestControlFileManagerLogPanel;50 51 class UIGuestControlFileManagerSettingsPanel; 51 52 class UIGuestFileTable; … … 103 104 void sltCloseSession(); 104 105 void sltGuestSessionStateChanged(const CGuestSessionStateChangedEvent &cEvent); 105 void sltReceieveLogOutput(QString strOutput );106 void sltReceieveLogOutput(QString strOutput, FileManagerLogType eLogType); 106 107 void sltCopyGuestToHost(); 107 108 void sltCopyHostToGuest(); … … 142 143 143 144 template<typename T> 144 QStringList getFsObjInfoStringList(const T &fsObjectInfo) const;145 void appendLog(const QString &strLog);146 const int 147 CGuest 148 CGuestSession 149 QVBoxLayout 150 QSplitter 151 UIToolBar 145 QStringList getFsObjInfoStringList(const T &fsObjectInfo) const; 146 void appendLog(const QString &strLog, FileManagerLogType eLogType); 147 const int m_iMaxRecursionDepth; 148 CGuest m_comGuest; 149 CGuestSession m_comGuestSession; 150 QVBoxLayout *m_pMainLayout; 151 QSplitter *m_pVerticalSplitter; 152 UIToolBar *m_pToolBar; 152 153 153 154 //UIFileOperationsList *m_pFileOperationsList; 154 UIGuestControlConsole 155 UIGuestControlInterface 156 UIGuestFileTable 157 UIHostFileTable 155 UIGuestControlConsole *m_pConsole; 156 UIGuestControlInterface *m_pControlInterface; 157 UIGuestFileTable *m_pGuestFileTable; 158 UIHostFileTable *m_pHostFileTable; 158 159 159 160 ComObjPtr<UIMainEventListenerImpl> m_pQtGuestListener; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerLogPanel.cpp
r75250 r75284 96 96 } 97 97 98 void UIGuestControlFileManagerLogPanel::appendLog(const QString &strLog )98 void UIGuestControlFileManagerLogPanel::appendLog(const QString &strLog, FileManagerLogType) 99 99 { 100 100 if (!m_pLogTextEdit) -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerLogPanel.h
r75224 r75284 20 20 21 21 /* GUI includes: */ 22 #include "UIGuestControlDefs.h" 22 23 #include "UIGuestControlFileManagerPanel.h" 23 24 … … 34 35 35 36 UIGuestControlFileManagerLogPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent); 36 void appendLog(const QString &str );37 void appendLog(const QString &str, FileManagerLogType); 37 38 virtual QString panelName() const /* override */; 38 39 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileModel.cpp
r74947 r75284 112 112 { 113 113 if (m_pParent) 114 m_pParent->emitLogOutput(QString(item->path()).append(" could not be renamed") );114 m_pParent->emitLogOutput(QString(item->path()).append(" could not be renamed"), FileManagerLogType_Error); 115 115 } 116 116 return true; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp
r75220 r75284 644 644 } 645 645 646 void UIGuestControlFileTable::emitLogOutput(const QString& strOutput )647 { 648 emit sigLogOutput(strOutput );646 void UIGuestControlFileTable::emitLogOutput(const QString& strOutput, FileManagerLogType eLogType) 647 { 648 emit sigLogOutput(strOutput, eLogType); 649 649 } 650 650 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h
r75220 r75284 33 33 #include "QITableView.h" 34 34 #include "QIWithRetranslateUI.h" 35 #include "UIGuestControlDefs.h" 35 36 36 37 /* Forward declarations: */ … … 244 245 signals: 245 246 246 void sigLogOutput(QString );247 void sigLogOutput(QString strLog, FileManagerLogType eLogType); 247 248 248 249 public: … … 252 253 /** Deletes all the tree nodes */ 253 254 void reset(); 254 void emitLogOutput(const QString& strOutput );255 void emitLogOutput(const QString& strOutput, FileManagerLogType eLogType); 255 256 /** Returns the path of the rootIndex */ 256 257 QString currentDirectoryPath() const; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp
r75202 r75284 184 184 if (!m_comGuestSession.isOk()) 185 185 { 186 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );186 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 187 187 return; 188 188 } … … 249 249 if (!m_comGuestSession.isOk()) 250 250 { 251 emit sigLogOutput(QString(item->path()).append(" could not be deleted") );252 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );251 emit sigLogOutput(QString(item->path()).append(" could not be deleted"), FileManagerLogType_Error); 252 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 253 253 } 254 254 } … … 267 267 if (!m_comGuestSession.isOk()) 268 268 { 269 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );269 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 270 270 return; 271 271 } … … 285 285 if (!m_comGuestSession.isOk()) 286 286 { 287 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );287 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 288 288 return false; 289 289 } … … 302 302 if (!m_comGuestSession.isOk()) 303 303 { 304 emit sigLogOutput(newDirectoryPath.append(" could not be created") );305 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );304 emit sigLogOutput(newDirectoryPath.append(" could not be created"), FileManagerLogType_Error); 305 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 306 306 return false; 307 307 } 308 emit sigLogOutput(newDirectoryPath.append(" has been created") );308 emit sigLogOutput(newDirectoryPath.append(" has been created"), FileManagerLogType_Info); 309 309 return true; 310 310 } … … 318 318 if (!m_comGuestSession.isOk()) 319 319 { 320 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );320 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 321 321 //msgCenter().cannotRemoveMachine(machine); 322 322 return; … … 326 326 if (!progress.isOk() || progress.GetResultCode() != 0) 327 327 { 328 emit sigLogOutput(UIErrorString::formatErrorInfo(progress) );328 emit sigLogOutput(UIErrorString::formatErrorInfo(progress), FileManagerLogType_Error); 329 329 return; 330 330 } … … 343 343 if (!m_comGuestSession.isOk()) 344 344 { 345 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );345 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 346 346 return; 347 347 } … … 350 350 if (!progress.isOk() || progress.GetResultCode() != 0) 351 351 { 352 emit sigLogOutput(UIErrorString::formatErrorInfo(progress) );352 emit sigLogOutput(UIErrorString::formatErrorInfo(progress), FileManagerLogType_Error); 353 353 return; 354 354 } … … 399 399 if (!m_comGuestSession.isOk()) 400 400 { 401 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );401 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 402 402 return QString(); 403 403 } … … 438 438 if (!m_comGuestSession.isOk()) 439 439 { 440 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession) );440 emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error); 441 441 continue; 442 442 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp
r75202 r75284 271 271 272 272 if (!deleteSuccess) 273 emit sigLogOutput(QString(item->path()).append(" could not be deleted") );273 emit sigLogOutput(QString(item->path()).append(" could not be deleted"), FileManagerLogType_Error); 274 274 } 275 275 … … 305 305 if (!parentDir.mkdir(directoryName)) 306 306 { 307 emit sigLogOutput(UIPathOperations::mergePaths(path, directoryName).append(" could not be created") );307 emit sigLogOutput(UIPathOperations::mergePaths(path, directoryName).append(" could not be created"), FileManagerLogType_Error); 308 308 return false; 309 309 }
Note:
See TracChangeset
for help on using the changeset viewer.