Bug 142517

Summary: Build errors - calling KAction in kdegraphics/ligature/plugins/pdf/pdfMultipage.cpp
Product: [Applications] kghostview Reporter: Filip Brcic <filip.brcic>
Component: generalAssignee: Luís Pedro Coelho <luis>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Proposed patch to fix the problem

Description Filip Brcic 2007-03-04 18:33:43 UTC
Version:           ligature from KDE SVN (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc-4.1.1 
OS:                Linux

Here's what happens when I start make in ligature's directory:

kde4@brcha ~/build/KDE/kdegraphics/ligature/plugins/pdf $ make
makeobj[0]: Entering directory `/Users/kde4/build/KDE/kdegraphics/ligature/plugins/pdf'
[ 57%] Built target ligaturecore
[ 71%] Built target ligaturePluginGUI
Scanning dependencies of target ligaturePlugin_PDF
[ 71%] Building CXX object ligature/plugins/pdf/CMakeFiles/ligaturePlugin_PDF.dir/pdfMultipage.o
/Users/kde4/src/KDE/kdegraphics/ligature/plugins/pdf/pdfMultipage.cpp:271:2: warning: #warning CHECK THIS
/Users/kde4/build/KDE/kdegraphics/ligature/plugins/pdf/ui_optionDialogPdfWidget_base.h: In member function ‘void Ui_OptionDialogPdfWidget_base::setupUi(QWidget*)’:
/Users/kde4/build/KDE/kdegraphics/ligature/plugins/pdf/ui_optionDialogPdfWidget_base.h:58: warning: ‘__comp_ctor ’ is deprecated (declared at /usr/include/qt4/QtGui/qgridlayout.h:53)
/Users/kde4/src/KDE/kdegraphics/ligature/plugins/pdf/pdfMultipage.cpp: In constructor ‘PdfMultiPage::PdfMultiPage(QObject*, const QStringList&)’:
/Users/kde4/src/KDE/kdegraphics/ligature/plugins/pdf/pdfMultipage.cpp:60: error: no matching function for call to ‘KAction::KAction(KIcon, QString, KActionCollection*, const char [9])’
/usr/kde/trunk/include/kaction.h:236: note: candidates are: KAction::KAction(const KIcon&, const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:223: note:                 KAction::KAction(const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:215: note:                 KAction::KAction(QObject*)
/usr/kde/trunk/include/kaction.h:189: note:                 KAction::KAction(const KAction&)
/Users/kde4/src/KDE/kdegraphics/ligature/plugins/pdf/pdfMultipage.cpp:62: error: no matching function for call to ‘KAction::KAction(QString, KActionCollection*, const char [15])’
/usr/kde/trunk/include/kaction.h:236: note: candidates are: KAction::KAction(const KIcon&, const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:223: note:                 KAction::KAction(const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:215: note:                 KAction::KAction(QObject*)
/usr/kde/trunk/include/kaction.h:189: note:                 KAction::KAction(const KAction&)
/Users/kde4/src/KDE/kdegraphics/ligature/plugins/pdf/pdfMultipage.cpp:64: error: no matching function for call to ‘KAction::KAction(QString, KActionCollection*, const char [13])’
/usr/kde/trunk/include/kaction.h:236: note: candidates are: KAction::KAction(const KIcon&, const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:223: note:                 KAction::KAction(const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:215: note:                 KAction::KAction(QObject*)
/usr/kde/trunk/include/kaction.h:189: note:                 KAction::KAction(const KAction&)
/Users/kde4/src/KDE/kdegraphics/ligature/plugins/pdf/pdfMultipage.cpp:66: error: no matching function for call to ‘KAction::KAction(QString, KActionCollection*, const char [13])’
/usr/kde/trunk/include/kaction.h:236: note: candidates are: KAction::KAction(const KIcon&, const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:223: note:                 KAction::KAction(const QString&, QObject*)
/usr/kde/trunk/include/kaction.h:215: note:                 KAction::KAction(QObject*)
/usr/kde/trunk/include/kaction.h:189: note:                 KAction::KAction(const KAction&)
make[2]: *** [ligature/plugins/pdf/CMakeFiles/ligaturePlugin_PDF.dir/pdfMultipage.o] Error 1
make[1]: *** [ligature/plugins/pdf/CMakeFiles/ligaturePlugin_PDF.dir/all] Error 2
make: *** [all] Error 2
makeobj[0]: Leaving directory `/Users/kde4/build/KDE/kdegraphics/ligature/plugins/pdf'


I have svn version of kde{,pim}libs and kdebase. The ligature compiles correctly if I leave the default settings (with the PDF plugin switched off). I wanted to see why it was switched off and I got this error. In the KDE Api documentation it is written that you should call the KAction() like it was called, but when I looked at the source from kdelibs, it seamed that KAction had to be called like KAction(KIcon, string, QObject*parent) and that the action collection had to be put as the parent qobject. That's what I did and the problem was fixed. Now I only have to compile the CVS version of poppler to see how it works in reality (I got some more errors concerning my stable version of poppler where it is expected to have a CVS Version).
Comment 1 Filip Brcic 2007-03-04 18:36:06 UTC
Created attachment 19880 [details]
Proposed patch to fix the problem

Generated with svn diff on the latest svn revision (639188)
Comment 2 Filip Brcic 2007-03-04 18:37:09 UTC
PS: I am sorry for attaching this bug to kghostview. It should be attached to ligature, but I couldn't find it in the list of applications :(
Comment 3 Wilfried Huss 2007-03-19 20:29:26 UTC
The patch is commited.