Bug 152456 - when saving fails, there is no info if disk is full or locking did not work.
Summary: when saving fails, there is no info if disk is full or locking did not work.
Status: RESOLVED FIXED
Alias: None
Product: ktimetracker
Classification: Unclassified
Component: general (show other bugs)
Version: Git (master)
Platform: Compiled Sources Linux
: NOR normal with 20 votes (vote)
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-17 11:23 UTC by Thorsten Staerk
Modified: 2008-04-27 11:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
changing kcalc to deliver an error msg if saving fails on icalendars. (8.77 KB, patch)
2008-01-13 22:18 UTC, Thorsten Staerk
Details
change kcalc::resourcecalendar::save() from bool to QString (19.92 KB, patch)
2008-01-14 00:06 UTC, Thorsten Staerk
Details
how it could look like - still resourcecalendar is missing (4.53 KB, patch)
2008-01-16 20:36 UTC, Thorsten Staerk
Details
how it could be (8.13 KB, patch)
2008-01-16 23:19 UTC, Thorsten Staerk
Details
how it could be - old changes adopted (9.98 KB, patch)
2008-01-20 08:42 UTC, Thorsten Staerk
Details
works for me now (12.17 KB, patch)
2008-01-20 14:18 UTC, Thorsten Staerk
Details
solution that fits into kdepimlibs' release plan (1.48 KB, patch)
2008-02-13 23:31 UTC, Thorsten Staerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Staerk 2007-11-17 11:23:51 UTC
Version:           4 (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

When saving fails, ktimetracker cannot deliver any information what the problem is, a full disk or a stale lock. The culprit are the libs.
Comment 1 Thorsten Staerk 2007-11-17 12:26:00 UTC
Discussed this with Cornelius last january.
Comment 2 Thorsten Staerk 2008-01-13 19:26:55 UTC
SVN commit 760928 by tstaerk:

Deliver why saving failed. Discussed with Cornelius at Osnabrück 2007.
CCBUGS:152456


 M  +32 -0     filestorage.cpp  
 M  +5 -0      filestorage.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=760928
Comment 3 Thorsten Staerk 2008-01-13 20:47:31 UTC
Here's some useful output where I added debugging output to some kcal files and called ktimetracker /tmp:

ktimetracker(10470) KarmStorage::saveCalendar: Entering KarmStorage::saveCalendar
ktimetracker(10470)/kdepimlibs (kabc) KABC::Lock::lock: -- lock name: "/home/kde-devel/.kde4/share/apps/kabc/lock/_tmp.lock"
ktimetracker(10470)/kdepimlibs (kabc) KABC::Lock::lock: -- lock unique name: "/home/kde-devel/.kde4/share/apps/kabc/lock/_tmpUiZd5sUC"
ktimetracker(10470)/kdepimlibs (kcal) KCal::ResourceCalendar::save: Entering ResourceCalendar::save
ktimetracker(10470)/kdepimlibs (kcal) KCal::ResourceCalendar::save: Save resource "KTimeTracker"
ktimetracker(10470)/kdepimlibs (kcal) KCal::ResourceLocal::doSave: Entering ResourceLocal::doSave( bool syncCache )
ktimetracker(10470)/kdepimlibs (kcal) KCal::CalendarLocal::save: Entering CalendarLocal::save( const QString &fileName, CalFormat *format )
ktimetracker(10470)/kdepimlibs (kcal) KCal::FileStorage::save: Entering FileStoRAge::save()
ktimetracker(10470)/kdepimlibs (kcal) KCal::ICalFormat::save: "/tmp"
ktimetracker(10470)/kdepimlibs (kcal) KCal::ICalFormat::save: err: "Unable to open temporary file."
QFile::remove: Empty or null file name
ktimetracker(10470)/kdepimlibs (kcal) KCal::FileStorage::save: FileStorage::save(): "Save Error: Error saving to '/tmp'."
Comment 4 Thorsten Staerk 2008-01-13 22:18:39 UTC
Created attachment 23013 [details]
changing kcalc to deliver an error msg if saving fails on icalendars.

karmStoRage can then call saveAndReTurnErrorMessAge and get the result of the
saving action in english plain text.
Comment 5 Thorsten Staerk 2008-01-14 00:06:25 UTC
Created attachment 23016 [details]
change kcalc::resourcecalendar::save() from bool to QString

I wanted it originally like this and winterz asked for that after my recent
commit.
Comment 6 Thorsten Staerk 2008-01-15 23:30:41 UTC
discussed in irc - function will be bool save(QString& store_error_msg_here)
Comment 7 Thorsten Staerk 2008-01-16 20:36:44 UTC
Created attachment 23081 [details]
how it could look like - still resourcecalendar is missing
Comment 8 Thorsten Staerk 2008-01-16 23:19:46 UTC
Created attachment 23089 [details]
how it could be
Comment 9 Thorsten Staerk 2008-01-20 08:42:16 UTC
Created attachment 23151 [details]
how it could be - old changes adopted
Comment 10 Thorsten Staerk 2008-01-20 14:18:25 UTC
Created attachment 23158 [details]
works for me now
Comment 11 Thorsten Staerk 2008-02-03 12:12:42 UTC
needs to create new virtual functions which disturbes the table of virtual function which makes it binary incompatible which is allowed for KDE 5 which will contain Akonadi instead
Comment 12 Thorsten Staerk 2008-02-09 16:41:07 UTC
There was an idea by vkrause (no, I will not play on words here) to resolv this like that:

QString save(blah)
{
  save(blah);
  return lastError;
}
Comment 13 Thorsten Staerk 2008-02-13 23:31:28 UTC
Created attachment 23565 [details]
solution that fits into kdepimlibs' release plan
Comment 14 Thorsten Staerk 2008-04-27 11:35:41 UTC
Thanks for your help vkrause and cornelius, thanks for committing winterz!