Bug 392457 - Tellico 3.1.2 fails to compile with Qt 5.6.2
Summary: Tellico 3.1.2 fails to compile with Qt 5.6.2
Status: RESOLVED FIXED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: 3.1.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Robby Stephenson
URL: https://build.opensuse.org/build/home...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-28 15:50 UTC by Wolfgang Bauer
Modified: 2018-03-28 16:53 UTC (History)
1 user (show)

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


Attachments
Patch that fixed the compilation (17.12 KB, patch)
2018-03-28 15:50 UTC, Wolfgang Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bauer 2018-03-28 15:50:01 UTC
Created attachment 111704 [details]
Patch that fixed the compilation

I got compiler errors like this when trying to build the new release on openSUSE Leap 42.3:
/home/abuild/rpmbuild/BUILD/tellico-3.1.2/src/fetch/allocinefetcher.cpp:379:52: error: lambda-expression in unevaluated context
   foreach(const QVariant& variant, resultMap.value(QStringLiteral("genre")).toList()) {
                                                    ^

The reason is the switch from QLatin1String() to QStringLiteral() in that foreach() statement, which apparently causes problems with Qt 5.6.

I attached a patch that shows all affected places.

It built fine (unmodified) with Qt 5.9 and 5.10, I haven't tried other Qt versions.
Comment 1 Wolfgang Bauer 2018-03-28 16:05:27 UTC
(In reply to Wolfgang Bauer from comment #0)
> It built fine (unmodified) with Qt 5.9 and 5.10, I haven't tried other Qt
> versions.

To avoid misunderstandings: the original (unpatched) tellico 3.1.2 sources built fine with Qt 5.9 and Qt 5.10, but not 5.6. The attached patch made it compile with Qt 5.6 too.
Comment 2 Bruno Cornec 2018-03-28 16:16:17 UTC
I can confirm that you patch works fine as well on my mageia 6 distribution, which also has QT 5.6.2. 

Thanks as it will allow us to update tellico ;-)
Comment 3 Robby Stephenson 2018-03-28 16:53:20 UTC
Git commit 8e6c74d6f23ff06d615d1eb5e3fda2a786a1b3fc by Robby Stephenson.
Committed on 28/03/2018 at 16:51.
Pushed by rstephenson into branch '3.1'.

Fix compilation with Qt 5.6

QStringLiteral doesn't work everywhere apparently for Qt 5.6. Revert
some changes made by clazy.

Thanks to the patch from Wolfgang Bauer.
FIXED-IN: 3.1.3

M  +4    -0    ChangeLog
M  +3    -3    src/fetch/allocinefetcher.cpp
M  +7    -7    src/fetch/discogsfetcher.cpp
M  +6    -6    src/fetch/doubanfetcher.cpp
M  +1    -1    src/fetch/filmasterfetcher.cpp
M  +1    -1    src/fetch/googlebookfetcher.cpp
M  +2    -2    src/fetch/igdbfetcher.cpp
M  +1    -1    src/fetch/imdbfetcher.cpp
M  +2    -2    src/fetch/isbndbfetcher.cpp
M  +1    -1    src/fetch/kinofetcher.cpp
M  +1    -1    src/fetch/moviemeterfetcher.cpp
M  +2    -2    src/fetch/openlibraryfetcher.cpp
M  +5    -5    src/fetch/themoviedbfetcher.cpp

https://commits.kde.org/tellico/8e6c74d6f23ff06d615d1eb5e3fda2a786a1b3fc