Assert for keyboard list

This commit is contained in:
Klaus Basan
2014-04-15 03:09:19 +02:00
parent c288a4b05b
commit 20322a1a55

View File

@@ -311,6 +311,7 @@ namespace BlackCore
if (type == IContextSettings::SettingsHotKeys)
{
CKeyboardKeyList hotKeys = this->getIContextSettings()->getHotkeys();
Q_ASSERT(!hotKeys.isEmpty());
CKeyboardKey pttKey = hotKeys.findBy(&BlackMisc::Hardware::CKeyboardKey::getFunction, BlackMisc::Hardware::CKeyboardKey::HotkeyPtt).front();
m_keyboard->unregisterHotkey(m_handlePtt);
m_handlePtt = m_keyboard->registerHotkey(pttKey, m_voice, &CVoiceVatlib::handlePushToTalk);