summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-09-29 15:50:30 +0200
committerhjk <hjk121@nokiamail.com>2014-09-30 10:33:07 +0200
commiteda8af2a699da594644517f9ff5d5cf38fa039d3 (patch)
tree6bc8211ebeefef677f49e6ea1b1d97e448cb85eb
parent289b4ed7055f8d5a784c4525d1eeb86ffb02dda7 (diff)
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>
-rw-r--r--src/gui/accessible/qaccessible.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index d3afed604f..f85b6d1aad 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -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()!