Build error with frameworkintegration

Kevin Funk kfunk at kde.org
Mon Sep 29 16:35:22 UTC 2014


On Monday 29 September 2014 15:32:31 Aleix Pol wrote:
> On Mon, Sep 29, 2014 at 1:25 PM, nerdopolis <bluescreen_avenger at verizon.net>
> wrote:
> > Hi.
> > 
> > It seems that a recent build error when trying to build Frameworks master
> > against QT 5.4. (well a warning being treated as an error)
> > 
> > I build all the Frameworks with my own scripts, because I need
> > checkinstall. However, other then changing the prefix to /opt, I am using
> > default configurations, except for turning on -DKDE_ENABLE_EXCEPTIONS, as
> > I
> > turned it on to get Frameworks to compile on 14.04, but I'm not sure if
> > that is needed anymore.
> > 
> > I am compiling on Ubuntu 14.10, and using the default gcc 4.9
> > 
> > This is the build error I get
> > [ 65%] Building CXX object
> > src/platformtheme/CMakeFiles/KDEPlatformTheme.dir/kfiletreeview.cpp.o
> > /srcbuild/kf5-frameworkintegration/src/platformtheme/kdeplatformsystemtray
> > icon.cpp: In member function ‘virtual QPlatformMenuItem*
> > SystemTrayMenu::createMenuItem() const’:
> > /srcbuild/kf5-frameworkintegration/src/platformtheme/kdeplatformsystemtray
> > icon.cpp:44:35: error: invalid new-expression of abstract class type
> > ‘SystemTrayMenuItem’> 
> >      return new SystemTrayMenuItem();
> >      
> >                                    ^
> > 
> > In file included from
> > /srcbuild/kf5-frameworkintegration/src/platformtheme/kdeplatformsystemtray
> > icon.cpp:20:0:
> > /srcbuild/kf5-frameworkintegration/src/platformtheme/kdeplatformsystemtra
> > yicon.h:60:7: note:   because the following virtual functions are pure
> > within
> > 
> > ‘SystemTrayMenuItem’:
> >  class SystemTrayMenuItem : public QPlatformMenuItem
> >  
> >        ^
> > 
> > In file included from
> > /srcbuild/kf5-frameworkintegration/src/platformtheme/kdeplatformsystemtray
> > icon.h:23:0,> 
> >                  from
> > 
> > /srcbuild/kf5-frameworkintegration/src/platformtheme/kdeplatformsystemtray
> > icon.cpp:20:> 
> > /opt/include/QtGui/5.4.0/QtGui/qpa/qplatformmenu.h:81:18: note:
> >  virtual void QPlatformMenuItem::setIconSize(int)
> >  
> >      virtual void setIconSize(int size) = 0;
> >      
> >                   ^

This seems to be a fairly new pure-virtual method in QPlatformMenu.

https://qt.gitorious.org/qt/qtbase/commit/b53f6fdd313f71f05b99093966736a8f7442ded8

For a work-around, to make it compile, implement that function and give it an 
empty body. We'll have to fix it properly of course :)

> > /srcbuild/kf5-frameworkintegration/src/platformtheme/kdeplatformsystemtray
> > icon.cpp:45:1: error: control reaches end of non-void function
> > [-Werror=return-type]> 
> >  }
> >  ^
> > 
> > cc1plus: some warnings being treated as errors
> > 
> > I even tried a clean rebuild of all kde frameworks master, and qt 5.4
> > 
> > How do I turn off werror?
> > 
> > Thanks.
> > _______________________________________________
> > Kde-frameworks-devel mailing list
> > Kde-frameworks-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
> 
> https://git.reviewboard.kde.org/r/120422/diff/#
> 
> You don't turn off errors... ;)
> 
> Aleix

-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org


More information about the Kde-frameworks-devel mailing list