commit 3a0e973ae807f053a9a1e8190ea24590d97f5cda
Author: Enrico Forestieri <[email protected]>
Date: Sat Jan 25 16:14:24 2025 +0100
Avoid narrowing conversion errors
These errors occur on platforms where sizeof(int) == sizeof(long),
such as native Windows. Specifically, compiling with mingw gives:
../../../../src/frontends/qt/GuiInputMethod.cpp:807:14: error: narrowing
conversion of ‘2147483648’ from ‘unsigned int’ to ‘long int’ [-Wnarrowing]
807 | case 0x80000000:str += "Qt::ImPlatformData";
break;
---
src/frontends/qt/GuiInputMethod.cpp | 2 +-
src/frontends/qt/GuiInputMethod.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiInputMethod.cpp
b/src/frontends/qt/GuiInputMethod.cpp
index 0b7f858135..78fd70fa52 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -790,7 +790,7 @@ void GuiInputMethod::processQuery(Qt::InputMethodQuery
query)
// Returns enum Qt::InputMethodQuery constant from its value.
// This is for debugging purpose only.
-docstring GuiInputMethod::inputMethodQueryFlagsAsString(long int query) const
+docstring GuiInputMethod::inputMethodQueryFlagsAsString(unsigned long int
query) const
{
docstring str;
switch (query) {
diff --git a/src/frontends/qt/GuiInputMethod.h
b/src/frontends/qt/GuiInputMethod.h
index 192af429de..ceb13b79ad 100644
--- a/src/frontends/qt/GuiInputMethod.h
+++ b/src/frontends/qt/GuiInputMethod.h
@@ -161,7 +161,7 @@ private:
PreeditRow getCaretInfo(const bool real_boundary, const bool
virtual_boundary);
/// Returns enum Qt::InputMethodQuery constant from its value
- docstring inputMethodQueryFlagsAsString(long int query) const;
+ docstring inputMethodQueryFlagsAsString(unsigned long int query) const;
struct Private;
Private * const d;
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs