Changeset 68441 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 17, 2017 11:58:10 AM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.cpp
r63307 r68441 42 42 43 43 VBoxAboutDlg::VBoxAboutDlg(QWidget *pParent, const QString &strVersion) 44 : QIWithRetranslateUI2<QIDialog>(pParent) 44 #ifdef VBOX_WS_MAC 45 // No need for About dialog parent on macOS. 46 // First of all, non of other native apps (Safari, App Store, iTunes) centers About dialog according the app itself, they do 47 // it according to screen instead, we should do it as well. Besides that since About dialog is not modal, it will be in 48 // conflict with modal dialogs if there will be a parent passed, because the dialog will not have own event-loop in that case. 49 : QIWithRetranslateUI2<QIDialog>(0) 50 , m_pPseudoParent(pParent) 51 #else 52 // On other hosts we will keep the current behavior for now. 53 // First of all it's quite difficult to find native (Metro UI) Windows app which have About dialog at all. But non-native 54 // cross-platform apps (Qt Creator, VLC) centers About dialog according the app exactly. 55 : QIWithRetranslateUI2<QDialog>(pParent) 56 , m_pPseudoParent(0) 57 #endif 45 58 , m_strVersion(strVersion) 46 59 , m_pLabel(0) … … 92 105 /* Delete dialog on close: */ 93 106 setAttribute(Qt::WA_DeleteOnClose); 107 108 /* Make sure the dialog is deleted on pseudo-parent destruction: */ 109 connect(m_pPseudoParent, &QObject::destroyed, this, &VBoxAboutDlg::close); 94 110 95 111 /* Choose default image: */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxAboutDlg.h
r62493 r68441 68 68 void prepareCloseButton(); 69 69 70 /** Holds the pseudo parent reference. */ 71 QObject *m_pPseudoParent; 72 70 73 /** Holds the About-VirtualBox text. */ 71 74 QString m_strAboutText;
Note:
See TracChangeset
for help on using the changeset viewer.