Changeset 105583 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 5, 2024 2:09:31 PM (7 months ago)
- svn:sync-xref-src-repo-rev:
- 164260
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp
r105582 r105583 5 5 6 6 /* 7 * Copyright (C) 2009-202 3Oracle and/or its affiliates.7 * Copyright (C) 2009-2024 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) 101 102 , m_fClosed(false) 102 103 , m_pLabelPixmap(0) … … 234 235 void UINativeWizard::keyPressEvent(QKeyEvent *pEvent) 235 236 { 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 236 241 /* Different handling depending on current modality: */ 237 242 const Qt::WindowModality enmModality = windowHandle()->modality(); … … 245 250 case Qt::Key_Escape: 246 251 { 247 close();252 sltAbort(); 248 253 return; 249 254 } … … 276 281 { 277 282 m_fClosed = true; 283 if (m_fAborted) 284 cleanWizard(); 278 285 emit sigClose(m_enmType); 279 286 } … … 378 385 accept(); 379 386 } 387 } 388 389 void UINativeWizard::sltAbort() 390 { 391 cleanWizard(); 392 close(); 380 393 } 381 394 … … 539 552 this, &UINativeWizard::sltNext); 540 553 connect(wizardButton(WizardButtonType_Cancel), &QPushButton::clicked, 541 this, &UINativeWizard:: close);554 this, &UINativeWizard::sltAbort); 542 555 } 543 556 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.h
r105582 r105583 5 5 6 6 /* 7 * Copyright (C) 2009-202 3Oracle and/or its affiliates.7 * Copyright (C) 2009-2024 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 157 158 /** Handles translation event. */ 158 159 virtual void sltRetranslateUI(); … … 169 170 /** Switches to next page. */ 170 171 void sltNext(); 172 /** Aborts wizard. */ 173 void sltAbort(); 171 174 172 175 /** Handle help request*/ … … 210 213 /** Holds the set of invisible pages. */ 211 214 QSet<int> m_invisiblePages; 215 /** Holds whether user has requested to abort wizard. */ 216 bool m_fAborted; 212 217 /** Holds whether the dialod had emitted signal to be closed. */ 213 218 bool m_fClosed;
Note:
See TracChangeset
for help on using the changeset viewer.