[Qt-jambi-interest] Long dictionary class?
Derek Fountain
derekfountain at yahoo.co.uk
Wed Aug 19 14:01:04 CEST 2009
One of the annoying restrictions of Java, at least to those of us who
frequent the worlds of Perl, PHP, etc., is the inability to define very
long lines in the source. I have a SQL query that spans about 20 lines
(and is growing in complexity by the day) and I want to embed it in my
Java. I'm developing it inside a SQL tool and cut-n-pasting it into my
Java source as I update it.
Only that's a pain in Java because I can't just drop it into the source
- I have to wrap it up in string concatenations in order to span the
multiple lines. I want to keep the multi-line formatting so it's
readable in the Java source.
One way around this is to put the SQL string inside a text file, then
access the contents of that text file from Java. Only I have several of
these strings (they define reports) so what I really want is something
that takes a text file like this:
[report1]
select * from
blah
blah
blah
blah
[report2]
select * from
this
that
etc
and so on. I ask for 'report1' and get the appropriate string.
I can write such a thing, but I wondered if Qt had something I might be
able to use. It has just about everything else. :)
I just looked at QSettings - does that handle values that span lines?
I'd rather not use XML unless I have to, I don't need that level of
complexity. Any other options I should look at?
More information about the Qt-jambi-interest
mailing list