VirtualBox

Changeset 69538 in vbox


Ignore:
Timestamp:
Oct 31, 2017 11:48:08 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118885
Message:

FE/Qt: bugref:8901: Snapshot Pane: Cleanup error handling a bit, no error icon for take-snapshot case, only for edit-snapshot case.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotDetailsWidget.cpp

    r69260 r69538  
    521521    , m_pLayoutDetails(0)
    522522    , m_pScrollAreaDetails(0)
    523     , m_fSnapshotNameEdited(false)
    524523{
    525524    /* Prepare: */
     
    529528void UISnapshotDetailsWidget::setData(const CMachine &comMachine)
    530529{
    531     /* Reset defaults: */
    532     m_fSnapshotNameEdited = false;
    533 
    534530    /* Cache old/new data: */
    535531    m_oldData = UIDataSnapshot();
     
    548544void UISnapshotDetailsWidget::setData(const UIDataSnapshot &data, const CSnapshot &comSnapshot)
    549545{
    550     /* Reset defaults: */
    551     m_fSnapshotNameEdited = false;
    552 
    553546    /* Cache old/new data: */
    554547    m_oldData = data;
     
    567560void UISnapshotDetailsWidget::clearData()
    568561{
    569     /* Reset defaults: */
    570     m_fSnapshotNameEdited = false;
    571 
    572562    /* Reset old/new data: */
    573563    m_oldData = UIDataSnapshot();
     
    662652            setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Ok)->shortcut().toString()));
    663653    }
    664 }
    665 
    666 void UISnapshotDetailsWidget::sltHandleNameEdit()
    667 {
    668     m_fSnapshotNameEdited = true;
    669654}
    670655
     
    784769                    policy.setHorizontalStretch(1);
    785770                    m_pEditorName->setSizePolicy(policy);
    786                     connect(m_pEditorName, &QLineEdit::textEdited,
    787                             this, &UISnapshotDetailsWidget::sltHandleNameEdit);
    788771                    connect(m_pEditorName, &QLineEdit::textChanged,
    789772                            this, &UISnapshotDetailsWidget::sltHandleNameChange);
     
    10921075    {
    10931076        const bool fError = m_newData.m_strName.isEmpty();
    1094         m_pErrorPaneName->setVisible(fError && m_fSnapshotNameEdited);
     1077        m_pErrorPaneName->setVisible(fError && m_comMachine.isNull());
    10951078    }
    10961079    if (!pWidget || pWidget == m_pErrorPaneDescription)
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotDetailsWidget.h

    r68764 r69538  
    108108private slots:
    109109
    110     /** Handles snapshot name edit. */
    111     void sltHandleNameEdit();
    112110    /** Handles snapshot name change. */
    113111    void sltHandleNameChange();
     
    236234    /** Holds the details element map. */
    237235    QMap<DetailsElementType, UISnapshotDetailsElement*> m_details;
    238 
    239     /** Holds whether the snapshot name was edited. */
    240     bool  m_fSnapshotNameEdited;
    241236};
    242237
Note: See TracChangeset for help on using the changeset viewer.

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