Bug 399677 - Krita 4.1.5 fails to build with Qt 5.6
Summary: Krita 4.1.5 fails to build with Qt 5.6
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.1.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-11 19:14 UTC by Wolfgang Bauer
Modified: 2018-11-20 08:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bauer 2018-10-11 19:14:45 UTC
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...
Comment 1 Halla Rempt 2018-10-12 10:33:59 UTC
Git commit ff3194528deea13562422cad0d0ad83248fd63d2 by Boudewijn Rempt.
Committed on 12/10/2018 at 10:33.
Pushed by rempt into branch 'master'.

Fix build with Qt 5.6

M  +2    -2    libs/flake/text/KoSvgTextChunkShape.cpp

https://commits.kde.org/krita/ff3194528deea13562422cad0d0ad83248fd63d2
Comment 2 Halla Rempt 2018-11-20 08:48:22 UTC
Git commit fb7555d8d0cb50dce55d37f52fc35a34231571df by Boudewijn Rempt.
Committed on 20/11/2018 at 08:20.
Pushed by rempt into branch 'krita/4.1'.

Fix build with Qt 5.6

M  +2    -2    libs/flake/text/KoSvgTextChunkShape.cpp

https://commits.kde.org/krita/fb7555d8d0cb50dce55d37f52fc35a34231571df