[Kmymoney-devel] csvimport plugin test is translation dependent

allan aganderson at ukonline.co.uk
Sat Sep 18 01:54:13 CEST 2010


On 16/09/10 18:25, Cristian Oneţ wrote:
> Hi Allan,
> 
> Can you please check the test related fix in this commit. If the test
> can't be written in a translation independent manner then it should be
> removed.
> 
> Regards,
> Cristian
> 
> SVN commit 1176100 by conet:
> 
> Fix compilation errors on MSVC due to a rather strange way of using
> QStringList. I think that the code using QStringList should have been
> more like the one in this patch. Also I commented out a test case
> which was failing in Romanian since it was locale dependent (the short
> month name returned 'nov.' which produced '5-nov.-1999' which can't pe
> parsed)
> 
> Â M Â +13 -13 Â  Â convdate.cpp
> Â M Â +4 -2 Â  Â  Â csvdatetest.cpp
> Â M Â +3 -3 Â  Â  Â csvprocessing.cpp
> Â M Â +4 -4 Â  Â  Â investprocessing.cpp
> 


> --- trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvprocessing.cpp
> #1176099:1176100
> @@ -334,7 +334,7 @@
> Â  Â  }
> Â  }
> 
> - Â QStringList listIn[MAXCOL] =
> m_inBuffer.split(m_fieldDelimiterCharacter);// firstly, split on
> m_fieldDelim_char
> + Â QStringList listIn = m_inBuffer.split(m_fieldDelimiterCharacter);//
> firstly, split on m_fieldDelim_char
> Â  QStringList listOut;
> Â  QString tmp;
> Â  tmp.clear();

Banking import no longer working since this change was made.
A corresponding change also was needed on line 342 to remove  the [0]
modifier from :
"
  foreach (const QString& txt, listIn[0]) {      // look for '"' in case
of fieldDelim_char within string"

Committed revision 1176538 and now working again.

Allan


More information about the KMyMoney-devel mailing list