Changeset 79641 in vbox
- Timestamp:
- Jul 9, 2019 12:58:12 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r79387 r79641 1609 1609 return; 1610 1610 } 1611 m_pSoftKeyboardDialog = new UISoftKeyboard(0, uisession(), machine().GetName()); 1611 QWidget *pCenterWidget = windowManager().realParentWindow(activeMachineWindow()); 1612 m_pSoftKeyboardDialog = new UISoftKeyboard(0, uisession(), pCenterWidget, machine().GetName()); 1612 1613 if (m_pSoftKeyboardDialog) 1613 1614 { -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r79636 r79641 72 72 const int iScrollLockPosition = 125; 73 73 74 /** Set a generous file size limit. */ 75 const qint64 iFileSizeLimit = _256K; 74 76 75 77 const QString strSubDirectorName("keyboardLayouts"); … … 2316 2318 { 2317 2319 if (!msgCenter().questionBinary(this, MessageType_Question, 2318 QString(UISoftKeyboard::tr("This will delete the keyboard layout file as well ,Proceed?")),2320 QString(UISoftKeyboard::tr("This will delete the keyboard layout file as well. Proceed?")), 2319 2321 0 /* auto-confirm id */, 2320 2322 QString("Delete") /* ok button text */, … … 2812 2814 QFile xmlFile(strFileName); 2813 2815 if (!xmlFile.exists()) 2816 return false; 2817 2818 if (xmlFile.size() >= iFileSizeLimit) 2814 2819 return false; 2815 2820 … … 3040 3045 return false; 3041 3046 3047 if (xmlFile.size() >= iFileSizeLimit) 3048 return false; 3049 3042 3050 if (!xmlFile.open(QIODevice::ReadOnly)) 3043 3051 return false; … … 3323 3331 3324 3332 UISoftKeyboard::UISoftKeyboard(QWidget *pParent, 3325 UISession *pSession, Q String strMachineName /* = QString()*/)3333 UISession *pSession, QWidget *pCenterWidget, QString strMachineName /* = QString()*/) 3326 3334 :QIWithRetranslateUI<QMainWindow>(pParent) 3327 3335 , m_pSession(pSession) 3336 , m_pCenterWidget(pCenterWidget) 3328 3337 , m_pMainLayout(0) 3329 3338 , m_pKeyboardWidget(0) … … 3632 3641 QRect defaultGeometry(0, 0, iDefaultWidth, iDefaultHeight); 3633 3642 3634 QWidget *pParentWidget = qobject_cast<QWidget*>(parent()); 3635 if (pParentWidget) 3636 defaultGeometry.moveCenter(pParentWidget->geometry().center()); 3637 3643 3644 if (m_pCenterWidget) 3645 defaultGeometry.moveCenter(m_pCenterWidget->geometry().center()); 3638 3646 /* Load geometry from extradata: */ 3639 3647 QRect geometry = gEDataManager->softKeyboardDialogGeometry(this, defaultGeometry); -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h
r79456 r79641 55 55 public: 56 56 57 UISoftKeyboard(QWidget *pParent, UISession *pSession, 57 UISoftKeyboard(QWidget *pParent, UISession *pSession, QWidget *pCenterWidget, 58 58 QString strMachineName = QString()); 59 59 ~UISoftKeyboard(); … … 102 102 103 103 UISession *m_pSession; 104 QWidget *m_pCenterWidget; 104 105 QHBoxLayout *m_pMainLayout; 105 106 UISoftKeyboardWidget *m_pKeyboardWidget;
Note:
See TracChangeset
for help on using the changeset viewer.