Bug 298777 - Better handling of missing data source files
Summary: Better handling of missing data source files
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.4
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-25 03:54 UTC by Ben Lewis
Modified: 2012-06-07 16:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Lewis 2012-04-25 03:54:38 UTC
When Kst cannot find a data file it generates a generic error which does not help the user identify that the data file is missing.

A better solution is to inform the user that one or more data files are missing and give the user the opportunity to locate it/them.

Reproducible: Didn't try

Steps to Reproduce:
1. Start a new Kst session
2. Import some data from an external file
3. Save the session and close Kst
4. Move the data file to a new location
5. Open the recently saved .kst file
Actual Results:  
A generic error is generated:
"Error opening document 'path/to/kst/file': Maybe it is a Kst1 file which could not be read by Kst2."

Expected Results:  
Kst should inform the user that data file(s) are missing and give the user the opportunity to locate them.

At a minimum Kst should generate an error specific to the problem e.g.

Error: Cannot find data file "path/to/data/file/datafilename"

An even better solution would be to have a dialogue box that informs the user that one or more data files are missing. For each missing data file the user is presented with three options:

1. Ignore - the .kst file opens but with data missing
2. Browse - opens a dialogue box for the user to browse for the missing file
3. Cancel - the .kst file is not loaded

It would also be good if this worked for a change in name of the data file i.e. when the user is given the opportunity to browse to find the missing file, the selected file does not have to have the same name as the original file.
Comment 1 Netterfield 2012-06-07 16:06:47 UTC
SVN commit 1298835 by netterfield:

If, when loading a kst file, a datasource can't be found, prompt the
user for an alternate.

This required moving datasourcepluginfactory to libkstapp.  So a
complete recompile will be required, as the libraries will change.

Also,
Add a option to interpret a vector as EXCEL time.


 M  +2 -0      cmake/src/libkst/CMakeLists.txt  
 D             src/libkst/builtindatasources.cpp  
 D             src/libkst/builtindatasources.h  
 M  +8 -0      src/libkst/datasource.cpp  
 M  +12 -3     src/libkst/datasource.h  
 D             src/libkst/datasourcepluginfactory.cpp  
 D             src/libkst/datasourcepluginfactory.h  
 M  +1 -1      src/libkst/datasourcepluginmanager.cpp  
 M  +1 -0      src/libkst/libkst.pro  
 M  +1 -0      src/libkstapp/aboutdialog.cpp  
 A             src/libkstapp/baddatasourcedialog.cpp   [License: GPL (v2+)]
 A             src/libkstapp/baddatasourcedialog.h   [License: GPL (v2+)]
 AM            src/libkstapp/baddatasourcedialog.ui  
 A             src/libkstapp/builtindatasources.cpp   src/libkst/builtindatasources.cpp#1296680 [License: GPL (v2+)]
 A             src/libkstapp/builtindatasources.h   src/libkst/builtindatasources.h#1296680 [License: GPL (v2+)]
 A             src/libkstapp/datasourcepluginfactory.cpp   src/libkst/datasourcepluginfactory.cpp#1296680 [License: GPL (v2+)]
 A             src/libkstapp/datasourcepluginfactory.h   src/libkst/datasourcepluginfactory.h#1296680 [License: GPL (v2+)]
 M  +1 -1      src/libkstapp/mainwindow.cpp  
 M  +4 -0      src/libkstapp/plotaxis.cpp  
 M  +4 -2      src/libkstmath/plotdefines.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1298835