[Interest] Calling QSettings::value() with an empty key name triggers an assert

2013-10-02 Thread Etienne Sandré-Chardonnal
Dear all, I'm under windows, where registry supports a default value per key. This means, a value with an empty name. Using QSettings::setValue("", value) and QSettings::value("") works fine and as expected in release mode. It creates and read default values in the registry. However, I was surpr

Re: [Interest] Calling QSettings::value() with an empty key name triggers an assert

2013-10-02 Thread Andre Somers
Op 2-10-2013 17:35, Etienne Sandré-Chardonnal schreef: Dear all, I'm under windows, where registry supports a default value per key. This means, a value with an empty name. Using QSettings::setValue("", value) and QSettings::value("") works fine and as expected in release mode. It creates an

Re: [Interest] Calling QSettings::value() with an empty key name triggers an assert

2013-10-02 Thread Vadim Peretokin
He's wanting to *set* the key to the default value however, not access it. Unless QSettings::value(".") or QSettings::value("Default") will set it to the default value as you suggest? ___ Interest mailing list Interest@qt-project.org http://lists.qt-proje

Re: [Interest] Calling QSettings::value() with an empty key name triggers an assert

2013-10-02 Thread André Somers
Op 3-10-2013 7:38, Vadim Peretokin schreef: He's wanting to *set* the key to the default value however, not access it. Unless QSettings::value(".") or QSettings::value("Default") will set it to the default value as you suggest? No, QSettings::value(".") is a getter. But QSettings::setValue(".",

Re: [Interest] Calling QSettings::value() with an empty key name triggers an assert

2013-10-02 Thread Vadim Peretokin
Got it, thanks. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] Calling QSettings::value() with an empty key name triggers an assert

2013-10-03 Thread Etienne Sandré-Chardonnal
Well, I did not want to say "silently" when I said "quietly". I should have written : "It should fail but in a friendly manner, maybe with a qWarning" Asserting is not very coherent for many reasons, including: - Staying silent in release mode is then a problem. - As Q_ASSERTs only work in debug

Re: [Interest] Calling QSettings::value() with an empty key name triggers an assert

2013-10-03 Thread Thiago Macieira
On quinta-feira, 3 de outubro de 2013 10:13:09, Etienne Sandré-Chardonnal wrote: > Asserting is not very coherent for many reasons, including: > - Staying silent in release mode is then a problem. > - As Q_ASSERTs only work in debug mode they are not a proper solution > here. Q_ASSERTS are there