VirtualBox

Changeset 75284 in vbox for trunk/src


Ignore:
Timestamp:
Nov 6, 2018 1:28:12 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126389
Message:

FE/Qt: bugref:6699. Modify file manager log related functions to enable different log types

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r75222 r75284  
    840840        src/runtime/information/UIVMInformationDialog.h \
    841841        src/guestctrl/UIGuestControlConsole.h \
     842        src/guestctrl/UIGuestControlDefs.h \
    842843        src/guestctrl/UIGuestControlFileManager.h \
    843844        src/guestctrl/UIGuestControlFileManagerDialog.h \
     
    995996        src/runtime/information/UIVMInformationDialog.h \
    996997        src/guestctrl/UIGuestControlConsole.h \
     998        src/guestctrl/UIGuestControlDefs.h \
    997999        src/guestctrl/UIGuestControlFileManager.h \
    9981000        src/guestctrl/UIGuestControlFileManagerDialog.h \
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlDefs.h

    r75279 r75284  
    1616 */
    1717
    18 #ifndef ___UISettingsDefs_h___
    19 #define ___UISettingsDefs_h___
     18#ifndef ___UIGuestControlDefs_h___
     19#define ___UIGuestControlDefs_h___
    2020
    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
     21enum FileManagerLogType
    3522{
    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 &currentData) { 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
    10926};
    11027
    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  
    289289    m_pVerticalSplitter->setCollapsible(m_pVerticalSplitter->indexOf(pTopWidget), false);
    290290    m_pVerticalSplitter->setCollapsible(m_pVerticalSplitter->indexOf(m_pLogPanel), false);
     291    m_pVerticalSplitter->setStretchFactor(0, 3);
     292    m_pVerticalSplitter->setStretchFactor(1, 1);
    291293}
    292294
     
    390392    if (!UIGuestControlInterface::isGuestAdditionsAvailable(m_comGuest))
    391393    {
    392         appendLog("Could not find Guest Additions");
     394        appendLog("Could not find Guest Additions", FileManagerLogType_Error);
    393395        postSessionClosed();
    394396        return;
     
    396398    if (strUserName.isEmpty())
    397399    {
    398         appendLog("No user name is given");
     400        appendLog("No user name is given", FileManagerLogType_Error);
    399401        return;
    400402    }
     
    406408    if (!m_comGuestSession.isOk())
    407409    {
    408         appendLog("Guest session is not valid");
     410        appendLog("Guest session is not valid", FileManagerLogType_Error);
    409411        postSessionClosed();
    410412        return;
     
    417419
    418420    m_comGuestSession.Close();
    419     appendLog("Guest session is closed");
     421    appendLog("Guest session is closed", FileManagerLogType_Info);
    420422    postSessionClosed();
    421423}
     
    427429        CVirtualBoxErrorInfo cErrorInfo = cEvent.GetError();
    428430        if (cErrorInfo.isOk())
    429             appendLog(cErrorInfo.GetText());
     431            appendLog(cErrorInfo.GetText(), FileManagerLogType_Error);
    430432    }
    431433    if (m_comGuestSession.GetStatus() == KGuestSessionStatus_Started)
     
    436438    else
    437439    {
    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
     444void UIGuestControlFileManager::sltReceieveLogOutput(QString strOutput, FileManagerLogType eLogType)
     445{
     446    appendLog(strOutput, eLogType);
    445447}
    446448
     
    533535    if (!m_comGuestSession.isOk())
    534536    {
    535         appendLog(UIErrorString::formatErrorInfo(m_comGuestSession));
     537        appendLog(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    536538        return false;
    537539    }
    538     appendLog("Guest session has been created");
     540    appendLog("Guest session has been created", FileManagerLogType_Info);
    539541    if (m_pSessionPanel)
    540542        m_pSessionPanel->switchSessionCloseMode();
     
    555557     /* Wait session to start. For some reason we cannot get GuestSessionStatusChanged event
    556558        consistently. So we wait: */
    557     appendLog("Waiting the session to start");
     559    appendLog("Waiting the session to start", FileManagerLogType_Info);
    558560    const ULONG waitTimeout = 2000;
    559561    KGuestSessionWaitResult waitResult = m_comGuestSession.WaitFor(KGuestSessionWaitForFlag_Start, waitTimeout);
    560562    if (waitResult != KGuestSessionWaitResult_Start)
    561563    {
    562         appendLog("The session did not start");
     564        appendLog("The session did not start", FileManagerLogType_Error);
    563565        sltCloseSession();
    564566        return false;
     
    696698}
    697699
    698 void UIGuestControlFileManager::appendLog(const QString &strLog)
     700void UIGuestControlFileManager::appendLog(const QString &strLog, FileManagerLogType eLogType)
    699701{
    700702    if (!m_pLogPanel)
    701703        return;
    702     m_pLogPanel->appendLog(strLog);
     704    m_pLogPanel->appendLog(strLog, eLogType);
    703705}
    704706
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManager.h

    r75268 r75284  
    3232#include "QIManagerDialog.h"
    3333#include "QIWithRetranslateUI.h"
     34#include "UIGuestControlDefs.h"
    3435#include "UIMainEventListener.h"
    3536
     
    4647class UIGuestControlInterface;
    4748class UIGuestControlFileManagerPanel;
     49class UIGuestControlFileManagerLogPanel;
    4850class UIGuestControlFileManagerSessionPanel;
    49 class UIGuestControlFileManagerLogPanel;
    5051class UIGuestControlFileManagerSettingsPanel;
    5152class UIGuestFileTable;
     
    103104    void sltCloseSession();
    104105    void sltGuestSessionStateChanged(const CGuestSessionStateChangedEvent &cEvent);
    105     void sltReceieveLogOutput(QString strOutput);
     106    void sltReceieveLogOutput(QString strOutput, FileManagerLogType eLogType);
    106107    void sltCopyGuestToHost();
    107108    void sltCopyHostToGuest();
     
    142143
    143144    template<typename T>
    144     QStringList       getFsObjInfoStringList(const T &fsObjectInfo) const;
    145     void              appendLog(const QString &strLog);
    146     const int                   m_iMaxRecursionDepth;
    147     CGuest                      m_comGuest;
    148     CGuestSession               m_comGuestSession;
    149     QVBoxLayout                *m_pMainLayout;
    150     QSplitter                  *m_pVerticalSplitter;
    151     UIToolBar                  *m_pToolBar;
     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;
    152153
    153154    //UIFileOperationsList       *m_pFileOperationsList;
    154     UIGuestControlConsole      *m_pConsole;
    155     UIGuestControlInterface    *m_pControlInterface;
    156     UIGuestFileTable           *m_pGuestFileTable;
    157     UIHostFileTable            *m_pHostFileTable;
     155    UIGuestControlConsole    *m_pConsole;
     156    UIGuestControlInterface  *m_pControlInterface;
     157    UIGuestFileTable         *m_pGuestFileTable;
     158    UIHostFileTable          *m_pHostFileTable;
    158159
    159160    ComObjPtr<UIMainEventListenerImpl> m_pQtGuestListener;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerLogPanel.cpp

    r75250 r75284  
    9696}
    9797
    98 void UIGuestControlFileManagerLogPanel::appendLog(const QString &strLog)
     98void UIGuestControlFileManagerLogPanel::appendLog(const QString &strLog, FileManagerLogType)
    9999{
    100100    if (!m_pLogTextEdit)
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileManagerLogPanel.h

    r75224 r75284  
    2020
    2121/* GUI includes: */
     22#include "UIGuestControlDefs.h"
    2223#include "UIGuestControlFileManagerPanel.h"
    2324
     
    3435
    3536    UIGuestControlFileManagerLogPanel(UIGuestControlFileManager *pManagerWidget, QWidget *pParent);
    36     void appendLog(const QString &str);
     37    void appendLog(const QString &str, FileManagerLogType);
    3738    virtual QString panelName() const /* override */;
    3839
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileModel.cpp

    r74947 r75284  
    112112            {
    113113                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);
    115115            }
    116116            return true;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.cpp

    r75220 r75284  
    644644}
    645645
    646 void UIGuestControlFileTable::emitLogOutput(const QString& strOutput)
    647 {
    648     emit sigLogOutput(strOutput);
     646void UIGuestControlFileTable::emitLogOutput(const QString& strOutput, FileManagerLogType eLogType)
     647{
     648    emit sigLogOutput(strOutput, eLogType);
    649649}
    650650
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlFileTable.h

    r75220 r75284  
    3333#include "QITableView.h"
    3434#include "QIWithRetranslateUI.h"
     35#include "UIGuestControlDefs.h"
    3536
    3637/* Forward declarations: */
     
    244245signals:
    245246
    246     void sigLogOutput(QString);
     247    void sigLogOutput(QString strLog, FileManagerLogType eLogType);
    247248
    248249public:
     
    252253    /** Deletes all the tree nodes */
    253254    void        reset();
    254     void        emitLogOutput(const QString& strOutput);
     255    void        emitLogOutput(const QString& strOutput, FileManagerLogType eLogType);
    255256    /** Returns the path of the rootIndex */
    256257    QString     currentDirectoryPath() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestFileTable.cpp

    r75202 r75284  
    184184    if (!m_comGuestSession.isOk())
    185185    {
    186         emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession));
     186        emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    187187        return;
    188188    }
     
    249249    if (!m_comGuestSession.isOk())
    250250    {
    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);
    253253    }
    254254}
     
    267267    if (!m_comGuestSession.isOk())
    268268    {
    269         emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession));
     269        emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    270270        return;
    271271    }
     
    285285    if (!m_comGuestSession.isOk())
    286286    {
    287         emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession));
     287        emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    288288        return false;
    289289    }
     
    302302    if (!m_comGuestSession.isOk())
    303303    {
    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);
    306306        return false;
    307307    }
    308     emit sigLogOutput(newDirectoryPath.append(" has been created"));
     308    emit sigLogOutput(newDirectoryPath.append(" has been created"), FileManagerLogType_Info);
    309309    return true;
    310310}
     
    318318    if (!m_comGuestSession.isOk())
    319319    {
    320         emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession));
     320        emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    321321        //msgCenter().cannotRemoveMachine(machine);
    322322        return;
     
    326326    if (!progress.isOk() || progress.GetResultCode() != 0)
    327327    {
    328         emit sigLogOutput(UIErrorString::formatErrorInfo(progress));
     328        emit sigLogOutput(UIErrorString::formatErrorInfo(progress), FileManagerLogType_Error);
    329329        return;
    330330    }
     
    343343    if (!m_comGuestSession.isOk())
    344344    {
    345         emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession));
     345        emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    346346        return;
    347347    }
     
    350350    if (!progress.isOk() || progress.GetResultCode() != 0)
    351351    {
    352         emit sigLogOutput(UIErrorString::formatErrorInfo(progress));
     352        emit sigLogOutput(UIErrorString::formatErrorInfo(progress), FileManagerLogType_Error);
    353353        return;
    354354    }
     
    399399        if (!m_comGuestSession.isOk())
    400400        {
    401             emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession));
     401            emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    402402            return QString();
    403403        }
     
    438438        if (!m_comGuestSession.isOk())
    439439        {
    440             emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession));
     440            emit sigLogOutput(UIErrorString::formatErrorInfo(m_comGuestSession), FileManagerLogType_Error);
    441441            continue;
    442442        }
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIHostFileTable.cpp

    r75202 r75284  
    271271
    272272     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);
    274274}
    275275
     
    305305    if (!parentDir.mkdir(directoryName))
    306306    {
    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);
    308308        return false;
    309309    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette