Changeset 105585 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 5, 2024 2:25:13 PM (7 months ago)
- svn:sync-xref-src-repo-rev:
- 164262
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp
r105583 r105585 5 5 6 6 /* 7 * Copyright (C) 2009-202 4Oracle and/or its affiliates.7 * Copyright (C) 2009-2023 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 99 99 , m_strHelpKeyword(strHelpKeyword) 100 100 , m_iLastIndex(-1) 101 , m_fAborted(false)102 101 , m_fClosed(false) 103 102 , m_pLabelPixmap(0) … … 235 234 void UINativeWizard::keyPressEvent(QKeyEvent *pEvent) 236 235 { 237 // WORKAROUND:238 // In non-modal case we'll have to handle Escape button ourselves.239 // In modal case QDialog does this itself internally by unwinding the event-loop.240 241 236 /* Different handling depending on current modality: */ 242 237 const Qt::WindowModality enmModality = windowHandle()->modality(); … … 250 245 case Qt::Key_Escape: 251 246 { 252 sltAbort();247 close(); 253 248 return; 254 249 } … … 281 276 { 282 277 m_fClosed = true; 283 if (m_fAborted)284 cleanWizard();285 278 emit sigClose(m_enmType); 286 279 } … … 385 378 accept(); 386 379 } 387 }388 389 void UINativeWizard::sltAbort()390 {391 cleanWizard();392 close();393 380 } 394 381 … … 552 539 this, &UINativeWizard::sltNext); 553 540 connect(wizardButton(WizardButtonType_Cancel), &QPushButton::clicked, 554 this, &UINativeWizard:: sltAbort);541 this, &UINativeWizard::close); 555 542 } 556 543 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.h
r105583 r105585 5 5 6 6 /* 7 * Copyright (C) 2009-202 4Oracle and/or its affiliates.7 * Copyright (C) 2009-2023 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 155 155 156 156 protected slots: 157 158 157 /** Handles translation event. */ 159 158 virtual void sltRetranslateUI(); … … 170 169 /** Switches to next page. */ 171 170 void sltNext(); 172 /** Aborts wizard. */173 void sltAbort();174 171 175 172 /** Handle help request*/ … … 213 210 /** Holds the set of invisible pages. */ 214 211 QSet<int> m_invisiblePages; 215 /** Holds whether user has requested to abort wizard. */216 bool m_fAborted;217 212 /** Holds whether the dialod had emitted signal to be closed. */ 218 213 bool m_fClosed;
Note:
See TracChangeset
for help on using the changeset viewer.