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:
hjk 2014-09-29 15:50:30 +02:00
parent 289b4ed705
commit eda8af2a69

View File

@ -1991,6 +1991,8 @@ QString QAccessibleTextInterface::textBeforeOffset(int offset, QAccessible::Text
case QAccessible::NoBoundary: case QAccessible::NoBoundary:
// return empty, this function currently only supports single lines, so there can be no line before // return empty, this function currently only supports single lines, so there can be no line before
return QString(); return QString();
default:
Q_UNREACHABLE();
} }
// keep behavior in sync with QTextCursor::movePosition()! // keep behavior in sync with QTextCursor::movePosition()!
@ -2063,6 +2065,8 @@ QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible::TextB
case QAccessible::NoBoundary: case QAccessible::NoBoundary:
// return empty, this function currently only supports single lines, so there can be no line after // return empty, this function currently only supports single lines, so there can be no line after
return QString(); return QString();
default:
Q_UNREACHABLE();
} }
// keep behavior in sync with QTextCursor::movePosition()! // keep behavior in sync with QTextCursor::movePosition()!
@ -2150,6 +2154,8 @@ QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoun
*startOffset = 0; *startOffset = 0;
*endOffset = txt.length(); *endOffset = txt.length();
return txt; return txt;
default:
Q_UNREACHABLE();
} }
// keep behavior in sync with QTextCursor::movePosition()! // keep behavior in sync with QTextCursor::movePosition()!