Compare commits

..

1 commit

Author SHA1 Message Date
xiaoyifang 70342cd44c opt: Group struct default constructor only invoked with empty string 2024-11-08 15:46:52 +08:00

View file

@ -111,7 +111,7 @@ HotKey::HotKey( QKeySequence const & seq ):
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 ) ),
QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) };
}