fix a mistake of https://github.com/xiaoyifang/goldendict-ng/pull/1912
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run

This commit is contained in:
shenleban tongying 2024-11-08 01:30:34 -05:00
parent f694c3210e
commit f6434f4219

View file

@ -111,7 +111,7 @@ HotKey::HotKey( QKeySequence const & seq ):
QKeySequence HotKey::toKeySequence() const QKeySequence HotKey::toKeySequence() const
{ {
if ( key2 != 0 || key2 != Qt::Key::Key_unknown ) { if ( key2 != 0 && key2 != Qt::Key::Key_unknown ) {
return { QKeyCombination( modifiers, static_cast< Qt::Key >( key1 ) ), return { QKeyCombination( modifiers, static_cast< Qt::Key >( key1 ) ),
QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) }; QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) };
} }