Bug 285434 - Ktimetracker reached advanced level of decomposition
Summary: Ktimetracker reached advanced level of decomposition
Status: RESOLVED UNMAINTAINED
Alias: None
Product: ktimetracker
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Zoltan Gyarmati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-31 23:54 UTC by Cristian Tibirna
Modified: 2019-11-17 22:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Tibirna 2011-10-31 23:54:00 UTC
Version:           unspecified (using KDE 4.7.2) 
OS:                Linux

Starting ktimetracker in a virgin startup configuration gives a message "Could not create the KTimeTracker part" then an empty window.

But the bigger problem is that, if ktimetracker is installed, Kontact uses it, with disastruous effects, lowering considerably the user experience for Kontact as a whole. Even if ktimetracker is not installed, Kontact displays an icon offering time tracking but raises an error when trying to use it, to the effect that timetracker resource is absent/not installed. In some distributions, ktimetracker is NOT installed by default, even if kontact should require it.

As I said, when ktimetracker is used by kontact, clicking on the "Time tracking" icon brings up a resemblence of a function GUI, but trying to add a new task just brings forth the dialog for naming a new task but then raises the message "Error storing new task. Your changes were not saved. Make sure you can edit your iCalendar file. Also quit all applications using this file and remove any lock file related to its name from ~/.kde/share/apps/kabc/lock/".

One has to fiddle a lot around to realize that the problem is that ktimetracker is started in kontact without an open document. Opening a document manually brings back all the functionality that we expect. Creating a new  timetracking document with "New"  action (from menu or toolbar) is another way of rendering ktimetracker useable inside kontact. But clicking on the "New" action doesn't do anything visible, so it is difficult to realize that this was a necessary step.

Let's go back to the default state of ktimetracker in kontact at startup (seemingly active GUI but that doesn't do anything). In this state, invoking the action "Close" makes the GUI of ktimetracker vanish (it is replaced by an empty widget) but the search lineedit remains. Writing anything in this line edit or trying to create a new ktimetracker document using the action "New" crashes kontact.

Finally (but certainly not lastly, unfortunately), the menu merging is bungled. There are two "Quit" actions in the File menu when the timetracker part is active. This also makes the Ctrl+Q shortcut confused (says so if one tries to use it).

IMHO either ktimetracker is fixed or it is removed from kontact.



Reproducible: Always

Steps to Reproduce:
1) Start kontact when ktimetracker is not installed. You see icon for timetracking but there is no fonctionality available.

2) Start kontact with ktimetracker installed. Choose timetracker functionality. Try to add a task. An error message is raised (see above)

3) Start kontact. Choose timetracker functionality. Click on "Close" (red icon in toolbar). Type something in the remaining search lineedit => crash


4) Start kontact. Choose timetracker functionality. Click on "Close" (red icon in toolbar). Click on the "New document" action (or "New task") => crash

5) Start kontact. Choose timetracker functionality. Look at the "File" menu.


Actual Results:  
No functioning.
Crashes.
Bungled menus


Expected Results:  
Buckled up functioning of ktimetracker inside kontact (or even outside) or remove ktimetracker from kontact.
Comment 1 Sergio Martins 2012-08-15 12:11:49 UTC
Git commit bb773366167af50fc99025473dc20ab5ab41e1cc by Sergio Martins.
Committed on 15/08/2012 at 14:01.
Pushed by smartins into branch 'KDE/4.9'.

Make KTimeTracker start.

By using a dynamic_cast<> instead of a qobject_cast<>.

A proper fix would be fixing the CMakeLists.txt file:

ktimetrackerpart.cpp is defined twice, one in the ktimetracker
binary, and one in the plugin, this will make qobject_cast fail
somewhere in KPluginLoaded/KPluginFactory code.

I tried fixing CMakeLists.txt but it's not trivial, there's
a interdependency between stuff and couldn't get it to work with
the little time I have for it.
Related: bug 283479, bug 291258

M  +1    -1    ktimetracker/mainwindow.cpp

http://commits.kde.org/kdepim/bb773366167af50fc99025473dc20ab5ab41e1cc
Comment 2 Zoltan Gyarmati 2014-12-20 11:54:57 UTC
ktimetracker is disabled in kontact since commit 52973690723177e4a558fd777528ebfaa03ebafa   
and most likely will remain disabled for the KDE 4.x series
Comment 3 Alexander Potashev 2019-11-17 22:52:14 UTC
KTimeTracker is now ported to Qt5/KF5, however the Kontact plugin is dropped since the KDE PIM team and I agreed that KTimeTracker is not very relevant to KDE PIM/Kontact.

Thus, this bug is still RESOLVED as UNMAINTAINED.