summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-02-15 17:55:43 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2021-02-15 21:33:30 +0100
commit77f61fe0240b5744043dc216a3c48ef2eaf11ec8 (patch)
treebb597c835e6a9ddc4b8b3a38112bdf77bad1f882 /vcl/qt5
parent41cffc379259fec626a282ca243a9750d96d1c63 (diff)
Qt don't fallthrough in inputMethodQuery
So my initiak code had a single case with fallthrough to the default, but that is totally bogus for multiple cases. I honestly have no idea, if that ever was correct. I also don't know, if simply returning an empty QVariant is the correct error handling, but the fallthroughs were definitly wrong. Change-Id: I1880a960164eccbb6a5a3832c4ae9aaeda065d43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110946 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5Widget.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 4608482627be..a2bf8fe6472d 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -670,14 +670,14 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const
sal_Int32 nCursorPos, nAnchor;
if (lcl_retrieveSurrounding(nCursorPos, nAnchor, &aText, nullptr))
return QVariant(aText);
- [[fallthrough]];
+ return QVariant();
}
case Qt::ImCursorPosition:
{
sal_Int32 nCursorPos, nAnchor;
if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr))
return QVariant(static_cast<int>(nCursorPos));
- [[fallthrough]];
+ return QVariant();
}
case Qt::ImCursorRectangle:
{
@@ -692,7 +692,7 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const
sal_Int32 nCursorPos, nAnchor;
if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, nullptr))
return QVariant(static_cast<int>(nAnchor));
- [[fallthrough]];
+ return QVariant();
}
case Qt::ImCurrentSelection:
{
@@ -700,13 +700,11 @@ QVariant Qt5Widget::inputMethodQuery(Qt::InputMethodQuery property) const
sal_Int32 nCursorPos, nAnchor;
if (lcl_retrieveSurrounding(nCursorPos, nAnchor, nullptr, &aSelection))
return QVariant(aSelection);
- [[fallthrough]];
+ return QVariant();
}
default:
return QWidget::inputMethodQuery(property);
}
-
- return QVariant();
}
void Qt5Widget::endExtTextInput()