- Timestamp:
- Feb 15, 2013 1:32:58 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83813
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r44712 r44713 137 137 void UIHotKeyTableModel::save(UIShortcutCache &shortcuts) 138 138 { 139 /* Save shortcuts: */139 /* Save model items: */ 140 140 foreach (const UIShortcutCacheItem &item, m_shortcuts) 141 141 { 142 /* Search for corresponding cache item pointer: */143 UIShortcutCache::iterator cacheItemPointer = qFind(shortcuts.begin(), shortcuts.end(),item);144 /* Make sure the pointeris valid: */145 if ( cacheItemPointer == shortcuts.end())142 /* Search for corresponding cache item index: */ 143 int iIndexOfCacheItem = shortcuts.indexOf(item); 144 /* Make sure index is valid: */ 145 if (iIndexOfCacheItem == -1) 146 146 continue; 147 /* Save shortcut cache item intocache: */148 *cacheItemPointer= item;147 /* Save model item into the cache: */ 148 shortcuts[iIndexOfCacheItem] = item; 149 149 } 150 150 } … … 328 328 /* Set sequence to shortcut: */ 329 329 UIShortcutCacheItem &filteredShortcut = m_filteredShortcuts[iIndex]; 330 UIShortcutCache::iterator shortcutPointer = qFind(m_shortcuts.begin(), m_shortcuts.end(),filteredShortcut);331 if ( shortcutPointer != m_shortcuts.end())330 int iShortcutIndex = m_shortcuts.indexOf(filteredShortcut); 331 if (iShortcutIndex != -1) 332 332 { 333 333 filteredShortcut.currentSequence = filteredShortcut.key == UIHostCombo::hostComboCacheKey() ? 334 334 value.value<UIHostComboWrapper>().toString() : 335 335 value.value<UIHotKey>().sequence(); 336 *shortcutPointer= filteredShortcut;336 m_shortcuts[iShortcutIndex] = filteredShortcut; 337 337 emit sigRevalidationRequired(); 338 338 return true;
Note:
See TracChangeset
for help on using the changeset viewer.