Summary: | kaffeine-2.0.14: build error: no matching function for call to ‘asString(DvbTransponderBase::TransmissionType) | ||
---|---|---|---|
Product: | [Applications] kaffeine | Reporter: | Andreas Sturmlechner <asturm> |
Component: | general | Assignee: | Mauro Carvalho Chehab <mchehab> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arojas, fabian |
Priority: | NOR | ||
Version: | 2.0.14 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
See Also: | https://bugreports.qt.io/browse/QTBUG-68307 | ||
Latest Commit: | https://commits.kde.org/kaffeine/06b78c5f24891fd38d25ed64f5029106eec7c4fb | Version Fixed In: | |
Attachments: |
build.log
replace qPrintable() by a macro used only at Kaffeine replace qPrintable() by a macro used only at Kaffeine v2 Fix use of qPrintable |
Hmm... the line in question is this one: qCWarning(logDev, "Unknown transmission type %s", qPrintable(transponder.getTransmissionType())); With sounds OK on my eyes, as qPrintable is a valid statement: http://doc.qt.io/qt-5/qtglobal.html#qPrintable As Qt 5.11 is still a WIP, I suspect that this is a transitory regression at their development tree. You should probably open a bug for Qt. upstream report: https://bugreports.qt.io/browse/QTBUG-68307 AFAICT this is not actually valid use of qPrintable. The documentation states that it is a function which takes a const-ref to a QString, which means the argument has to be either a QString or implicitly convertable. This is not the case for this use. That this worked at all is due to a violation of the documentation in Qt itself, it's a macro and not a function. The change which broke Kaffeine is this: -# define qPrintable(string) QString(string).toLocal8Bit().constData() +# define qPrintable(string) QtPrivate::asString(string).toLocal8Bit().constData() It replaces the explicit converstion to QString with an implicit converstion. This means it's now behaving as documented. Created attachment 112687 [details] replace qPrintable() by a macro used only at Kaffeine Based on the comments at: https://bugreports.qt.io/browse/QTBUG-68307, qt5 seems to be explicitly breaking qPrintable() API. So, add a replacement for it. (In reply to Mauro Carvalho Chehab from comment #4) > Created attachment 112687 [details] > replace qPrintable() by a macro used only at Kaffeine > > Based on the comments at: https://bugreports.qt.io/browse/QTBUG-68307, qt5 > seems to be explicitly breaking qPrintable() API. > > So, add a replacement for it. That's much longer than it needs to be - what about changing only the failing cases to qPrintable(QString(foo))? Created attachment 112690 [details] replace qPrintable() by a macro used only at Kaffeine v2 (In reply to Fabian Vogt from comment #5) > (In reply to Mauro Carvalho Chehab from comment #4) > > Created attachment 112687 [details] > > replace qPrintable() by a macro used only at Kaffeine > > > > Based on the comments at: https://bugreports.qt.io/browse/QTBUG-68307, qt5 > > seems to be explicitly breaking qPrintable() API. > > > > So, add a replacement for it. > > That's much longer than it needs to be - what about changing only the > failing cases to qPrintable(QString(foo))? It is hard to tell what's wrong with qt5.11 without having it installed :-) Could you please check if the enclosed patch is enough? Created attachment 112692 [details]
Fix use of qPrintable
It was not - it didn't even touch the code in the posted build log ;-)
I attached a patch which fixes all compile errors here.
Git commit 06b78c5f24891fd38d25ed64f5029106eec7c4fb by Mauro Carvalho Chehab, on behalf of Fabian Vogt. Committed on 16/05/2018 at 19:39. Pushed by mauroc into branch 'master'. Fix breakages with qt5.11-rc2 On Qt5.11, there was a change at the way qPrintable() works. There, the var using it should be already a QString() type, not allowing implicit conversions. With that, some usages of qPrintable() are invalid for qt5.11, as the vars to be printed are either enums or integers. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> M +2 -2 src/backend-vlc/vlcmediawidget.cpp M +1 -1 src/dvb/dvbdevice_linux.cpp M +1 -1 src/dvb/dvbrecording.cpp M +4 -4 src/sqlinterface.cpp https://commits.kde.org/kaffeine/06b78c5f24891fd38d25ed64f5029106eec7c4fb |
Created attachment 112070 [details] build.log This build failure is most likely caused by Qt-5.11 due to internal header cleanup.