VirtualBox

Changeset 28846 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 27, 2010 4:47:03 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: Problem Reporter: protection from recursively shown warnings. New running VM core: fixed crash during rebooting guest in seamless mode.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

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

    r28838 r28846  
    7373// Helpers
    7474/////////////////////////////////////////////////////////////////////////////
     75
     76bool VBoxProblemReporter::isAlreadyShown(const QString &strWarningName) const
     77{
     78    return m_shownWarnings.contains(strWarningName);
     79}
     80
     81void VBoxProblemReporter::setShownStatus(const QString &strWarningName)
     82{
     83    if (!m_shownWarnings.contains(strWarningName))
     84        m_shownWarnings.append(strWarningName);
     85}
     86
     87void VBoxProblemReporter::clearShownStatus(const QString &strWarningName)
     88{
     89    if (m_shownWarnings.contains(strWarningName))
     90        m_shownWarnings.removeAll(strWarningName);
     91}
    7592
    7693/**
     
    18821899void VBoxProblemReporter::remindAboutMouseIntegration (bool aSupportsAbsolute)
    18831900{
     1901    if (isAlreadyShown("remindAboutMouseIntegration"))
     1902        return;
     1903    setShownStatus("remindAboutMouseIntegration");
     1904
    18841905    static const char *kNames [2] =
    18851906    {
     
    19321953            kNames [0] /* aAutoConfirmId */);
    19331954    }
     1955
     1956    clearShownStatus("remindAboutMouseIntegration");
    19341957}
    19351958
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h

    r28838 r28846  
    7272    // helpers
    7373
     74    bool isAlreadyShown(const QString &strGuardBlockName) const;
     75    void setShownStatus(const QString &strGuardBlockName);
     76    void clearShownStatus(const QString &strGuardBlockName);
     77
    7478    int message (QWidget *aParent, Type aType, const QString &aMessage,
    7579                 const QString &aDetails = QString::null,
     
    411415    static QString doFormatErrorInfo (const COMErrorInfo &aInfo,
    412416                                      HRESULT aWrapperRC = S_OK);
     417
     418    QStringList m_shownWarnings;
    413419};
    414420
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