Bug 447111 - 0.10.5 fails to build with Qt 5.12
Summary: 0.10.5 fails to build with Qt 5.12
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: 0.10.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-17 08:22 UTC by Wolfgang Bauer
Modified: 2021-12-17 10:48 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bauer 2021-12-17 08:22:45 UTC
Compiler errors:
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp: In member function 'void Latte::PlasmaExtended::PanelBackground::updateMaxOpacity(Plasma::Svg*)':
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp:124:16: error: 'class QImage' has no member named 'convertTo'
         center.convertTo(QImage::Format_ARGB32_Premultiplied);
                ^~~~~~~~~
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp: In member function 'void Latte::PlasmaExtended::PanelBackground::updateRoundnessFromMask(Plasma::Svg*)':
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp:171:16: error: 'class QImage' has no member named 'convertTo'
         corner.convertTo(QImage::Format_ARGB32_Premultiplied);
                ^~~~~~~~~
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp: In member function 'void Latte::PlasmaExtended::PanelBackground::updateRoundnessFromShadows(Plasma::Svg*)':
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp:339:16: error: 'class QImage' has no member named 'convertTo'
         corner.convertTo(QImage::Format_ARGB32_Premultiplied);
                ^~~~~~~~~
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp: In member function 'void Latte::PlasmaExtended::PanelBackground::updateRoundnessFallback(Plasma::Svg*)':
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp:500:16: error: 'class QImage' has no member named 'convertTo'
         corner.convertTo(QImage::Format_ARGB32_Premultiplied);
                ^~~~~~~~~
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp: In member function 'void Latte::PlasmaExtended::PanelBackground::updateShadow(Plasma::Svg*)':
/home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/panelbackground.cpp:572:16: error: 'class QImage' has no member named 'convertTo'
         border.convertTo(QImage::Format_ARGB32_Premultiplied);
                ^~~~~~~~~

According to the Qt docs, QImage::convertTo() was introduced in Qt 5.13...

Maybe it would be possible to use QImage::convertToFormat() instead? (at least when compiling with Qt < 5.13)
Apparently the only difference is that this returns a copy of the QImage instead of modifying it directly.
Comment 1 Michail Vourlakos 2021-12-17 08:34:16 UTC
(In reply to Wolfgang Bauer from comment #0)
> Compiler errors:
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp: In member function 'void
> Latte::PlasmaExtended::PanelBackground::updateMaxOpacity(Plasma::Svg*)':
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp:124:16: error: 'class QImage' has no member named
> 'convertTo'
>          center.convertTo(QImage::Format_ARGB32_Premultiplied);
>                 ^~~~~~~~~
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp: In member function 'void
> Latte::PlasmaExtended::PanelBackground::updateRoundnessFromMask(Plasma::
> Svg*)':
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp:171:16: error: 'class QImage' has no member named
> 'convertTo'
>          corner.convertTo(QImage::Format_ARGB32_Premultiplied);
>                 ^~~~~~~~~
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp: In member function 'void
> Latte::PlasmaExtended::PanelBackground::updateRoundnessFromShadows(Plasma::
> Svg*)':
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp:339:16: error: 'class QImage' has no member named
> 'convertTo'
>          corner.convertTo(QImage::Format_ARGB32_Premultiplied);
>                 ^~~~~~~~~
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp: In member function 'void
> Latte::PlasmaExtended::PanelBackground::updateRoundnessFallback(Plasma::
> Svg*)':
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp:500:16: error: 'class QImage' has no member named
> 'convertTo'
>          corner.convertTo(QImage::Format_ARGB32_Premultiplied);
>                 ^~~~~~~~~
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp: In member function 'void
> Latte::PlasmaExtended::PanelBackground::updateShadow(Plasma::Svg*)':
> /home/abuild/rpmbuild/BUILD/latte-dock-0.10.5/app/plasma/extended/
> panelbackground.cpp:572:16: error: 'class QImage' has no member named
> 'convertTo'
>          border.convertTo(QImage::Format_ARGB32_Premultiplied);
>                 ^~~~~~~~~
> 
> According to the Qt docs, QImage::convertTo() was introduced in Qt 5.13...
> 
> Maybe it would be possible to use QImage::convertToFormat() instead? (at
> least when compiling with Qt < 5.13)
> Apparently the only difference is that this returns a copy of the QImage
> instead of modifying it directly.

which distro is still using the outdated Qt 5.12?
Comment 2 Michail Vourlakos 2021-12-17 09:21:51 UTC
Git commit 67c38b194f812e0b4750e4ace95aaa2ba7c59d97 by Michail Vourlakos.
Committed on 17/12/2021 at 09:20.
Pushed by mvourlakos into branch 'v0.10'.

still support Qt5 >= 5.12

M  +21   -0    app/plasma/extended/panelbackground.cpp

https://invent.kde.org/plasma/latte-dock/commit/67c38b194f812e0b4750e4ace95aaa2ba7c59d97
Comment 3 Michail Vourlakos 2021-12-17 09:22:16 UTC
please check again with stable branch v0.10
Comment 4 Wolfgang Bauer 2021-12-17 09:57:27 UTC
(In reply to Michail Vourlakos from comment #1)
> which distro is still using the outdated Qt 5.12?

openSUSE Leap.

(In reply to Michail Vourlakos from comment #3)
> please check again with stable branch v0.10

It compiles successfully now, thanks.

Btw, you could have used something like this instead of parsing the QtGui version in CMakeLists.txt:
#if QTGUI_VERSION >= QT_VERSION_CHECK(5, 13, 0)

(QTGUI_VERSION is defined in QtGui/qtguiversion.h, and there's also QT_VERSION in qtglobals.h)
Comment 5 Michail Vourlakos 2021-12-17 10:06:21 UTC
(In reply to Wolfgang Bauer from comment #4)
> (In reply to Michail Vourlakos from comment #1)
> #if QTGUI_VERSION >= QT_VERSION_CHECK(5, 13, 0)
> 

Oh really nice! I will use that one!
BTW I found also one important bug that is triggered in startup so in the weekend there will be a new 0.10.6 if you want to delay this.
Comment 6 Wolfgang Bauer 2021-12-17 10:48:38 UTC
(In reply to Michail Vourlakos from comment #5)
> BTW I found also one important bug that is triggered in startup so in the
> weekend there will be a new 0.10.6 if you want to delay this.

Thanks for the info!
I'll wait with the update for the openSUSE package then.