#32 use remove/add to replace hotkey

possible workaround for "edited hotkey" not working
This commit is contained in:
Klaus Basan
2020-06-08 02:18:54 +02:00
committed by Mat Sutcliffe
parent 7981815ddf
commit 637bae5bb6
3 changed files with 15 additions and 8 deletions

View File

@@ -196,14 +196,14 @@ namespace BlackMisc
void CIdentifier::updateToCurrentMachine()
{
m_machineIdBase64 = cachedMachineUniqueId().toBase64();
m_machineName = cachedLocalHostName();
m_machineIdBase64 = cachedMachineUniqueId().toBase64();
m_machineName = cachedLocalHostName();
}
void CIdentifier::updateToCurrentProcess()
{
m_processName = QCoreApplication::applicationName();
m_processId = QCoreApplication::applicationPid();
m_processId = QCoreApplication::applicationPid();
}
QString CIdentifier::convertToQString(bool i18n) const

View File

@@ -66,8 +66,11 @@ namespace BlackMisc
const CIdentifier comparison("comparison for local machine");
for (CActionHotkey &actionHotkey : *this)
{
const bool sameMachine = actionHotkey.getIdentifier().hasSameMachineNameOrId(comparison);
if (sameMachine) { actionHotkey.updateToCurrentMachine(); }
// to avoid issue we always update
actionHotkey.updateToCurrentMachine();
// const bool sameMachine = actionHotkey.getIdentifier().hasSameMachineNameOrId(comparison);
// if (sameMachine) { actionHotkey.updateToCurrentMachine(); }
}
}
} // ns