Bug 199335

Summary: ktimetracker kontact plugin is missing context menu
Product: [Applications] ktimetracker Reporter: Thorsten Staerk <dev>
Component: generalAssignee: Thorsten Staerk <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thorsten Staerk 2009-07-07 20:46:43 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Since http://websvn.kde.org/?view=rev&revision=991655, made for https://bugs.kde.org/show_bug.cgi?id=198997, the kontact plugin of ktimetracker no longer shows a context menu.
Comment 1 Thorsten Staerk 2011-02-27 09:50:28 UTC
I guess related are lines 106ff in mainwindow.cpp:

    // Setup context menu request handling
    connect( m_part->widget(),
           SIGNAL( contextMenuRequested( const QPoint& ) ),
           this,
           SLOT( taskViewCustomContextMenuRequested( const QPoint& ) ) );
Comment 2 Thorsten Staerk 2011-02-27 11:02:43 UTC
Cannot put the code
 QMenu* pop = dynamic_cast<QMenu*>( factory()->container( i18n( "task_popup" ), this )
into taskview because factory is inherited from KXmlGuiClient
Comment 3 Thorsten Staerk 2011-02-27 11:37:54 UTC
Cannot put the code
 QMenu* pop = dynamic_cast<QMenu*>( factory()->container( i18n( "task_popup" ),
this )
into timetrackerwidget because factory() delivers 0
Comment 4 Thorsten Staerk 2011-02-27 13:56:56 UTC
I find that loadPart() fails. See http://techbase.kde.org/Development/Tutorials/Writing_kontact_plugins.
Comment 5 Thorsten Staerk 2011-02-27 14:32:32 UTC
loadParts uses the XML file to look up its popup menu. 

    kDebug(5970) << "xmlfile" << mPart->xmlFile();

delivers /root/.kde/share/apps/kontact/default-ktimetracker.rc which is EMPTY
Comment 6 Thorsten Staerk 2011-02-27 14:44:11 UTC
/root/.kde/share/apps/kontact/default-ktimetracker.rc is empty. When I copy ktimetrackerui.rc over it, I can run make install and it is still empty. But when I run kontact, it is emptied again.