VirtualBox

Ignore:
Timestamp:
Nov 21, 2008 12:37:09 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: QIMessageBox: Don't accept dialog closure when no Escape button is set (bad practice but necessary for spotting itself).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/QIMessageBox.h

    r9386 r14440  
    3535class QPushButton;
    3636class QSpacerItem;
     37class QCloseEvent;
    3738
    3839class QIDialogButtonBox;
     
    9091    QPushButton *createButton (int aButton);
    9192
     93    void closeEvent (QCloseEvent *e);
     94
    9295private slots:
    9396
    94     void done0() { done (mButton0 & ButtonMask); }
    95     void done1() { done (mButton1 & ButtonMask); }
    96     void done2() { done (mButton2 & ButtonMask); }
     97    void done0() { mWasDone = true; done (mButton0 & ButtonMask); }
     98    void done1() { mWasDone = true; done (mButton1 & ButtonMask); }
     99    void done2() { mWasDone = true; done (mButton2 & ButtonMask); }
    97100
    98     void reject() {
    99         QDialog::reject();
    100         if (mButtonEsc)
    101             setResult (mButtonEsc & ButtonMask);
    102     }
     101    void reject();
    103102
    104103private:
     
    113112    QSpacerItem *mSpacer;
    114113    QIDialogButtonBox *mButtonBox;
     114    bool mWasDone : 1;
    115115};
    116116
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