author | mickeyl <mickeyl> | 2005-01-29 14:23:27 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-29 14:23:27 (UTC) |
commit | 20b3de56573b9e86c6b6041faf684adc8cbb2a45 (patch) (side-by-side diff) | |
tree | e0d91c84dee46d1cce3b0d68fd2c10c3dd7ce3a1 /libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp | |
parent | 555b999359a5aad999eaaf48632ce85f25125b85 (diff) | |
download | opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.zip opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.gz opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.bz2 |
examples to where they belong
Diffstat (limited to 'libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp deleted file mode 100644 index 2ee4a65..0000000 --- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp +++ b/dev/null @@ -1,32 +0,0 @@ -#include <opie2/oapplication.h> -#include <opie2/oconfig.h> -#include <qpe/config.h> - -using namespace Opie::Core; - -int main( int argc, char** argv ) -{ - OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" ); - - OConfigGroupSaver c1( app->config(), "MyGroup" ); - app->config()->writeEntry( "AnEntry", "InMyGroup" ); - { - OConfigGroupSaver c2( c1.config(), "AnotherGroup" ); - app->config()->writeEntry( "AnEntry", "InAnotherGroup" ); - } // closing the scope returns to the last group - - app->config()->writeEntry( "AnotherEntry", "InMyGroup" ); - - // do more stuff ... - - // in this (special) case it is necessary to manually call OConfig::write() (see below) - app->config()->write(); - - // can't delete the app when using the OConfigGroupSaver on top level scope, - // because the destructor of the OConfigGroupSaver needs an application object - //delete app; // destructor deletes config which writes changes back to disk - - return 0; - -} - |