mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
Apply suggestion from review
This commit is contained in:
parent
c11bb42cf3
commit
8acedaed61
@ -375,16 +375,8 @@ void QgsShortcutsManager::updateActionToolTip( QAction *action, const QString &s
|
||||
if ( current.lastIndexOf( rx, -1, &match ) != -1 )
|
||||
{
|
||||
// Check if it is a valid QKeySequence
|
||||
bool validSequence = true;
|
||||
for ( const QString &part : QKeySequence( match.captured( 1 ) ).toString().split( "," ) )
|
||||
{
|
||||
if ( part.trimmed().isEmpty() )
|
||||
{
|
||||
validSequence = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( validSequence )
|
||||
const QStringList parts = QKeySequence( match.captured( 1 ) ).toString().split( "," );
|
||||
if ( std::all_of( parts.constBegin(), parts.constEnd(), []( const QString &part ) { return !part.trimmed().isEmpty(); } ) )
|
||||
{
|
||||
current = current.remove( match.capturedStart( 0 ), match.capturedLength( 0 ) );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user