- Timestamp:
- Apr 17, 2017 2:00:39 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
r66588 r66589 51 51 { 52 52 /* default settings */ 53 remapScancodes = QString::null;54 53 proxySettings = QString::null; 55 54 hostScreenSaverDisabled = false; … … 58 57 VBoxGlobalSettingsData::VBoxGlobalSettingsData (const VBoxGlobalSettingsData &that) 59 58 { 60 remapScancodes = that.remapScancodes;61 59 proxySettings = that.proxySettings; 62 60 hostScreenSaverDisabled = that.hostScreenSaverDisabled; … … 70 68 { 71 69 return this == &that || 72 (remapScancodes == that.remapScancodes && 73 proxySettings == that.proxySettings && 70 (proxySettings == that.proxySettings && 74 71 hostScreenSaverDisabled == that.hostScreenSaverDisabled 75 72 ); … … 91 88 gPropertyMap[] = 92 89 { 93 { "GUI/RemapScancodes", "remapScancodes", "(\\d+=\\d+,)*\\d+=\\d+", true },94 90 { "GUI/ProxySettings", "proxySettings", "[\\s\\S]*", true }, 95 91 { "GUI/HostScreenSaverDisabled", "hostScreenSaverDisabled", "true|false", true } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h
r66588 r66589 37 37 private: 38 38 39 QString remapScancodes;40 39 QString proxySettings; 41 40 bool hostScreenSaverDisabled; … … 49 48 { 50 49 Q_OBJECT 51 Q_PROPERTY (QString remapScancodes READ remapScancodes WRITE setRemapScancodes)52 50 Q_PROPERTY (QString proxySettings READ proxySettings WRITE setProxySettings) 53 51 Q_PROPERTY (bool hostScreenSaverDisabled READ hostScreenSaverDisabled WRITE setHostScreenSaverDisabled) … … 65 63 66 64 // Properties 67 68 QString remapScancodes() const { return data()->remapScancodes; }69 void setRemapScancodes (const QString &aRemapScancodes)70 {71 mData()->remapScancodes = aRemapScancodes;72 }73 65 74 66 QString proxySettings() const { return data()->proxySettings; } -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r66588 r66589 60 60 const char* UIExtraDataDefs::GUI_Input_HostKeyCombination = "GUI/Input/HostKeyCombination"; 61 61 const char* UIExtraDataDefs::GUI_Input_AutoCapture = "GUI/Input/AutoCapture"; 62 const char* UIExtraDataDefs::GUI_RemapScancodes = "GUI/RemapScancodes"; 62 63 63 64 /* Settings: Storage: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r66588 r66589 94 94 /** Holds whether Runtime UI auto-capture is enabled. */ 95 95 extern const char* GUI_Input_AutoCapture; 96 /** Holds Runtime UI remapped scan codes. */ 97 extern const char* GUI_RemapScancodes; 96 98 /** @} */ 97 99 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r66588 r66589 2480 2480 } 2481 2481 2482 QString UIExtraDataManager::remappedScanCodes() 2483 { 2484 /* Acquire remapped scan codes: */ 2485 QString strRemappedScanCodes = extraDataString(GUI_RemapScancodes); 2486 /* Clear the record if it's absolutely wrong: */ 2487 QRegularExpression reTemplate("(\\d+=\\d+,)*\\d+=\\d+"); 2488 if (!reTemplate.match(strRemappedScanCodes).hasMatch()) 2489 strRemappedScanCodes.clear(); 2490 /* Return remapped scan codes: */ 2491 return strRemappedScanCodes; 2492 } 2493 2482 2494 QString UIExtraDataManager::recentFolderForHardDrives() 2483 2495 { -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r66588 r66589 228 228 /** Defines whether the Runtime UI auto-capture is @a fEnabled. */ 229 229 void setAutoCaptureEnabled(bool fEnabled); 230 231 /** Returns the Runtime UI remapped scan codes. */ 232 QString remappedScanCodes(); 230 233 /** @} */ 231 234 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r66571 r66589 1603 1603 #ifdef VBOX_WS_X11 1604 1604 /* Initialize the X keyboard subsystem: */ 1605 initMappedX11Keyboard(QX11Info::display(), vboxGlobal().settings().publicProperty("GUI/RemapScancodes"));1605 initMappedX11Keyboard(QX11Info::display(), gEDataManager->remappedScanCodes()); 1606 1606 #endif /* VBOX_WS_X11 */ 1607 1607 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
r65592 r66589 32 32 /* GUI includes: */ 33 33 # include "UIHostComboEditor.h" 34 # include "UIExtraData Defs.h"34 # include "UIExtraDataManager.h" 35 35 # include "UIIconPool.h" 36 36 # include "VBoxGlobal.h" … … 584 584 #elif defined(VBOX_WS_X11) 585 585 /* Initialize the X keyboard subsystem: */ 586 initMappedX11Keyboard(QX11Info::display(), vboxGlobal().settings().publicProperty("GUI/RemapScancodes"));586 initMappedX11Keyboard(QX11Info::display(), gEDataManager->remappedScanCodes()); 587 587 #endif /* VBOX_WS_X11 */ 588 588 }
Note:
See TracChangeset
for help on using the changeset viewer.