Hi Andreas, thank you for the patch.
Looking at it, I havenoticed an Qt issue: In Qt 5, there is typedef QLatin1String QLatin1Literal; However, I cannot find the original template constructor: template<int N> QLatin1Literal(const char(&str)[N]) So I am afraid this solution here requires char counting until '\0' https://github.com/qt/qtbase/blob/601019e3f42516b5799fe519115f8fbdf44ed18a/src/corelib/tools/qstring.h#L92 QString has now a template constructor: https://github.com/qt/qtbase/blob/601019e3f42516b5799fe519115f8fbdf44ed18a/src/corelib/tools/qstring.h#L664 The sting-builder has the template constructor all the time. https://github.com/qt/qtbase/blob/601019e3f42516b5799fe519115f8fbdf44ed18a/src/corelib/tools/qstringbuilder.h#L280 Conclusion: User Plain char[N] strings in connection with the String builder operator % Would you mind to update the patch or better issue a Github Pull request? Thank you. Kind regards, Daniel 2016-09-20 8:34 GMT+02:00 Andreas Müller <schnitzelt...@googlemail.com>: > fixes (with gcc-6 / Qt5.7): > src/library/coverart.cpp:35:44: error: no match for 'operator%' (operand > types are 'QString' and 'QLatin1Literal {aka QLatin1String}') > return typeToString(infoRelative.type) % QLatin1Literal(",") % > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ > src/library/coverart.cpp: In function 'QString > {anonymous}::coverInfoToString(const > CoverInfo&)': > src/library/coverart.cpp:42:44: error: no match for 'operator%' (operand > types are 'QString' and 'QLatin1Literal {aka QLatin1String}') > return coverInfoRelativeToString(info) % QLatin1Literal(",") % > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ > > Signed-off-by: Andreas Müller <schnitzelt...@googlemail.com> > --- > src/library/coverart.cpp | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/library/coverart.cpp b/src/library/coverart.cpp > index 621b424..2afc5f0 100644 > --- a/src/library/coverart.cpp > +++ b/src/library/coverart.cpp > @@ -1,5 +1,5 @@ > #include <QtDebug> > -#include <QLatin1Literal> > +#include <QStringBuilder> > > #include "library/coverart.h" > #include "library/coverartutils.h" > @@ -32,15 +32,15 @@ QString typeToString(CoverInfo::Type type) { > } > > QString coverInfoRelativeToString(const CoverInfoRelative& infoRelative) > { > - return typeToString(infoRelative.type) % QLatin1Literal(",") % > - sourceToString(infoRelative.source) % QLatin1Literal(",") % > - infoRelative.coverLocation % QLatin1Literal(",") % > - QLatin1Literal("0x") % QString::number(infoRelative.hash, 16); > + return typeToString(infoRelative.type) % QLatin1String(",") % > + sourceToString(infoRelative.source) % QLatin1String(",") % > + infoRelative.coverLocation % QLatin1String(",") % > + QLatin1String("0x") % QString::number(infoRelative.hash, 16); > } > > QString coverInfoToString(const CoverInfo& info) { > - return coverInfoRelativeToString(info) % QLatin1Literal(",") % > - info.trackLocation % QLatin1Literal(","); > + return coverInfoRelativeToString(info) % QLatin1String(",") % > + info.trackLocation % QLatin1String(","); > } > } // anonymous namespace > > -- > 2.5.5 > > > ------------------------------------------------------------ > ------------------ > _______________________________________________ > Get Mixxx, the #1 Free MP3 DJ Mixing software Today > http://mixxx.org > > > Mixxx-devel mailing list > Mixxx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mixxx-devel
------------------------------------------------------------------------------
_______________________________________________ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel