Make QAccessible compile with -Werror
GCC was bailing out when attempting to merge this into the dev branch due to the use of "potentially uninitialized values". Change-Id: Id2fc4a123a4b180b9ab439429a0d20245c7ee41b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
289b4ed705
commit
eda8af2a69
@ -1991,6 +1991,8 @@ QString QAccessibleTextInterface::textBeforeOffset(int offset, QAccessible::Text
|
||||
case QAccessible::NoBoundary:
|
||||
// return empty, this function currently only supports single lines, so there can be no line before
|
||||
return QString();
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
// keep behavior in sync with QTextCursor::movePosition()!
|
||||
@ -2063,6 +2065,8 @@ QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible::TextB
|
||||
case QAccessible::NoBoundary:
|
||||
// return empty, this function currently only supports single lines, so there can be no line after
|
||||
return QString();
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
// keep behavior in sync with QTextCursor::movePosition()!
|
||||
@ -2150,6 +2154,8 @@ QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoun
|
||||
*startOffset = 0;
|
||||
*endOffset = txt.length();
|
||||
return txt;
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
// keep behavior in sync with QTextCursor::movePosition()!
|
||||
|
Loading…
Reference in New Issue
Block a user