Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp	(revision 64253)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp	(revision 64254)
@@ -42,4 +42,64 @@
 /* Namespaces: */
 using namespace UIExtraDataDefs;
+
+
+/* Global settings / Input page / Cache / Shortcut cache item: */
+struct UIShortcutCacheItem
+{
+    UIShortcutCacheItem(const QString &strKey,
+                        const QString &strDescription,
+                        const QString &strCurrentSequence,
+                        const QString &strDefaultSequence)
+        : key(strKey)
+        , description(strDescription)
+        , currentSequence(strCurrentSequence)
+        , defaultSequence(strDefaultSequence)
+    {}
+
+    UIShortcutCacheItem(const UIShortcutCacheItem &other)
+        : key(other.key)
+        , description(other.description)
+        , currentSequence(other.currentSequence)
+        , defaultSequence(other.defaultSequence)
+    {}
+
+    UIShortcutCacheItem& operator=(const UIShortcutCacheItem &other)
+    {
+        key = other.key;
+        description = other.description;
+        currentSequence = other.currentSequence;
+        defaultSequence = other.defaultSequence;
+        return *this;
+    }
+
+    bool operator==(const UIShortcutCacheItem &other) const
+    {
+        return key == other.key;
+    }
+
+    QString key;
+    QString description;
+    QString currentSequence;
+    QString defaultSequence;
+};
+
+/* Global settings / Input page / Cache / Shortcut cache: */
+typedef QList<UIShortcutCacheItem> UIShortcutCache;
+
+/* Global settings / Input page / Cache: */
+class UISettingsCacheGlobalInput : public QObject
+{
+    Q_OBJECT;
+
+public:
+
+    UISettingsCacheGlobalInput(QObject *pParent)
+        : QObject(pParent)
+        , m_fAutoCapture(false)
+    {}
+
+    UIShortcutCache m_shortcuts;
+    bool m_fAutoCapture;
+};
 
 
@@ -562,4 +622,5 @@
     , m_pSelectorFilterEditor(0), m_pSelectorModel(0), m_pSelectorTable(0)
     , m_pMachineFilterEditor(0), m_pMachineModel(0), m_pMachineTable(0)
+    , m_pCache(new UISettingsCacheGlobalInput(this))
 {
     /* Apply UI decorations: */
@@ -630,5 +691,5 @@
 
     /* Load host-combo shortcut to cache: */
-    m_cache.m_shortcuts << UIShortcutCacheItem(UIHostCombo::hostComboCacheKey(), tr("Host Key Combination"),  m_settings.hostCombo(), QString());
+    m_pCache->m_shortcuts << UIShortcutCacheItem(UIHostCombo::hostComboCacheKey(), tr("Host Key Combination"),  m_settings.hostCombo(), QString());
     /* Load all other shortcuts to cache: */
     const QMap<QString, UIShortcut>& shortcuts = gShortcutPool->shortcuts();
@@ -637,10 +698,10 @@
     {
         const UIShortcut &shortcut = shortcuts[strShortcutKey];
-        m_cache.m_shortcuts << UIShortcutCacheItem(strShortcutKey, VBoxGlobal::removeAccelMark(shortcut.description()),
+        m_pCache->m_shortcuts << UIShortcutCacheItem(strShortcutKey, VBoxGlobal::removeAccelMark(shortcut.description()),
                                                    shortcut.sequence().toString(QKeySequence::NativeText),
                                                    shortcut.defaultSequence().toString(QKeySequence::NativeText));
     }
     /* Load other things to cache: */
-    m_cache.m_fAutoCapture = m_settings.autoCapture();
+    m_pCache->m_fAutoCapture = m_settings.autoCapture();
 
     /* Upload properties & settings to data: */
@@ -653,7 +714,7 @@
 {
     /* Fetch from cache: */
-    m_pSelectorModel->load(m_cache.m_shortcuts);
-    m_pMachineModel->load(m_cache.m_shortcuts);
-    m_pEnableAutoGrabCheckbox->setChecked(m_cache.m_fAutoCapture);
+    m_pSelectorModel->load(m_pCache->m_shortcuts);
+    m_pMachineModel->load(m_pCache->m_shortcuts);
+    m_pEnableAutoGrabCheckbox->setChecked(m_pCache->m_fAutoCapture);
 
     /* Revalidate: */
@@ -666,7 +727,7 @@
 {
     /* Upload to cache: */
-    m_pSelectorModel->save(m_cache.m_shortcuts);
-    m_pMachineModel->save(m_cache.m_shortcuts);
-    m_cache.m_fAutoCapture = m_pEnableAutoGrabCheckbox->isChecked();
+    m_pSelectorModel->save(m_pCache->m_shortcuts);
+    m_pMachineModel->save(m_pCache->m_shortcuts);
+    m_pCache->m_fAutoCapture = m_pEnableAutoGrabCheckbox->isChecked();
 }
 
@@ -680,15 +741,15 @@
     /* Save host-combo shortcut from cache: */
     UIShortcutCacheItem fakeHostComboItem(UIHostCombo::hostComboCacheKey(), QString(), QString(), QString());
-    int iIndexOfHostComboItem = m_cache.m_shortcuts.indexOf(fakeHostComboItem);
+    int iIndexOfHostComboItem = m_pCache->m_shortcuts.indexOf(fakeHostComboItem);
     if (iIndexOfHostComboItem != -1)
-        m_settings.setHostCombo(m_cache.m_shortcuts[iIndexOfHostComboItem].currentSequence);
+        m_settings.setHostCombo(m_pCache->m_shortcuts[iIndexOfHostComboItem].currentSequence);
     /* Iterate over cached shortcuts: */
     QMap<QString, QString> sequences;
-    foreach (const UIShortcutCacheItem &item, m_cache.m_shortcuts)
+    foreach (const UIShortcutCacheItem &item, m_pCache->m_shortcuts)
         sequences.insert(item.key, item.currentSequence);
     /* Save shortcut sequences from cache: */
     gShortcutPool->setOverrides(sequences);
     /* Save other things from cache: */
-    m_settings.setAutoCapture(m_cache.m_fAutoCapture);
+    m_settings.setAutoCapture(m_pCache->m_fAutoCapture);
 
     /* Upload properties & settings to data: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h	(revision 64253)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h	(revision 64254)
@@ -31,56 +31,7 @@
 class QTabWidget;
 class QLineEdit;
+class UISettingsCacheGlobalInput;
 class UIHotKeyTableModel;
 class UIHotKeyTable;
-
-/* Global settings / Input page / Cache / Shortcut cache item: */
-struct UIShortcutCacheItem
-{
-    UIShortcutCacheItem(const QString &strKey,
-                        const QString &strDescription,
-                        const QString &strCurrentSequence,
-                        const QString &strDefaultSequence)
-        : key(strKey)
-        , description(strDescription)
-        , currentSequence(strCurrentSequence)
-        , defaultSequence(strDefaultSequence)
-    {}
-
-    UIShortcutCacheItem(const UIShortcutCacheItem &other)
-        : key(other.key)
-        , description(other.description)
-        , currentSequence(other.currentSequence)
-        , defaultSequence(other.defaultSequence)
-    {}
-
-    UIShortcutCacheItem& operator=(const UIShortcutCacheItem &other)
-    {
-        key = other.key;
-        description = other.description;
-        currentSequence = other.currentSequence;
-        defaultSequence = other.defaultSequence;
-        return *this;
-    }
-
-    bool operator==(const UIShortcutCacheItem &other) const
-    {
-        return key == other.key;
-    }
-
-    QString key;
-    QString description;
-    QString currentSequence;
-    QString defaultSequence;
-};
-
-/* Global settings / Input page / Cache / Shortcut cache: */
-typedef QList<UIShortcutCacheItem> UIShortcutCache;
-
-/* Global settings / Input page / Cache: */
-struct UISettingsCacheGlobalInput
-{
-    UIShortcutCache m_shortcuts;
-    bool m_fAutoCapture;
-};
 
 /* Global settings / Input page: */
@@ -131,6 +82,4 @@
     void prepareValidation();
 
-    /* Cache: */
-    UISettingsCacheGlobalInput m_cache;
     QTabWidget *m_pTabWidget;
     QLineEdit *m_pSelectorFilterEditor;
@@ -140,4 +89,7 @@
     UIHotKeyTableModel *m_pMachineModel;
     UIHotKeyTable *m_pMachineTable;
+
+    /** Holds the cache instance. */
+    UISettingsCacheGlobalInput *m_pCache;
 };
 
