https://bugs.kde.org/show_bug.cgi?id=399677

            Bug ID: 399677
           Summary: Krita 4.1.5 fails to build with Qt 5.6
           Product: krita
           Version: 4.1.5
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: krita-bugs-n...@kde.org
          Reporter: wba...@tmo.at
  Target Milestone: ---

Again some compiler errors:
/home/abuild/rpmbuild/BUILD/krita-4.1.5/libs/flake/text/KoSvgTextChunkShape.cpp:
In function '{anonymous}::Result {anonymous}::hasPreviousSibling(KoXmlNode)':
/home/abuild/rpmbuild/BUILD/krita-4.1.5/libs/flake/text/KoSvgTextChunkShape.cpp:702:53:
error: conversion from 'const char [2]' to 'QChar' is ambiguous
                    return text[text.size() - 1] != " " ? FoundText :
FoundSpace;
                                                    ^

/home/abuild/rpmbuild/BUILD/krita-4.1.5/libs/flake/text/KoSvgTextChunkShape.cpp:
In function '{anonymous}::Result {anonymous}::hasNextSibling(KoXmlNode)':
/home/abuild/rpmbuild/BUILD/krita-4.1.5/libs/flake/text/KoSvgTextChunkShape.cpp:733:39:
error: conversion from 'const char [2]' to 'QChar' is ambiguous
                     return text[0] != " " ? FoundText : FoundSpace;
                                       ^

Possible fix:
--- a/libs/flake/text/KoSvgTextChunkShape.cpp
+++ b/libs/flake/text/KoSvgTextChunkShape.cpp
@@ -699,7 +699,7 @@ void KisToolChangesTracker::requestUndo()
                         return hasPreviousSibling(node) == FoundNothing ?
FoundNothing : FoundSpace;
                     }

-                    return text[text.size() - 1] != " " ? FoundText :
FoundSpace;
+                    return text[text.size() - 1] != ' ' ? FoundText :
FoundSpace;
                 }
             }
         }
@@ -730,7 +730,7 @@ void KisToolChangesTracker::requestUndo()
                 }

                 if (!text.isEmpty()) {
-                    return text[0] != " " ? FoundText : FoundSpace;
+                    return text[0] != ' ' ? FoundText : FoundSpace;
                 }
             }
         }

Although, it should probably better be QLatin1Char(' ') I suppose...

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to