VirtualBox

Changeset 41017 in vbox


Ignore:
Timestamp:
Apr 20, 2012 9:56:33 PM (13 years ago)
Author:
vboxsync
Message:

VBoxCOM, FE/Qt: better error message of the global configuration directory is not accessible

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r40890 r41017  
    601601}
    602602
     603void UIMessageCenter::cannotInitUserHome(const QString &strUserHome)
     604{
     605    message(0, Critical,
     606        tr("<p>Failed to initialize COM because the VirtualBox global "
     607           "configuration directory <b><nobr>%1</nobr></b> is not accessible. "
     608           "Please check the permissions of this directory and of its parent "
     609           "directory.</p>"
     610           "<p>The application will now terminate.</p>").arg(strUserHome),
     611        formatErrorInfo(COMErrorInfo()));
     612}
     613
    603614void UIMessageCenter::cannotCreateVirtualBox(const CVirtualBox &vbox)
    604615{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r40870 r41017  
    181181
    182182    void cannotInitCOM(HRESULT rc);
     183    void cannotInitUserHome(const QString &strUserHome);
    183184    void cannotCreateVirtualBox(const CVirtualBox &vbox);
    184185
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r40864 r41017  
    47774777    if (FAILED (rc))
    47784778    {
    4779         msgCenter().cannotInitCOM (rc);
     4779        if (rc == NS_ERROR_FILE_ACCESS_DENIED)
     4780        {
     4781            char szHome[RTPATH_MAX] = "";
     4782            com::GetVBoxUserHomeDirectory(szHome, sizeof(szHome));
     4783            msgCenter().cannotInitUserHome(QString(szHome));
     4784        }
     4785        else
     4786            msgCenter().cannotInitCOM(rc);
    47804787        return;
    47814788    }
  • trunk/src/VBox/Main/glue/initterm.cpp

    r35640 r41017  
    343343
    344344    int vrc = GetVBoxUserHomeDirectory(szCompReg, sizeof(szCompReg));
     345    if (vrc == VERR_ACCESS_DENIED)
     346        return NS_ERROR_FILE_ACCESS_DENIED;
    345347    AssertRCReturn(vrc, NS_ERROR_FAILURE);
    346348    strcpy(szXptiDat, szCompReg);
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