Version: 0.92 (using KDE KDE 3.1) Installed from: RedHat RPMs OS: Linux There may be situations in which more than one of the KstDataSource plugins is willing to try and read in a given datafile, based on the filename, format, etc. It might be advantageous to add an out parameter to the "understands" function such that a KstDataSource can indicate its level of certainty that it does understand a particular file. (e.g. UNDERSTAND_DEFINITE, UNDERSTAND_POSSIBLE, UNDERSTAND_WILL_GIVE_IT_A_GO) This parameter could then be used to select the best suited KstDataSource. All else being equal the first KstDataSource queried will be assigned the file.
Subject: Re: [Kst] New: priority of data sources On Wednesday 12 November 2003 16:59, Andrew Walker wrote: > There may be situations in which more than one of the KstDataSource plugins > is willing to try and read in a given datafile, based on the filename, > format, etc. > > It might be advantageous to add an out parameter to the "understands" > function such that a KstDataSource can indicate its level of certainty that > it does understand a particular file. (e.g. UNDERSTAND_DEFINITE, > UNDERSTAND_POSSIBLE, UNDERSTAND_WILL_GIVE_IT_A_GO) This parameter could > then be used to select the best suited KstDataSource. All else being equal > the first KstDataSource queried will be assigned the file. Yes we have been discussing this as well. There are a couple of approaches to this and I expect I will make this change sometime before the end of the month.
CVS commit by staikos: implement data source priorities understands_ now returns an int, defined to be 0..100 as a "percentage match" CCMAIL: 68074-done@bugs.kde.org M +1 -1 devel-docs/RELEASE_PLAN 1.19 M +30 -6 kst/kstdatasource.cpp 1.25 M +4 -4 kst/datasources/ascii/ascii.cpp 1.18 M +4 -4 kst/datasources/dirfile/dirfile.cpp 1.8 M +3 -3 kst/datasources/frame/frame.cpp 1.5 M +5 -5 kst/datasources/indirect/indirect.cpp 1.3 M +3 -5 kst/datasources/lfiio/lfiio.cpp 1.8 M +2 -2 kst/datasources/planck/planck.cpp 1.17 M +4 -2 kst/datasources/template/template.cpp 1.4