Changeset 69538 in vbox
- Timestamp:
- Oct 31, 2017 11:48:08 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 118885
- 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 521 521 , m_pLayoutDetails(0) 522 522 , m_pScrollAreaDetails(0) 523 , m_fSnapshotNameEdited(false)524 523 { 525 524 /* Prepare: */ … … 529 528 void UISnapshotDetailsWidget::setData(const CMachine &comMachine) 530 529 { 531 /* Reset defaults: */532 m_fSnapshotNameEdited = false;533 534 530 /* Cache old/new data: */ 535 531 m_oldData = UIDataSnapshot(); … … 548 544 void UISnapshotDetailsWidget::setData(const UIDataSnapshot &data, const CSnapshot &comSnapshot) 549 545 { 550 /* Reset defaults: */551 m_fSnapshotNameEdited = false;552 553 546 /* Cache old/new data: */ 554 547 m_oldData = data; … … 567 560 void UISnapshotDetailsWidget::clearData() 568 561 { 569 /* Reset defaults: */570 m_fSnapshotNameEdited = false;571 572 562 /* Reset old/new data: */ 573 563 m_oldData = UIDataSnapshot(); … … 662 652 setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Ok)->shortcut().toString())); 663 653 } 664 }665 666 void UISnapshotDetailsWidget::sltHandleNameEdit()667 {668 m_fSnapshotNameEdited = true;669 654 } 670 655 … … 784 769 policy.setHorizontalStretch(1); 785 770 m_pEditorName->setSizePolicy(policy); 786 connect(m_pEditorName, &QLineEdit::textEdited,787 this, &UISnapshotDetailsWidget::sltHandleNameEdit);788 771 connect(m_pEditorName, &QLineEdit::textChanged, 789 772 this, &UISnapshotDetailsWidget::sltHandleNameChange); … … 1092 1075 { 1093 1076 const bool fError = m_newData.m_strName.isEmpty(); 1094 m_pErrorPaneName->setVisible(fError && m_ fSnapshotNameEdited);1077 m_pErrorPaneName->setVisible(fError && m_comMachine.isNull()); 1095 1078 } 1096 1079 if (!pWidget || pWidget == m_pErrorPaneDescription) -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotDetailsWidget.h
r68764 r69538 108 108 private slots: 109 109 110 /** Handles snapshot name edit. */111 void sltHandleNameEdit();112 110 /** Handles snapshot name change. */ 113 111 void sltHandleNameChange(); … … 236 234 /** Holds the details element map. */ 237 235 QMap<DetailsElementType, UISnapshotDetailsElement*> m_details; 238 239 /** Holds whether the snapshot name was edited. */240 bool m_fSnapshotNameEdited;241 236 }; 242 237
Note:
See TracChangeset
for help on using the changeset viewer.