Bug 340870 - CSV importer: allow greater value than 99 for first line
Summary: CSV importer: allow greater value than 99 for first line
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 03:48 UTC by Daniel Hahler
Modified: 2014-12-14 12:16 UTC (History)
2 users (show)

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 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.