[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Protux-devel] reimplementation of GlobalProperties
From: |
Martin Herren |
Subject: |
[Protux-devel] reimplementation of GlobalProperties |
Date: |
Wed, 15 Jan 2003 00:11:03 +0100 |
Hej,
i just almost completely reimplemented GlobalProperties. It's now completely
based on QString for both, key and value, and for storage it uses QDict (a hash
table).
I haven't commited it yet, as i'm not sure if it's a good idea to commit just
before 0.16.0... but it's 'heavily' tested (all situation i could imagine) and
there is no compatibility issue with the previous version, as you can give a
char* instead of a QString.
Another reason i didn't want to commit it yet, is that i don't believe that
this class belongs to protux, i would rather see it in libmustux, as mustache
and possibly more applications based on libmustux could need it.
So for the important changes now:
1) GlobalProperties::insert(QString key, QString value) is deprecated now, but
it's still there (it just calls set(QString key, QString value)).
set(QString key, QString value) checks if the key already exists, if so it
updates it, if not, it inserts it.
So no more problem with duplicated keys (current implementation ends up having
several VERSION in .protuxrc), and no need for 2 different functions.
2) The key name is case insensitive now. (but it's easy to change it to case
sensitive)
3) New functions: GlobalProperties::get_float(QString key) and
GlobalProperties::set(QString key, float value) , no idea if it will be usefull
one day, but it's there.
And now, what should i do ? I see several options:
- commit it now
- wait for 0.17.x to commit it
- move it to libmustux (changing file name and namespace to
MustuxGlobalProperties) and commit it now
- move it to libmustux (changing file name and namespace to
MustuxGlobalProperties) and wait for 0.17.x to commit it
- forget it
(for a move to libmustux, the init() function should be changed to init(QString
rcFileName), because different application will have different rcfiles... but
that's not a problem, as init() is called just once.)
RFC
/Martin
--
Open your Windows - Free your Mind - Enjoy
http://gnuwin.epfl.ch
Martin Herren +41 (0)79 746 57 83
OpenPGP Public key @ http://www.on-the-web.ch/sputnik/gpg.asc
pgpruHeyLw59S.pgp
Description: PGP signature
- [Protux-devel] reimplementation of GlobalProperties,
Martin Herren <=
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/14
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/15
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/16
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/21
- Re: [Protux-devel] reimplementation of GlobalProperties, Luciano Giordana, 2003/01/21
- Re: [Protux-devel] reimplementation of GlobalProperties, Martin Herren, 2003/01/21
- Re: [OT] [Protux-devel] reimplementation of GlobalProperties, booker, 2003/01/16