summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/qaccessible.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index 524fc3a511..d3afed604f 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -1972,7 +1972,8 @@ QString QAccessibleTextInterface::textBeforeOffset(int offset, QAccessible::Text
if (txt.isEmpty() || offset <= 0 || offset > txt.length())
return QString();
- QTextBoundaryFinder::BoundaryType type;
+ // type initialized just to silence a compiler warning [-Werror=maybe-uninitialized]
+ QTextBoundaryFinder::BoundaryType type = QTextBoundaryFinder::Grapheme;
switch (boundaryType) {
case QAccessible::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
@@ -2043,7 +2044,8 @@ QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible::TextB
if (txt.isEmpty() || offset < 0 || offset >= txt.length())
return QString();
- QTextBoundaryFinder::BoundaryType type;
+ // type initialized just to silence a compiler warning [-Werror=maybe-uninitialized]
+ QTextBoundaryFinder::BoundaryType type = QTextBoundaryFinder::Grapheme;
switch (boundaryType) {
case QAccessible::CharBoundary:
type = QTextBoundaryFinder::Grapheme;
@@ -2128,7 +2130,8 @@ QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoun
if (offset == txt.length() && boundaryType == QAccessible::CharBoundary)
return QString();
- QTextBoundaryFinder::BoundaryType type;
+ // type initialized just to silence a compiler warning [-Werror=maybe-uninitialized]
+ QTextBoundaryFinder::BoundaryType type = QTextBoundaryFinder::Grapheme;
switch (boundaryType) {
case QAccessible::CharBoundary:
type = QTextBoundaryFinder::Grapheme;