Changeset 35735 in vbox
- Timestamp:
- Jan 27, 2011 12:15:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
r35734 r35735 243 243 244 244 245 namespace UIHotKeyCombination 246 { 247 int m_iMaxComboSize = 3; 248 } 249 245 250 QString UIHotKeyCombination::toReadableString(const QString &strKeyCombo) 246 251 { … … 266 271 { 267 272 QList<int> keyCodeList = toKeyCodeList(strKeyCombo); 273 if (keyCodeList.size() > m_iMaxComboSize) 274 return false; 268 275 for (int i = 0; i < keyCodeList.size(); ++i) 269 276 if (!UIHotKey::isValidKey(keyCodeList[i])) … … 382 389 m_shownKeys.clear(); 383 390 384 /* Remember pressed symbol: */ 385 m_pressedKeys << pMsg->wParam; 386 m_shownKeys.insert(iKeyCode, UIHotKey::toString(iKeyCode)); 387 388 /* Remember what we already started a sequence: */ 389 m_fStartNewSequence = false; 391 /* Check maximum combo size: */ 392 if (m_shownKeys.size() < UIHotKeyCombination::m_iMaxComboSize) 393 { 394 /* Remember pressed symbol: */ 395 m_pressedKeys << pMsg->wParam; 396 m_shownKeys.insert(iKeyCode, UIHotKey::toString(iKeyCode)); 397 398 /* Remember what we already started a sequence: */ 399 m_fStartNewSequence = false; 400 } 390 401 } 391 402 /* Key release: */ … … 438 449 m_shownKeys.clear(); 439 450 440 /* Remember pressed symbol: */ 441 m_pressedKeys << iKeySym; 442 m_shownKeys.insert(iKeySym, UIHotKey::toString(iKeySym)); 443 444 /* Remember what we already started a sequence: */ 445 m_fStartNewSequence = false; 451 /* Check maximum combo size: */ 452 if (m_shownKeys.size() < UIHotKeyCombination::m_iMaxComboSize) 453 { 454 /* Remember pressed symbol: */ 455 m_pressedKeys << iKeySym; 456 m_shownKeys.insert(iKeySym, UIHotKey::toString(iKeySym)); 457 458 /* Remember what we already started a sequence: */ 459 m_fStartNewSequence = false; 460 } 446 461 } 447 462 /* Key release: */ … … 528 543 m_shownKeys.clear(); 529 544 530 /* Remember pressed symbol: */ 531 m_pressedKeys << iKeyCode; 532 m_shownKeys.insert(iKeyCode, UIHotKey::toString(iKeyCode)); 533 534 /* Remember what we already started a sequence: */ 535 m_fStartNewSequence = false; 545 /* Check maximum combo size: */ 546 if (m_shownKeys.size() < UIHotKeyCombination::m_iMaxComboSize) 547 { 548 /* Remember pressed symbol: */ 549 m_pressedKeys << iKeyCode; 550 m_shownKeys.insert(iKeyCode, UIHotKey::toString(iKeyCode)); 551 552 /* Remember what we already started a sequence: */ 553 m_fStartNewSequence = false; 554 } 536 555 } 537 556 }
Note:
See TracChangeset
for help on using the changeset viewer.