From 595d3211a7982471f68bb116fb47cf4c6218d7c1 Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 19 Jul 2004 21:48:29 +0000 Subject: Make it quicklaunchable again -Do the check if allowed to run in the c'tor of MultiauthConfig and exit(-1) on failure -Adopt the .pro to contain CONFIG quick-app again -main only contains the call to the factory --- (limited to 'core/settings/security/main.cpp') diff --git a/core/settings/security/main.cpp b/core/settings/security/main.cpp index 7f24490..5ba9869 100644 --- a/core/settings/security/main.cpp +++ b/core/settings/security/main.cpp @@ -1,44 +1,5 @@ #include "multiauthconfig.h" -#include -#include +#include - -int main(int argc, char **argv) { - Opie::Core::OApplication app(argc, argv, "MultiAuthentication Config"); - // protect this dialog if option set - Config* pcfg = new Config("Security"); - pcfg->setGroup( "Misc" ); - bool protectConfigDialog = ! pcfg->readBoolEntry("noProtectConfig", true); - delete pcfg; - bool show = true; - if ( protectConfigDialog ) - { - if (Opie::Security::Internal::runPlugins() != 0) - { - // authentication failed - show = false; - } - } - if ( show == true ){ - MultiauthConfig dialog; - app.setMainWidget(&dialog); - - if ( dialog.exec() == QDialog::Accepted ) { - // write the general, login and sync config - dialog.writeConfig(); - // call writeConfig() on each plugin config widget - Opie::Security::MultiauthConfigWidget *confWidget; - for ( confWidget = dialog.configWidgetList.first(); confWidget != 0; - confWidget = dialog.configWidgetList.next() ) { - confWidget->writeConfig(); - } - } - dialog.close(); - app.quit(); - return 0; - } else { - owarn << "authentication failed, not showing opie-security" << oendl; - return 1; - } -} +OPIE_EXPORT_APP( Opie::Core::OApplicationFactory ); -- cgit v0.9.0.2