myst6re / hyne

Final Fantasy VIII Save Editor
https://www.ff8.fr
GNU General Public License v3.0
63 stars 7 forks source link

QT5 CaseSensitive compile fails ambiguous #9

Closed noabody closed 6 years ago

noabody commented 6 years ago

QT5 CaseSensitive compile fails without QLatin1String wrapper

fail
Metadata.cpp:51:74: error: call of overloaded ‘compare(const char [9], Qt::CaseSensitivity)’ is ambiguous
if(!isInSaveFile && xml.name().compare("savefile", Qt::CaseInsensitive) == 0) {
                                                                      ^
pass
if(!isInSaveFile && xml.name().compare(QLatin1String("savefile"), Qt::CaseInsensitive) == 0) {
fail
Metadata.cpp:69:59: error: call of overloaded ‘compare(const char [10], Qt::CaseSensitivity)’ is ambiguous
     if(xml.name().compare("timestamp", Qt::CaseInsensitive) == 0) {
                                                           ^
pass
if(xml.name().compare(QLatin1String("timestamp"), Qt::CaseInsensitive) == 0) {
fail
Metadata.cpp:79:66: error: call of overloaded ‘compare(const char [10], Qt::CaseSensitivity)’ is ambiguous
     } else if(xml.name().compare("signature", Qt::CaseInsensitive) == 0) {
                                                                  ^
pass
else if(xml.name().compare(QLatin1String("signature"), Qt::CaseInsensitive) == 0) {
fail
Metadata.cpp:87:73: error: call of overloaded ‘compare(const char [9], Qt::CaseSensitivity)’ is ambiguous
 if(isInSaveFile && xml.name().compare("savefile", Qt::CaseInsensitive) == 0) {
                                                                      ^
pass
if(isInSaveFile && xml.name().compare(QLatin1String("savefile"), Qt::CaseInsensitive) == 0) {
noabody commented 6 years ago

With my lack of programming background, the entire issue is ambiguous. Google, however, identified this: Doesn't compile with Qt 5.8 RC #195 Fix compilation error with Qt 5.8, resolves #195 #211 Fix build with newer Qt5

Ubuntu 18.04 Bionic

noabody commented 6 years ago

Close to pull request 10. https://github.com/myst6re/hyne/pull/10