This basically backports 3c38c2bb from solid (from the frameworks branch of kdelibs before the split). This is not enough to successfully compile with gcc-6, but it's at least one error less. REVIEW: 128160