Fix build with gcc 4.8

Authored by wbauer on May 5 2017, 11:51 AM.



When trying to build krusader 2.6.0 with gcc 4.8, I got this error message:

/home/abuild/rpmbuild/BUILD/krusader-2.6.0/krusader/FileSystem/sizecalculator.cpp: In member function 'void SizeCalculator::slotStatResult(KJob*)':
/home/abuild/rpmbuild/BUILD/krusader-2.6.0/krusader/FileSystem/sizecalculator.cpp:139:98: error: no matching function for call to 'SizeCalculator::connect(QPointer<KIO::DirectorySizeJob>&, void (KJob::*)(KJob*, KJob::QPrivateSignal), SizeCalculator* const, void (SizeCalculator::*)(KJob*))'
     connect(m_directorySizeJob, &KIO::Job::result, this, &SizeCalculator::slotDirectorySizeResult);

This patch fixes the problem.

(inspired by

Test Plan

Builds fine now with gcc 4.8, and still builds with gcc 6.3.1 as before.

Diff Detail

R167 Krusader
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
wbauer created this revision.May 5 2017, 11:51 AM
martinkostolny added a subscriber: martinkostolny.

Everything still seems to work just fine. Thanks for fixing older gcc compatibility!

This revision is now accepted and ready to land.May 7 2017, 1:45 PM
abika added a subscriber: abika.May 7 2017, 3:35 PM

Oh damn, I overlooked this again. The title lead me to believe this is something unimportant in kde-devel.

Thanks Martin for testing!

I'm curious and clueless: Why is GCC4.8 still widely used?

wbauer added a comment.May 7 2017, 8:40 PM
In D5714#107575, @abika wrote:

I'm curious and clueless: Why is GCC4.8 still widely used?

Well, switching the compiler in a distribution means having to rebuild all packages and may break things (like in this case).
LTS and commercial distributions probably are not very keen on doing that light-heartedly (and they tend to be more conservative anyway).

In openSUSE Leap e.g. the default compiler is still gcc 4.8 (in the latest Leap 42.2, but also in the next/upcoming Leap 42.3 that will be released in July), as it is based on the commercial SUSE Linux Enterprise 12.

This revision was automatically updated to reflect the committed changes.
abika added a comment.May 8 2017, 6:23 PM

Thanks for the info. Problem is I can't switch to GCC4.8 (not even an official package in Arch Linux repos) and the CI doesn't cover this either.

So, I can't guarantee that this won't happen again.