SVN commit 1221270 by trueg: Save the changes if accepted M +8 -7 main.cpp --- trunk/playground/base/nepomuk-kde/annotation/resourceeditor/main.cpp #1221269:1221270 @@ -1,5 +1,5 @@ /* - Copyright (c) 2009 Sebastian Trueg + Copyright (c) 2009-2011 Sebastian Trueg This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -35,13 +35,13 @@ KAboutData aboutData( "resourceeditor", "resourceeditor", ki18n("ResourceEditor"), - "0.1", + "0.2", ki18n("A Nepomuk resource editor"), KAboutData::License_GPL, - ki18n("(c) 2009, Sebastian Trüg"), + ki18n("(c) 2009-2011, Sebastian Trüg"), KLocalizedString(), "http://nepomuk.kde.org" ); - aboutData.addAuthor(ki18n("Sebastian Trüg"),ki18n("Maintainer"), "trueg@kde.org"); + aboutData.addAuthor(ki18n("Sebastian Trüg"),ki18n("Maintainer"), "trueg@kde.org"); aboutData.setProgramIconName( "nepomuk" ); KCmdLineArgs::init( argc, argv, &aboutData ); @@ -62,9 +62,10 @@ Nepomuk::ResourceEditor* re = new Nepomuk::ResourceEditor( &dlg ); re->setResource( res ); dlg.setMainWidget( re ); - dlg.setButtons( KDialog::Close ); + dlg.setButtons( KDialog::Ok|KDialog::Cancel ); dlg.setPlainCaption( res.genericLabel() ); - dlg.show(); + if(dlg.exec() == QDialog::Accepted) + re->save(); - return app.exec(); + return 0; }