forked from qt-creator/qt-creator
CorePlugin: Fix warning about deprecated operator int()
Operate now on QKeyCombination instead. Return false if there are modifiers other than Shift or Keypad. Otherwise, return the result of comparing key() with the Escape key. Change-Id: Ica6409a7b7b5ed28e79915691c40a898008735f7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -121,11 +121,10 @@ static bool isTextKeySequence(const QKeySequence &sequence)
|
||||
{
|
||||
if (sequence.isEmpty())
|
||||
return false;
|
||||
int key = sequence[0];
|
||||
key &= ~(Qt::ShiftModifier | Qt::KeypadModifier);
|
||||
if (key < Qt::Key_Escape)
|
||||
return true;
|
||||
return false;
|
||||
const QKeyCombination keyCombination = sequence[0];
|
||||
if (keyCombination.keyboardModifiers() & ~(Qt::ShiftModifier | Qt::KeypadModifier))
|
||||
return false;
|
||||
return keyCombination.key() < Qt::Key_Escape;
|
||||
}
|
||||
|
||||
static FilePath schemesPath()
|
||||
|
Reference in New Issue
Block a user