Convert keyboardShortcut bindings to new settings API
This commit is contained in:
@@ -640,34 +640,26 @@ void OverlayController::processPushToTalkBindings()
|
|||||||
|
|
||||||
void OverlayController::processKeyboardBindings()
|
void OverlayController::processKeyboardBindings()
|
||||||
{
|
{
|
||||||
constexpr auto settingsKeyboardName = "keyboardShortcuts";
|
|
||||||
|
|
||||||
if ( m_actions.keyboardOne() )
|
if ( m_actions.keyboardOne() )
|
||||||
{
|
{
|
||||||
appSettings()->beginGroup( settingsKeyboardName );
|
const auto commands = settings::getSetting(
|
||||||
const auto commands
|
settings::StringSetting::KEYBOARDSHORTCUT_keyboardOne );
|
||||||
= appSettings()->value( "keyboardOne" ).toString().toStdString();
|
|
||||||
appSettings()->endGroup();
|
|
||||||
|
|
||||||
sendStringAsInput( commands );
|
sendStringAsInput( commands );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_actions.keyboardTwo() )
|
if ( m_actions.keyboardTwo() )
|
||||||
{
|
{
|
||||||
appSettings()->beginGroup( settingsKeyboardName );
|
const auto commands = settings::getSetting(
|
||||||
const auto commands
|
settings::StringSetting::KEYBOARDSHORTCUT_keyboardTwo );
|
||||||
= appSettings()->value( "keyboardTwo" ).toString().toStdString();
|
|
||||||
appSettings()->endGroup();
|
|
||||||
|
|
||||||
sendStringAsInput( commands );
|
sendStringAsInput( commands );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_actions.keyboardThree() )
|
if ( m_actions.keyboardThree() )
|
||||||
{
|
{
|
||||||
appSettings()->beginGroup( settingsKeyboardName );
|
const auto commands = settings::getSetting(
|
||||||
const auto commands
|
settings::StringSetting::KEYBOARDSHORTCUT_keyboardThree );
|
||||||
= appSettings()->value( "keyboardThree" ).toString().toStdString();
|
|
||||||
appSettings()->endGroup();
|
|
||||||
|
|
||||||
sendStringAsInput( commands );
|
sendStringAsInput( commands );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user