mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
make sure the bottom of QKeySequence::operator[] is really unreachable
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c05116aeca
commit
6eb9bec4aa
1 changed files with 5 additions and 1 deletions
|
@ -1028,8 +1028,9 @@ QKeySequence::operator QVariant() const
|
|||
*/
|
||||
QKeySequence::operator int () const
|
||||
{
|
||||
if (1 <= count())
|
||||
if (1 <= count()) {
|
||||
return key1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1048,6 +1049,9 @@ int QKeySequence::operator[](uint index) const
|
|||
case 1: {
|
||||
return key2;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue