[Kmymoney] Re: QIF IMPORT: ERROR MESSAGE

timothy timboyle at afrihost.co.za
Sat Apr 23 14:06:09 CEST 2011


Thanks once again for your clear and prompt responses.
I will look into the source and see what's what.
Regards
Timothy

On Sat, 2011-04-23 at 13:11 +0200, Thomas Baumgart wrote:
> Hi timothy,
> 
> on Saturday 23 April 2011 12:55:16 you wrote:
> 
> > Many thanks for your help and swift response.
> > Your note that 4.5 is also lacking is welcome as I am waiting to
> > upgrade. I did originally, but was disappointed with the speed and
> > returned to KMM2. However when I upgrade to Natty Narwhal shortly I will
> > have 4 installed by default and will try the experience again.
> 
> 4.5.3 is still a bit slower than 1.0 (mainly due to the massive changes in the 
> underlying KDE/Qt technology) but much better than the first KDE4 based 
> incarnations.
> 
> > One thing still puzzles me is 2). Why is a QIF different to an OFX in
> > opening directly into KMM and why the strange message about the binary
> > format? It is only a text file, written in the current QIF format as far
> > as I can ascertain from google?
> 
> That is, because we look for certain patterns during open of a file. If 
> certain parameters match, we assume it's on of the old binary formats which we 
> do not support anymore. This might also trigger if you present a QIF file to 
> open. The logic is kept in
> 
>   KMyMoneyView::readFile(const KURL& url)
> 
> which can be found in views/kmymoneyview.cpp
> 
> In case you want to spend some time on this issue, please use the SVN trunk 
> version for KDE4. This is much better suited for patches than the current 1.0 
> version, though things are very similar, but not 100% source compatible as we 
> have cleaned up some things already.
> 
> 
> 
> > 
> > On Sat, 2011-04-23 at 11:57 +0200, Thomas Baumgart wrote:
> > > Hi,
> > > 
> > > on Saturday 23 April 2011 11:27:20 timothy wrote:
> > > > Hi
> > > > 
> > > > I am running KMM 1.0.5 on KDE 3.5.10 on Ubuntu Maverick.
> > > > 
> > > > I have written a program to output a QIF from a PDF.
> > > > The QIF imports into KMM via the File/Import/QIF... correctly.
> > > > 
> > > > However when I right click on the QIF file and I try to open via "Open
> > > > with KMyMoney" from the desktop box menu I get:
> > > > 
> > > > 1) If KMM is open:-> "Another instance of KMyMoney is already running.
> > > > Do you want to quit?" If I quit and close the running KMM and try again
> > > > with the right click open I get:
> > > > 
> > > > 2)File /home/timothy/Desktop/AG_LA_1220.qif contains the old binary
> > > > format used by KMyMoney. Please use an older version of KMyMoney
> > > > (0.8.x) that still supports this format to convert it to the new XML
> > > > based format.
> > > 
> > > Hmm, 2) is clear, as you cannot open a QIF file, you can only import it.
> > > 
> > > For 1) I checked the 1.0.5 source. It contains an interesting comment:
> > >   // Place code here to test for QIF and other locally-supported formats
> > >   // (i.e. not a plugin). If you add them here, be sure to add it to
> > >   // the webConnect function.
> > > 
> > > webConnect is the feature we're looking for. The unfortunate part is,
> > > that the code is not present, so it has never been added.  BTW: 4.5
> > > lacks the same :(
> > > 
> > > > I mention 1) because when I right click and open an OFX file it goes
> > > > straight into the QIF import of KMM whether KMM is already running or
> > > > not.
> > > > 
> > > > I have tried the versions of QIF which I originally used to import my
> > > > data from MsMoney and get the same error. I searched for "new XML based
> > > > QIF format" with no success.
> > > > 
> > > > Basically the QIF file I have generated (and possibly every QIF file)
> > > > is accepted by KMM only when importing from KMM itself. This makes for
> > > > a number of extra steps and in any case a spurious error message.
> > > > 
> > > > Can I work round this to give the same results as OFX formats?
> > > 
> > > Not work around, but implement it, but it would involve code changes in
> > > C++. Patches are welcome.
> > > 
> > > > Could you please give me the names of the source files that handle the
> > > > QIF importation to see if I can glean a better understanding of how KMM
> > > > treats QIF?
> > > 
> > > The logic that gets this work done is spread over some source files.
> > > Start is in main.cpp (look for a call to "isImportableFile(url.path())".
> > > This function is in kmymoney2.cpp. This function contains a loop that
> > > checks for the format provided by so called plugins. QIF for historic
> > > reasons is not a plugin but could probably added here easily with the
> > > same functionality.
> > > 
> > > The actual processing of the data happens in KMyMoney2App::webConnect()
> > > which can also be found in kmymoney2.cpp and is called from main.cpp.
> > > This will become a bit more tricky, but the basic source part is
> > > available in KMyMoney2App::slotQifImport(). Simply don't use a dialog to
> > > get a filename.
> > > 
> > > Hope that helps to get started. If you have more of those questions
> > > please feel free to ask them on our developer list at
> > > kmymoney-devel at kde.org. You can also try IRC on the #kmymoney channel on
> > > freenode.org. Please be patient, sometimes it takes a day or more until
> > > you get an answer there as well.
> 
> 




More information about the KMyMoney mailing list