Bug 340870

Summary: CSV importer: allow greater value than 99 for first line
Product: [Applications] kmymoney Reporter: Daniel Hahler <kde-bugzilla>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED WORKSFORME    
Severity: normal CC: agander93, onet.cristian
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Hahler 2014-11-12 03:48:26 UTC
While trying to import a single entry from a file I've noticed that you can only use values up to 99 for the "First line" general setting to define where the import should start.

I see that headers are usually not that long, but the "First line" field should allow the same range as the "Last line" field.

Reproducible: Always




This happened with 4.6.6-1, and then I've tried it on Git master - since 4.7 is supposed to have a revamped CSV importer.
Comment 1 allan 2014-11-12 11:01:48 UTC
Darn it!  There I go again - assuming I know what a user will want to do.

There has to be an actual value entered, I'm afraid, but I'll change both to 9999.  Hopefully, That will suffice, but.....

Be aware, though, that the start line value cannot be higher than the end line, and that in turn cannot be higher that the number of lines in the file, with which it gets pre-loaded.
Comment 2 Cristian Oneț 2014-11-12 11:21:32 UTC
Allan is there a reason why a fixed value is needed?
Comment 3 allan 2014-11-12 12:10:17 UTC
(In reply to Cristian Oneț from comment #2)
> Allan is there a reason why a fixed value is needed?

From the API, 
"QSpinBox::maximum -
This property holds the maximum value of the spin box.
When setting this property the minimum is adjusted if necessary, to ensure that the range remains valid.
The default maximum value is 99."

When setting it in Designer, a value has to be entered, with the default 99.  Perhaps I should leave it at default, and leave the actual value to be set dynamically.  To be able to test, though, I'll need a file with more than 99 lines, which I'll need to produce.  Or, temporarily set the line count suitably, for testing.
Comment 4 Cristian Oneț 2014-11-12 12:29:41 UTC
Then please use something like INT_MAX for the max value.
Comment 5 allan 2014-12-14 12:16:18 UTC
What you require was added in 4.7.0.
It also is in git HEAD,
Please check again, and if you find otherwise, please say.