Bug 373509 - Error building kmplayer 0.12.0b: 'class QString' has no member named 'utf8'
Summary: Error building kmplayer 0.12.0b: 'class QString' has no member named 'utf8'
Status: RESOLVED FIXED
Alias: None
Product: kmplayer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR grave
Target Milestone: ---
Assignee: Koos Vriezen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-10 18:47 UTC by Giovanni Mariani
Modified: 2016-12-14 19:46 UTC (History)
0 users

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


Attachments
Full log of a failed build (207.57 KB, text/plain)
2016-12-10 18:47 UTC, Giovanni Mariani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Mariani 2016-12-10 18:47:40 UTC
Created attachment 102722 [details]
Full log of a failed build

Trying to build kmplayer 0.12.0b for the upcoming release of Rosa Linux x86_64
(a Mandriva derivative). Using KF5 5.27 and Qt5 5.6.2; gcc 5.3.1 and cmake 3.6.1.

The build fails at kmplayerplaylist.cpp with a couple of errors:
********************************
/tmp/abf/rpmbuild/BUILD/kmplayer-0.12.0b/src/kmplayerplaylist.cpp: In function 'void KMPlayer::readXML(KMPlayer::NodePtr, QTextStream&, const QString&, bool)':
/tmp/abf/rpmbuild/BUILD/kmplayer-0.12.0b/src/kmplayerplaylist.cpp:1602:29: error: 'class QString' has no member named 'utf8'
         QByteArray ba = str.utf8 ();
                             ^
/tmp/abf/rpmbuild/BUILD/kmplayer-0.12.0b/src/kmplayerplaylist.cpp:1609:34: error: no matching function for call to 'QTextStream::read()'
         QByteArray ba = in.read ().utf8 ();
                                  ^
In file included from /tmp/abf/rpmbuild/BUILD/kmplayer-0.12.0b/src/kmplayerplaylist.cpp:22:0:
/usr/include/qt5/QtCore/qtextstream.h:129:13: note: candidate: QString QTextStream::read(qint64)
     QString read(qint64 maxlen);
             ^
/usr/include/qt5/QtCore/qtextstream.h:129:13: note:   candidate expects 1 argument, 0 provided
***************************

Qt version mismatch?
Comment 1 Koos Vriezen 2016-12-11 20:21:21 UTC
Does applying
https://cgit.kde.org/kmplayer.git/patch/?id=8b5d375c25555d9a5c3984d6e6f21a6b8d3e5afa
then compile?
I have no idea why it compiled for me, its old qt3 code.
Comment 2 Giovanni Mariani 2016-12-12 09:22:39 UTC
(In reply to Koos Vriezen from comment #1)
> Does applying
> https://cgit.kde.org/kmplayer.git/patch/
> ?id=8b5d375c25555d9a5c3984d6e6f21a6b8d3e5afa
> then compile?
> I have no idea why it compiled for me, its old qt3 code.
No, it solves only the first issue...
This one is still present:
/tmp/abf/rpmbuild/BUILD/kmplayer-0.12.0b/src/kmplayerplaylist.cpp:1609:34: error: no matching function for call to 'QTextStream::read()'
...
/usr/include/qt5/QtCore/qtextstream.h:129:13: note:   candidate expects 1 argument, 0 provided
Comment 3 Koos Vriezen 2016-12-12 18:52:04 UTC
Ah yes, follow-up patch at
https://cgit.kde.org/kmplayer.git/patch/?id=271ccae67d6efcb574e1791827d61a285b771687

Compiles now?
Comment 4 Giovanni Mariani 2016-12-13 18:21:52 UTC
(In reply to Koos Vriezen from comment #3)
> Ah yes, follow-up patch at
> https://cgit.kde.org/kmplayer.git/patch/
> ?id=271ccae67d6efcb574e1791827d61a285b771687
> 
> Compiles now?
With the above git commit surely no...
The change is the same as in the second part of 8b5d375c25555d9a5c3984d6e6f21a6b8d3e5afa, so it was already applied when I got the other failure.
AFAICT the issue number two is that the definition of qtextstream from qt5 headers does not match the one used by kmplayerplaylist.cpp at line 22 (in the log the output is mixed because I'm building with -j4...).
Comment 5 Koos Vriezen 2016-12-14 17:43:47 UTC
No, the first commit changed the `QString::utf8()` to `QString::toUtf8()`, the second changed `QTextString::read()` to `QTextStream::readAll()`.
Could you attach your build output?
Comment 6 Giovanni Mariani 2016-12-14 18:37:20 UTC
(In reply to Koos Vriezen from comment #5)
> No, the first commit changed the `QString::utf8()` to `QString::toUtf8()`,
> the second changed `QTextString::read()` to `QTextStream::readAll()`.
> Could you attach your build output?
Aah... crap.
I made a mess while patching.
Yes: 271ccae67d6efcb574e1791827d61a285b771687 fixes the build for me.
Sorry for the noise...