summaryrefslogtreecommitdiff
authorzecke <zecke>2004-07-19 21:48:29 (UTC)
committer zecke <zecke>2004-07-19 21:48:29 (UTC)
commit595d3211a7982471f68bb116fb47cf4c6218d7c1 (patch) (unidiff)
tree1ed2caebe113c43979f0361c172b6232a46fd823
parentd2dfe297f99684ad361240ab4f63dfb1ff8850dd (diff)
downloadopie-595d3211a7982471f68bb116fb47cf4c6218d7c1.zip
opie-595d3211a7982471f68bb116fb47cf4c6218d7c1.tar.gz
opie-595d3211a7982471f68bb116fb47cf4c6218d7c1.tar.bz2
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
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/main.cpp43
-rw-r--r--core/settings/security/multiauthconfig.cpp50
-rw-r--r--core/settings/security/multiauthconfig.h5
-rw-r--r--core/settings/security/security.pro8
4 files changed, 53 insertions, 53 deletions
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 @@
1#include "multiauthconfig.h" 1#include "multiauthconfig.h"
2#include <opie2/oapplication.h>
3#include <opie2/odebug.h>
4 2
3#include <opie2/oapplicationfactory.h>
5 4
6 5OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<MultiauthConfig> );
7int main(int argc, char **argv) {
8 Opie::Core::OApplication app(argc, argv, "MultiAuthentication Config");
9 // protect this dialog if option set
10 Config* pcfg = new Config("Security");
11 pcfg->setGroup( "Misc" );
12 bool protectConfigDialog = ! pcfg->readBoolEntry("noProtectConfig", true);
13 delete pcfg;
14 bool show = true;
15 if ( protectConfigDialog )
16 {
17 if (Opie::Security::Internal::runPlugins() != 0)
18 {
19 // authentication failed
20 show = false;
21 }
22 }
23 if ( show == true ){
24 MultiauthConfig dialog;
25 app.setMainWidget(&dialog);
26
27 if ( dialog.exec() == QDialog::Accepted ) {
28 // write the general, login and sync config
29 dialog.writeConfig();
30 // call writeConfig() on each plugin config widget
31 Opie::Security::MultiauthConfigWidget *confWidget;
32 for ( confWidget = dialog.configWidgetList.first(); confWidget != 0;
33 confWidget = dialog.configWidgetList.next() ) {
34 confWidget->writeConfig();
35 }
36 }
37 dialog.close();
38 app.quit();
39 return 0;
40 } else {
41 owarn << "authentication failed, not showing opie-security" << oendl;
42 return 1;
43 }
44}
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp
index 93e73c3..535352a 100644
--- a/core/settings/security/multiauthconfig.cpp
+++ b/core/settings/security/multiauthconfig.cpp
@@ -1,400 +1,442 @@
1#include "multiauthconfig.h" 1#include "multiauthconfig.h"
2 2
3#include <opie2/odebug.h> 3#include <opie2/odebug.h>
4 4
5#include <qgroupbox.h> 5#include <qgroupbox.h>
6#include <qpe/resource.h> 6#include <qpe/resource.h>
7#include <qlayout.h> 7#include <qlayout.h>
8#include <qlabel.h> 8#include <qlabel.h>
9#include <qhbox.h> 9#include <qhbox.h>
10#include <qheader.h> 10#include <qheader.h>
11#include <qvbox.h> 11#include <qvbox.h>
12#include <qwhatsthis.h> 12#include <qwhatsthis.h>
13#include <qtoolbutton.h> 13#include <qtoolbutton.h>
14#include <qstringlist.h> 14#include <qstringlist.h>
15#include <qdir.h> 15#include <qdir.h>
16#include <qpe/qlibrary.h> 16#include <qpe/qlibrary.h>
17#include <qpe/qpeapplication.h> 17#include <qpe/qpeapplication.h>
18 18
19 19
20using Opie::Security::MultiauthPluginInterface; 20using Opie::Security::MultiauthPluginInterface;
21using Opie::Security::MultiauthPluginObject; 21using Opie::Security::MultiauthPluginObject;
22using Opie::Security::MultiauthConfigWidget; 22using Opie::Security::MultiauthConfigWidget;
23/// keeps information about MultiauthPluginObject plugins 23/// keeps information about MultiauthPluginObject plugins
24struct MultiauthPlugin { 24struct MultiauthPlugin {
25 MultiauthPlugin() : library( 0 ), iface( 0 ), pluginObject( 0 ) {} 25 MultiauthPlugin() : library( 0 ), iface( 0 ), pluginObject( 0 ) {}
26 /// plugin file 26 /// plugin file
27 QLibrary *library; 27 QLibrary *library;
28 /// the plugin object interface 28 /// the plugin object interface
29 QInterfacePtr<MultiauthPluginInterface> iface; 29 QInterfacePtr<MultiauthPluginInterface> iface;
30 /// the plugin object itself 30 /// the plugin object itself
31 MultiauthPluginObject *pluginObject; 31 MultiauthPluginObject *pluginObject;
32 /// name of the plugin file 32 /// name of the plugin file
33 QString name; 33 QString name;
34 /// should the plugin be launched during authentication or not 34 /// should the plugin be launched during authentication or not
35 bool active; 35 bool active;
36 /// order of the plugin, in the pluginListWidget and during authentication 36 /// order of the plugin, in the pluginListWidget and during authentication
37 int pos; 37 int pos;
38}; 38};
39 39
40/// list of available MultiauthPlugin objects 40/// list of available MultiauthPlugin objects
41static QValueList<MultiauthPlugin> pluginList; 41static QValueList<MultiauthPlugin> pluginList;
42 42
43 43
44/// extension of QToolButton that adds signals, icons and stuff (taken from todayconfig.cpp) 44/// extension of QToolButton that adds signals, icons and stuff (taken from todayconfig.cpp)
45class ToolButton : public QToolButton { 45class ToolButton : public QToolButton {
46 46
47 public: 47 public:
48 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE ) 48 ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
49 : QToolButton( parent, name ) { 49 : QToolButton( parent, name ) {
50 setPixmap( Resource::loadPixmap( icon ) ); 50 setPixmap( Resource::loadPixmap( icon ) );
51 setAutoRaise( TRUE ); 51 setAutoRaise( TRUE );
52 setFocusPolicy( QWidget::NoFocus ); 52 setFocusPolicy( QWidget::NoFocus );
53 setToggleButton( t ); 53 setToggleButton( t );
54 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); 54 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
55 } 55 }
56}; 56};
57 57
58MultiauthGeneralConfig::MultiauthGeneralConfig(QWidget * parent, const char * name = "general Opie-multiauthentication config widget") 58MultiauthGeneralConfig::MultiauthGeneralConfig(QWidget * parent, const char * name = "general Opie-multiauthentication config widget")
59 : QWidget(parent, name), onStart(0), onResume(0), nbSuccessMin(0) 59 : QWidget(parent, name), onStart(0), onResume(0), nbSuccessMin(0)
60{ 60{
61 QVBoxLayout *vb = new QVBoxLayout(this); 61 QVBoxLayout *vb = new QVBoxLayout(this);
62 vb->setSpacing(11); 62 vb->setSpacing(11);
63 vb->setMargin(11); 63 vb->setMargin(11);
64 vb->setAlignment( Qt::AlignTop ); 64 vb->setAlignment( Qt::AlignTop );
65 65
66 QGroupBox *lockBox = new QGroupBox(0, Qt::Vertical, tr("When to lock Opie"), this, "lock box"); 66 QGroupBox *lockBox = new QGroupBox(0, Qt::Vertical, tr("When to lock Opie"), this, "lock box");
67 vb->addWidget(lockBox); 67 vb->addWidget(lockBox);
68 QGridLayout *boxLayout = new QGridLayout( lockBox->layout() ); 68 QGridLayout *boxLayout = new QGridLayout( lockBox->layout() );
69 onStart = new QCheckBox( tr( "on Opie start" ), lockBox, "lock on opie start"); 69 onStart = new QCheckBox( tr( "on Opie start" ), lockBox, "lock on opie start");
70 onResume = new QCheckBox( tr( "on Opie resume" ), lockBox, "lock on opie resume"); 70 onResume = new QCheckBox( tr( "on Opie resume" ), lockBox, "lock on opie resume");
71 boxLayout->addWidget(onStart, 0, 0); 71 boxLayout->addWidget(onStart, 0, 0);
72 boxLayout->addWidget(onResume, 0, 1); 72 boxLayout->addWidget(onResume, 0, 1);
73 73
74 QGroupBox *nbBox = new QGroupBox(0, Qt::Vertical, tr("Multiple plugins authentication"), this, "nb box"); 74 QGroupBox *nbBox = new QGroupBox(0, Qt::Vertical, tr("Multiple plugins authentication"), this, "nb box");
75 vb->addWidget(nbBox); 75 vb->addWidget(nbBox);
76 QGridLayout *nbBoxLayout = new QGridLayout( nbBox->layout() ); 76 QGridLayout *nbBoxLayout = new QGridLayout( nbBox->layout() );
77 nbSuccessMin = new QSpinBox(nbBox); 77 nbSuccessMin = new QSpinBox(nbBox);
78 QLabel *lNbSuccessMin = new QLabel( tr( "Required successes" ), nbBox); 78 QLabel *lNbSuccessMin = new QLabel( tr( "Required successes" ), nbBox);
79 nbBoxLayout->addWidget(nbSuccessMin, 0, 0); 79 nbBoxLayout->addWidget(nbSuccessMin, 0, 0);
80 nbBoxLayout->addWidget(lNbSuccessMin, 0, 1); 80 nbBoxLayout->addWidget(lNbSuccessMin, 0, 1);
81 nbSuccessMin->setMinValue(1); // the max value is defined in MultiauthConfig constructor 81 nbSuccessMin->setMinValue(1); // the max value is defined in MultiauthConfig constructor
82 82
83 QGroupBox *devBox = new QGroupBox(0, Qt::Vertical, tr("Debug options"), this, "dev box"); 83 QGroupBox *devBox = new QGroupBox(0, Qt::Vertical, tr("Debug options"), this, "dev box");
84 vb->addWidget(devBox); 84 vb->addWidget(devBox);
85 QGridLayout *devBoxLayout = new QGridLayout( devBox->layout() ); 85 QGridLayout *devBoxLayout = new QGridLayout( devBox->layout() );
86 noProtectConfig = new QCheckBox( tr("Don't protect this config screen"), devBox, "don't protect config"); 86 noProtectConfig = new QCheckBox( tr("Don't protect this config screen"), devBox, "don't protect config");
87 explanScreens = new QCheckBox( tr("Show explanatory screens"), devBox, "Show explan. screens"); 87 explanScreens = new QCheckBox( tr("Show explanatory screens"), devBox, "Show explan. screens");
88 allowBypass = new QCheckBox( tr("Allow to bypass authentication"), devBox, "AllowBypass"); 88 allowBypass = new QCheckBox( tr("Allow to bypass authentication"), devBox, "AllowBypass");
89 QLabel *logicNote = new QLabel( "<p>" + tr("Note: the third option implies the second one") + "</p>", devBox ); 89 QLabel *logicNote = new QLabel( "<p>" + tr("Note: the third option implies the second one") + "</p>", devBox );
90 devBoxLayout->addWidget(noProtectConfig, 0, 0); 90 devBoxLayout->addWidget(noProtectConfig, 0, 0);
91 devBoxLayout->addWidget(explanScreens, 1, 0); 91 devBoxLayout->addWidget(explanScreens, 1, 0);
92 devBoxLayout->addWidget(allowBypass, 2, 0); 92 devBoxLayout->addWidget(allowBypass, 2, 0);
93 devBoxLayout->addMultiCellWidget(logicNote, 3, 3, 0, 1); 93 devBoxLayout->addMultiCellWidget(logicNote, 3, 3, 0, 1);
94 94
95 connect( explanScreens, SIGNAL(toggled(bool)), this, SLOT(checkBypass()) ); 95 connect( explanScreens, SIGNAL(toggled(bool)), this, SLOT(checkBypass()) );
96 connect( allowBypass, SIGNAL(toggled(bool)), this, SLOT(checkScreens()) ); 96 connect( allowBypass, SIGNAL(toggled(bool)), this, SLOT(checkScreens()) );
97} 97}
98 98
99/// nothing to do 99/// nothing to do
100MultiauthGeneralConfig::~MultiauthGeneralConfig() 100MultiauthGeneralConfig::~MultiauthGeneralConfig()
101{} 101{}
102 102
103/// Be sure that explanScreens is checked if allowBypass is 103/// Be sure that explanScreens is checked if allowBypass is
104void MultiauthGeneralConfig::checkScreens() 104void MultiauthGeneralConfig::checkScreens()
105{ 105{
106 if ( (allowBypass->isChecked() == true) && (explanScreens->isChecked() == false) ) 106 if ( (allowBypass->isChecked() == true) && (explanScreens->isChecked() == false) )
107 explanScreens->setChecked(true); 107 explanScreens->setChecked(true);
108} 108}
109 109
110/// Be sure that allowBypass is not checked if explanScreens is not 110/// Be sure that allowBypass is not checked if explanScreens is not
111void MultiauthGeneralConfig::checkBypass() 111void MultiauthGeneralConfig::checkBypass()
112{ 112{
113 if ( (allowBypass->isChecked() == true) && (explanScreens->isChecked() == false) ) 113 if ( (allowBypass->isChecked() == true) && (explanScreens->isChecked() == false) )
114 allowBypass->setChecked(false); 114 allowBypass->setChecked(false);
115} 115}
116 116
117
118
119
120
121
122
123
124
125
126
117/// Builds and displays the Opie multi-authentication configuration dialog 127/// Builds and displays the Opie multi-authentication configuration dialog
118MultiauthConfig::MultiauthConfig() : QDialog(0, 0, TRUE), 128static void test_and_start() {
119 m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0), 129 Config pcfg("Security");
120 m_generalConfig(0), m_loginWidget(0), m_syncWidget(0), 130 pcfg.setGroup( "Misc" );
121 m_nbSuccessReq(0), m_plugins_changed(false) 131 bool protectConfigDialog = ! pcfg.readBoolEntry("noProtectConfig", true);
132
133 if (protectConfigDialog && Opie::Security::Internal::runPlugins() != 0) {
134 owarn << "authentication failed, not showing opie-security" << oendl;
135 exit( -1 );
136 }
137}
138
139
140
141MultiauthConfig::MultiauthConfig(QWidget* par, const char* w, WFlags f)
142 : QDialog(par, w, TRUE, f),
143 m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0),
144 m_generalConfig(0), m_loginWidget(0), m_syncWidget(0),
145 m_nbSuccessReq(0), m_plugins_changed(false)
122{ 146{
123 /* Initializes the global configuration window 147 /* Initializes the global configuration window
124 */ 148 */
149 test_and_start();
150
125 setCaption( tr( "Security configuration" ) ); 151 setCaption( tr( "Security configuration" ) );
126 QVBoxLayout *layout = new QVBoxLayout( this ); 152 QVBoxLayout *layout = new QVBoxLayout( this );
127 m_mainTW = new Opie::Ui::OTabWidget( this ); 153 m_mainTW = new Opie::Ui::OTabWidget( this );
128 layout->addWidget(m_mainTW); 154 layout->addWidget(m_mainTW);
129 m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget"); 155 m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget");
130 QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget); 156 QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget);
131 pluginListLayout->setSpacing(6); 157 pluginListLayout->setSpacing(6);
132 pluginListLayout->setMargin(11); 158 pluginListLayout->setMargin(11);
133 QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget ); 159 QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget );
134 pluginListLayout->addWidget(pluginListTitle); 160 pluginListLayout->addWidget(pluginListTitle);
135 QHBox * pluginListHB = new QHBox(m_pluginListWidget); 161 QHBox * pluginListHB = new QHBox(m_pluginListWidget);
136 pluginListLayout->addWidget(pluginListHB); 162 pluginListLayout->addWidget(pluginListHB);
137 163
138 m_pluginListView = new QListView(pluginListHB); 164 m_pluginListView = new QListView(pluginListHB);
139 m_pluginListView->addColumn("PluginList"); 165 m_pluginListView->addColumn("PluginList");
140 m_pluginListView->header()->hide(); 166 m_pluginListView->header()->hide();
141 m_pluginListView->setSorting(-1); 167 m_pluginListView->setSorting(-1);
142 QWhatsThis::add(m_pluginListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the order they will appear in" )); 168 QWhatsThis::add(m_pluginListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the order they will appear in" ));
143 169
144 QVBox * pluginListVB = new QVBox(pluginListHB); 170 QVBox * pluginListVB = new QVBox(pluginListHB);
145 new ToolButton( pluginListVB, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); 171 new ToolButton( pluginListVB, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) );
146 new ToolButton( pluginListVB, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); 172 new ToolButton( pluginListVB, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) );
147 m_mainTW->addTab( m_pluginListWidget, "pass", tr( "plugins" ) ); 173 m_mainTW->addTab( m_pluginListWidget, "pass", tr( "plugins" ) );
148 174
149 connect ( m_pluginListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( pluginsChanged ( ) ) ); 175 connect ( m_pluginListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( pluginsChanged ( ) ) );
150 176
151 // general Opie multi-authentication configuration tab 177 // general Opie multi-authentication configuration tab
152 m_generalConfig = new MultiauthGeneralConfig(m_mainTW); 178 m_generalConfig = new MultiauthGeneralConfig(m_mainTW);
153 m_mainTW->addTab(m_generalConfig, "SettingsIcon", tr( "Authentication") ); 179 m_mainTW->addTab(m_generalConfig, "SettingsIcon", tr( "Authentication") );
154 180
155 // login settings page 181 // login settings page
156 m_loginWidget = new LoginBase(m_mainTW, "login config widget"); 182 m_loginWidget = new LoginBase(m_mainTW, "login config widget");
157 m_mainTW->addTab(m_loginWidget, "security/users", tr( "Login") ); 183 m_mainTW->addTab(m_loginWidget, "security/users", tr( "Login") );
158 184
159 // sync settings page 185 // sync settings page
160 m_syncWidget = new SyncBase( m_mainTW, "sync config widget" ); 186 m_syncWidget = new SyncBase( m_mainTW, "sync config widget" );
161 m_mainTW->addTab(m_syncWidget, "security/sync", tr( "Sync") ); 187 m_mainTW->addTab(m_syncWidget, "security/sync", tr( "Sync") );
162 188
163 // read the "Security" Config file and update our UI 189 // read the "Security" Config file and update our UI
164 readConfig(); 190 readConfig();
165 191
166 /* loads plugins configuration widgets in mainTW tabs and in pluginListView 192 /* loads plugins configuration widgets in mainTW tabs and in pluginListView
167 */ 193 */
168 194
169 loadPlugins(); 195 loadPlugins();
170 196
171 for ( int i = pluginList.count() - 1; i >= 0; i-- ) { 197 for ( int i = pluginList.count() - 1; i >= 0; i-- ) {
172 MultiauthPlugin plugin = pluginList[i]; 198 MultiauthPlugin plugin = pluginList[i];
173 199
174 // load the config widgets in the tabs 200 // load the config widgets in the tabs
175 // (configWidget will return 0l if there is no configuration GUI) 201 // (configWidget will return 0l if there is no configuration GUI)
176 MultiauthConfigWidget* widget = plugin.pluginObject->configWidget(m_mainTW); 202 MultiauthConfigWidget* widget = plugin.pluginObject->configWidget(m_mainTW);
177 if ( widget != 0l ) { 203 if ( widget != 0l ) {
178 odebug << "plugin " << plugin.name << " has a configuration widget" << oendl; 204 odebug << "plugin " << plugin.name << " has a configuration widget" << oendl;
179 configWidgetList.append(widget); 205 configWidgetList.append(widget);
180 m_mainTW->addTab( widget, plugin.pluginObject->pixmapNameConfig(), 206 m_mainTW->addTab( widget, plugin.pluginObject->pixmapNameConfig(),
181 plugin.pluginObject->pluginName() ); 207 plugin.pluginObject->pluginName() );
182 } 208 }
183 // set the order/activate tab 209 // set the order/activate tab
184 QPixmap icon = Resource::loadPixmap( plugin.pluginObject->pixmapNameWidget() ); 210 QPixmap icon = Resource::loadPixmap( plugin.pluginObject->pixmapNameWidget() );
185 QCheckListItem * item = new QCheckListItem(m_pluginListView, plugin.pluginObject->pluginName(), QCheckListItem::CheckBox ); 211 QCheckListItem * item = new QCheckListItem(m_pluginListView, plugin.pluginObject->pluginName(), QCheckListItem::CheckBox );
186 if ( !icon.isNull() ) { 212 if ( !icon.isNull() ) {
187 item->setPixmap( 0, icon ); 213 item->setPixmap( 0, icon );
188 } 214 }
189 if ( m_excludePlugins.find( plugin.name ) == m_excludePlugins.end() ) { 215 if ( m_excludePlugins.find( plugin.name ) == m_excludePlugins.end() ) {
190 item->setOn( TRUE ); 216 item->setOn( TRUE );
191 } 217 }
192 m_plugins[plugin.name] = item; 218 m_plugins[plugin.name] = item;
193 } 219 }
194 220
195 // set the first tab as default. 221 // set the first tab as default.
196 m_mainTW->setCurrentTab(m_pluginListWidget); 222 m_mainTW->setCurrentTab(m_pluginListWidget);
197 223
198 // put the number of plugins as the max number of req. auth. 224 // put the number of plugins as the max number of req. auth.
199 m_generalConfig->nbSuccessMin->setMaxValue( pluginList.count() ); 225 m_generalConfig->nbSuccessMin->setMaxValue( pluginList.count() );
200 226
201 showMaximized(); 227 showMaximized();
202} 228}
203 229
204/// nothing to do 230/// nothing to do
205MultiauthConfig::~MultiauthConfig() 231MultiauthConfig::~MultiauthConfig()
206{ 232{
207} 233}
208 234
235void MultiauthConfig::accept() {
236 writeConfig();
237
238 MultiauthConfigWidget* confWidget = 0;
239 for ( confWidget = configWidgetList.first(); confWidget != 0;
240 confWidget = configWidgetList.next() )
241 confWidget->writeConfig();
242
243 QDialog::accept();
244}
245
246void MultiauthConfig::done( int r ) {
247 QDialog::done( r );
248 close();
249}
250
209/// moves up the selected plugin 251/// moves up the selected plugin
210void MultiauthConfig::moveSelectedUp() 252void MultiauthConfig::moveSelectedUp()
211{ 253{
212 QListViewItem *item = m_pluginListView->selectedItem(); 254 QListViewItem *item = m_pluginListView->selectedItem();
213 if ( item && item->itemAbove() ) { 255 if ( item && item->itemAbove() ) {
214 item->itemAbove()->moveItem( item ); 256 item->itemAbove()->moveItem( item );
215 } 257 }
216} 258}
217 259
218/// moves down the selected plugin 260/// moves down the selected plugin
219void MultiauthConfig::moveSelectedDown() 261void MultiauthConfig::moveSelectedDown()
220{ 262{
221 QListViewItem *item = m_pluginListView->selectedItem(); 263 QListViewItem *item = m_pluginListView->selectedItem();
222 if ( item && item->itemBelow() ) { 264 if ( item && item->itemBelow() ) {
223 item->moveItem( item->itemBelow() ); 265 item->moveItem( item->itemBelow() );
224 } 266 }
225} 267}
226 268
227/// reads the <code>Security.conf</code> Config file, and updates parts of the user interface 269/// reads the <code>Security.conf</code> Config file, and updates parts of the user interface
228void MultiauthConfig::readConfig() 270void MultiauthConfig::readConfig()
229{ 271{
230 // pointer, so we release this Config when we want 272 // pointer, so we release this Config when we want
231 Config* pcfg = new Config("Security"); 273 Config* pcfg = new Config("Security");
232 pcfg->setGroup( "Misc" ); 274 pcfg->setGroup( "Misc" );
233 m_generalConfig->onStart->setChecked( pcfg->readBoolEntry( "onStart", false ) ); 275 m_generalConfig->onStart->setChecked( pcfg->readBoolEntry( "onStart", false ) );
234 m_generalConfig->onResume->setChecked( pcfg->readBoolEntry( "onResume", false ) ); 276 m_generalConfig->onResume->setChecked( pcfg->readBoolEntry( "onResume", false ) );
235 m_generalConfig->nbSuccessMin->setValue( pcfg->readNumEntry( "nbSuccessMin", 1 ) ); 277 m_generalConfig->nbSuccessMin->setValue( pcfg->readNumEntry( "nbSuccessMin", 1 ) );
236 m_generalConfig->noProtectConfig->setChecked( pcfg->readBoolEntry( "noProtectConfig", true) ); 278 m_generalConfig->noProtectConfig->setChecked( pcfg->readBoolEntry( "noProtectConfig", true) );
237 m_generalConfig->explanScreens->setChecked( pcfg->readBoolEntry( "explanScreens", true ) ); 279 m_generalConfig->explanScreens->setChecked( pcfg->readBoolEntry( "explanScreens", true ) );
238 m_generalConfig->allowBypass->setChecked( pcfg->readBoolEntry( "allowBypass", false ) ); 280 m_generalConfig->allowBypass->setChecked( pcfg->readBoolEntry( "allowBypass", false ) );
239 281
240 pcfg->setGroup( "Plugins" ); 282 pcfg->setGroup( "Plugins" );
241 m_excludePlugins = pcfg->readListEntry( "ExcludePlugins", ',' ); 283 m_excludePlugins = pcfg->readListEntry( "ExcludePlugins", ',' );
242 m_allPlugins = pcfg->readListEntry( "AllPlugins", ',' ); 284 m_allPlugins = pcfg->readListEntry( "AllPlugins", ',' );
243 285
244 /* Login and Sync stuff */ 286 /* Login and Sync stuff */
245 pcfg->setGroup("Sync"); 287 pcfg->setGroup("Sync");
246 int auth_peer = pcfg->readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 288 int auth_peer = pcfg->readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24
247 int auth_peer_bits = pcfg->readNumEntry("auth_peer_bits",24); 289 int auth_peer_bits = pcfg->readNumEntry("auth_peer_bits",24);
248 290
249 pcfg->setGroup("SyncMode"); 291 pcfg->setGroup("SyncMode");
250 int mode = pcfg->readNumEntry("Mode",2); // Default to Sharp 292 int mode = pcfg->readNumEntry("Mode",2); // Default to Sharp
251 switch( mode ) { 293 switch( mode ) {
252 case 0x01: 294 case 0x01:
253 m_syncWidget->syncModeCombo->setCurrentItem( 0 ); 295 m_syncWidget->syncModeCombo->setCurrentItem( 0 );
254 break; 296 break;
255 case 0x02: 297 case 0x02:
256 default: 298 default:
257 m_syncWidget->syncModeCombo->setCurrentItem( 1 ); 299 m_syncWidget->syncModeCombo->setCurrentItem( 1 );
258 break; 300 break;
259 case 0x04: 301 case 0x04:
260 m_syncWidget->syncModeCombo->setCurrentItem( 2 ); 302 m_syncWidget->syncModeCombo->setCurrentItem( 2 );
261 break; 303 break;
262 } 304 }
263 /* 305 /*
264 cfg.setGroup("Remote"); 306 cfg.setGroup("Remote");
265 if ( telnetAvailable() ) 307 if ( telnetAvailable() )
266 telnet->setChecked(cfg.readEntry("allow_telnet")); 308 telnet->setChecked(cfg.readEntry("allow_telnet"));
267 else 309 else
268 telnet->hide(); 310 telnet->hide();
269 311
270 if ( sshAvailable() ) 312 if ( sshAvailable() )
271 ssh->setChecked(cfg.readEntry("allow_ssh")); 313 ssh->setChecked(cfg.readEntry("allow_ssh"));
272 else 314 else
273 ssh->hide(); 315 ssh->hide();
274 */ 316 */
275 317
276 // release the Config handler 318 // release the Config handler
277 delete pcfg; 319 delete pcfg;
278 // indeed, selectNet will open the config file... 320 // indeed, selectNet will open the config file...
279 selectNet(auth_peer,auth_peer_bits,TRUE); 321 selectNet(auth_peer,auth_peer_bits,TRUE);
280 322
281 connect( m_syncWidget->syncnet, SIGNAL(textChanged(const QString&)), 323 connect( m_syncWidget->syncnet, SIGNAL(textChanged(const QString&)),
282 this, SLOT(setSyncNet(const QString&))); 324 this, SLOT(setSyncNet(const QString&)));
283 325
284 326
285 327
286 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 328 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf";
287 Config loginCfg(configFile,Config::File); 329 Config loginCfg(configFile,Config::File);
288 330
289 loginCfg.setGroup("General"); 331 loginCfg.setGroup("General");
290 autoLoginName=loginCfg.readEntry("AutoLogin",""); 332 autoLoginName=loginCfg.readEntry("AutoLogin","");
291 333
292 if (autoLoginName.stripWhiteSpace().isEmpty()) { 334 if (autoLoginName.stripWhiteSpace().isEmpty()) {
293 autoLogin=false; 335 autoLogin=false;
294 } else { 336 } else {
295 autoLogin=true; 337 autoLogin=true;
296 } 338 }
297 339
298 340
299 connect(m_loginWidget->autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); 341 connect(m_loginWidget->autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool)));
300 connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); 342 connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int)));
301 connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults())); 343 connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults()));
302 connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); 344 connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry()));
303 345
304 loadUsers(); 346 loadUsers();
305 updateGUI(); 347 updateGUI();
306 348
307} 349}
308 350
309void MultiauthConfig::writeConfig() 351void MultiauthConfig::writeConfig()
310{ 352{
311 Config* pcfg = new Config("Security"); 353 Config* pcfg = new Config("Security");
312 pcfg->setGroup( "Plugins" ); 354 pcfg->setGroup( "Plugins" );
313 QStringList exclude; 355 QStringList exclude;
314 QStringList include; 356 QStringList include;
315 QStringList allPlugins; 357 QStringList allPlugins;
316 358
317 QListViewItemIterator list_it( m_pluginListView ); 359 QListViewItemIterator list_it( m_pluginListView );
318 360
319 // this makes sure the names get saved in the order selected 361 // this makes sure the names get saved in the order selected
320 for ( ; list_it.current(); ++list_it ) { 362 for ( ; list_it.current(); ++list_it ) {
321 QMap <QString, QCheckListItem *>::Iterator it; 363 QMap <QString, QCheckListItem *>::Iterator it;
322 for ( it = m_plugins.begin(); it != m_plugins. end (); ++it ) { 364 for ( it = m_plugins.begin(); it != m_plugins. end (); ++it ) {
323 if ( list_it.current() == (*it) && !(*it)-> isOn () ) { 365 if ( list_it.current() == (*it) && !(*it)-> isOn () ) {
324 exclude << it.key(); 366 exclude << it.key();
325 } else if ( list_it.current() == (*it) && (*it)-> isOn () ){ 367 } else if ( list_it.current() == (*it) && (*it)-> isOn () ){
326 include << it.key(); 368 include << it.key();
327 } 369 }
328 if ( list_it.current() == (*it) ) { 370 if ( list_it.current() == (*it) ) {
329 allPlugins << it.key(); 371 allPlugins << it.key();
330 } 372 }
331 } 373 }
332 } 374 }
333 pcfg->writeEntry( "ExcludePlugins", exclude, ',' ); 375 pcfg->writeEntry( "ExcludePlugins", exclude, ',' );
334 pcfg->writeEntry( "IncludePlugins", include, ',' ); 376 pcfg->writeEntry( "IncludePlugins", include, ',' );
335 pcfg->writeEntry( "AllPlugins", allPlugins, ',' ); 377 pcfg->writeEntry( "AllPlugins", allPlugins, ',' );
336 378
337 pcfg->setGroup( "Misc" ); 379 pcfg->setGroup( "Misc" );
338 pcfg->writeEntry( "onStart", m_generalConfig->onStart->isChecked() ); 380 pcfg->writeEntry( "onStart", m_generalConfig->onStart->isChecked() );
339 pcfg->writeEntry( "onResume", m_generalConfig->onResume->isChecked() ); 381 pcfg->writeEntry( "onResume", m_generalConfig->onResume->isChecked() );
340 pcfg->writeEntry( "nbSuccessMin", m_generalConfig->nbSuccessMin->text() ); 382 pcfg->writeEntry( "nbSuccessMin", m_generalConfig->nbSuccessMin->text() );
341 pcfg->writeEntry( "noProtectConfig", m_generalConfig->noProtectConfig->isChecked() ); 383 pcfg->writeEntry( "noProtectConfig", m_generalConfig->noProtectConfig->isChecked() );
342 pcfg->writeEntry( "explanScreens", m_generalConfig->explanScreens->isChecked() ); 384 pcfg->writeEntry( "explanScreens", m_generalConfig->explanScreens->isChecked() );
343 pcfg->writeEntry( "allowBypass", m_generalConfig->allowBypass->isChecked() ); 385 pcfg->writeEntry( "allowBypass", m_generalConfig->allowBypass->isChecked() );
344 386
345 /* Login and Sync stuff */ 387 /* Login and Sync stuff */
346 388
347 pcfg->setGroup("Sync"); 389 pcfg->setGroup("Sync");
348 int auth_peer=0; 390 int auth_peer=0;
349 int auth_peer_bits; 391 int auth_peer_bits;
350 QString sn = m_syncWidget->syncnet->currentText(); 392 QString sn = m_syncWidget->syncnet->currentText();
351 parseNet(sn,auth_peer,auth_peer_bits); 393 parseNet(sn,auth_peer,auth_peer_bits);
352 394
353 //this is the *selected* (active) net range 395 //this is the *selected* (active) net range
354 pcfg->writeEntry("auth_peer",auth_peer); 396 pcfg->writeEntry("auth_peer",auth_peer);
355 pcfg->writeEntry("auth_peer_bits",auth_peer_bits); 397 pcfg->writeEntry("auth_peer_bits",auth_peer_bits);
356 398
357 //write back all other net ranges in *cleartext* 399 //write back all other net ranges in *cleartext*
358 for (int i=0; i<10; i++) { 400 for (int i=0; i<10; i++) {
359 QString target; 401 QString target;
360 target.sprintf("net%d", i); 402 target.sprintf("net%d", i);
361 pcfg->writeEntry(target,m_syncWidget->syncnet->text(i)); 403 pcfg->writeEntry(target,m_syncWidget->syncnet->text(i));
362 } 404 }
363 405
364#ifdef ODP 406#ifdef ODP
365#error "Use 0,1,2 and use Launcher" 407#error "Use 0,1,2 and use Launcher"
366#endif 408#endif
367 /* keep the old code so we don't use currentItem directly */ 409 /* keep the old code so we don't use currentItem directly */
368 int value = 0x02; 410 int value = 0x02;
369 switch( m_syncWidget->syncModeCombo->currentItem() ) { 411 switch( m_syncWidget->syncModeCombo->currentItem() ) {
370 case 0: 412 case 0:
371 value = 0x01; 413 value = 0x01;
372 break; 414 break;
373 case 1: 415 case 1:
374 value = 0x02; 416 value = 0x02;
375 break; 417 break;
376 case 2: 418 case 2:
377 value = 0x04; 419 value = 0x04;
378 break; 420 break;
379 } 421 }
380 pcfg->setGroup("SyncMode"); 422 pcfg->setGroup("SyncMode");
381 pcfg->writeEntry( "Mode", value ); 423 pcfg->writeEntry( "Mode", value );
382 424
383 /* 425 /*
384 pcfg->setGroup("Remote"); 426 pcfg->setGroup("Remote");
385 if ( telnetAvailable() ) 427 if ( telnetAvailable() )
386 pcfg->writeEntry("allow_telnet",telnet->isChecked()); 428 pcfg->writeEntry("allow_telnet",telnet->isChecked());
387 if ( sshAvailable() ) 429 if ( sshAvailable() )
388 pcfg->writeEntry("allow_ssh",ssh->isChecked()); 430 pcfg->writeEntry("allow_ssh",ssh->isChecked());
389 // ### write ssh/telnet sys config files 431 // ### write ssh/telnet sys config files
390 */ 432 */
391 433
392 //release the Config handler 434 //release the Config handler
393 delete pcfg; 435 delete pcfg;
394 436
395 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 437 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf";
396 Config loginCfg(configFile,Config::File); 438 Config loginCfg(configFile,Config::File);
397 loginCfg.setGroup("General"); 439 loginCfg.setGroup("General");
398 440
399 if (autoLogin) { 441 if (autoLogin) {
400 loginCfg.writeEntry("AutoLogin",autoLoginName); 442 loginCfg.writeEntry("AutoLogin",autoLoginName);
diff --git a/core/settings/security/multiauthconfig.h b/core/settings/security/multiauthconfig.h
index ffe920f..649815d 100644
--- a/core/settings/security/multiauthconfig.h
+++ b/core/settings/security/multiauthconfig.h
@@ -1,141 +1,144 @@
1/** 1/**
2 * \file multiauthconfig.h 2 * \file multiauthconfig.h
3 * \brief Configuration GUI for Opie multiauth. framework, login and sync 3 * \brief Configuration GUI for Opie multiauth. framework, login and sync
4 * \author Clément Séveillac (clement . seveillac (at) via . ecp . fr) 4 * \author Clément Séveillac (clement . seveillac (at) via . ecp . fr)
5 */ 5 */
6/* 6/*
7 =. This file is part of the Opie Project 7 =. This file is part of the Opie Project
8 .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> 8 .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org>
9 .>+-= 9 .>+-=
10 _;:, .> :=|. This library is free software; you can 10 _;:, .> :=|. This library is free software; you can
11.> <`_, > . <= redistribute it and/or modify it under 11.> <`_, > . <= redistribute it and/or modify it under
12:`=1 )Y*s>-.-- : the terms of the GNU Library General Public 12:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
13.="- .-=="i, .._ License as published by the Free Software 13.="- .-=="i, .._ License as published by the Free Software
14 - . .-<_> .<> Foundation; either version 2 of the License, 14 - . .-<_> .<> Foundation; either version 2 of the License,
15 ._= =} : or (at your option) any later version. 15 ._= =} : or (at your option) any later version.
16 .%`+i> _;_. 16 .%`+i> _;_.
17 .i_,=:_. -<s. This library is distributed in the hope that 17 .i_,=:_. -<s. This library is distributed in the hope that
18 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 18 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
19 : .. .:, . . . without even the implied warranty of 19 : .. .:, . . . without even the implied warranty of
20 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 20 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
21 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU 21 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.= = ; Library General Public License for more 22..}^=.= = ; Library General Public License for more
23++= -. .` .: details. 23++= -. .` .: details.
24 : = ...= . :.=- 24 : = ...= . :.=-
25 -. .:....=;==+<; You should have received a copy of the GNU 25 -. .:....=;==+<; You should have received a copy of the GNU
26 -_. . . )=. = Library General Public License along with 26 -_. . . )=. = Library General Public License along with
27 -- :-=` this library; see the file COPYING.LIB. 27 -- :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#ifndef MULTIAUTHCONFIG_H 34#ifndef MULTIAUTHCONFIG_H
35#define MULTIAUTHCONFIG_H 35#define MULTIAUTHCONFIG_H
36 36
37#include <opie2/multiauthplugininterface.h> 37#include <opie2/multiauthplugininterface.h>
38#include <opie2/multiauthcommon.h> 38#include <opie2/multiauthcommon.h>
39 39
40/* OPIE */ 40/* OPIE */
41#include <opie2/otabwidget.h> 41#include <opie2/otabwidget.h>
42 42
43/* QT */ 43/* QT */
44#include <qdialog.h> 44#include <qdialog.h>
45#include <qwidget.h> 45#include <qwidget.h>
46#include <qcheckbox.h> 46#include <qcheckbox.h>
47#include <qspinbox.h> 47#include <qspinbox.h>
48#include <qpe/config.h> 48#include <qpe/config.h>
49#include <qlistview.h> 49#include <qlistview.h>
50#include <qmap.h> 50#include <qmap.h>
51#include <qcombobox.h> 51#include <qcombobox.h>
52#include <qpushbutton.h> 52#include <qpushbutton.h>
53#include <qmessagebox.h> 53#include <qmessagebox.h>
54#include <qtextstream.h> 54#include <qtextstream.h>
55 55
56/* UI */ 56/* UI */
57#include "syncbase.h" 57#include "syncbase.h"
58#include "loginbase.h" 58#include "loginbase.h"
59 59
60 60
61/// the "misc" configuration tab, about general Opie Multiauth settings 61/// the "misc" configuration tab, about general Opie Multiauth settings
62class MultiauthGeneralConfig : public QWidget 62class MultiauthGeneralConfig : public QWidget
63{ 63{
64 Q_OBJECT 64 Q_OBJECT
65public: 65public:
66 MultiauthGeneralConfig(QWidget * parent, const char * name); 66 MultiauthGeneralConfig(QWidget * parent, const char * name);
67 ~MultiauthGeneralConfig(); 67 ~MultiauthGeneralConfig();
68protected: 68protected:
69 QCheckBox *onStart, *onResume, *noProtectConfig, *explanScreens, *allowBypass; 69 QCheckBox *onStart, *onResume, *noProtectConfig, *explanScreens, *allowBypass;
70 QSpinBox *nbSuccessMin; 70 QSpinBox *nbSuccessMin;
71private: 71private:
72 friend class MultiauthConfig; 72 friend class MultiauthConfig;
73private slots: 73private slots:
74 void checkBypass(); 74 void checkBypass();
75 void checkScreens(); 75 void checkScreens();
76}; 76};
77 77
78/// the whole configuration dialog 78/// the whole configuration dialog
79class MultiauthConfig : public QDialog 79class MultiauthConfig : public QDialog
80{ 80{
81 Q_OBJECT 81 Q_OBJECT
82 82
83public: 83public:
84 MultiauthConfig(); 84 static QString appName() { return QString::fromLatin1("security"); }
85 MultiauthConfig(QWidget *parent, const char* name, WFlags fl);
85 virtual ~MultiauthConfig(); 86 virtual ~MultiauthConfig();
86 void writeConfig(); 87 void writeConfig();
87 QList<Opie::Security::MultiauthConfigWidget> configWidgetList; 88 QList<Opie::Security::MultiauthConfigWidget> configWidgetList;
88 89
89protected slots: 90protected slots:
91 void accept();
92 void done(int r);
90 void pluginsChanged(); 93 void pluginsChanged();
91 void moveSelectedUp(); 94 void moveSelectedUp();
92 void moveSelectedDown(); 95 void moveSelectedDown();
93 96
94private slots: 97private slots:
95 // Login and Sync stuff 98 // Login and Sync stuff
96 void setSyncNet(const QString&); 99 void setSyncNet(const QString&);
97 void changeLoginName(int); 100 void changeLoginName(int);
98 void toggleAutoLogin(bool); 101 void toggleAutoLogin(bool);
99 void restoreDefaults(); 102 void restoreDefaults();
100 void insertDefaultRanges(); 103 void insertDefaultRanges();
101 void deleteListEntry(); 104 void deleteListEntry();
102 105
103private: 106private:
104 /// the widget holding all the tabs (or pages) 107 /// the widget holding all the tabs (or pages)
105 Opie::Ui::OTabWidget *m_mainTW; 108 Opie::Ui::OTabWidget *m_mainTW;
106 /// list of authentication plugins in the "Plugins" page 109 /// list of authentication plugins in the "Plugins" page
107 QListView *m_pluginListView; 110 QListView *m_pluginListView;
108 QStringList m_allPlugins, m_excludePlugins; 111 QStringList m_allPlugins, m_excludePlugins;
109 QMap<QString,QCheckListItem*> m_plugins; 112 QMap<QString,QCheckListItem*> m_plugins;
110 /// plugin list page 113 /// plugin list page
111 QWidget *m_pluginListWidget; 114 QWidget *m_pluginListWidget;
112 /// misc config page 115 /// misc config page
113 MultiauthGeneralConfig *m_generalConfig; 116 MultiauthGeneralConfig *m_generalConfig;
114 /// login (root / ...) choice page 117 /// login (root / ...) choice page
115 LoginBase *m_loginWidget; 118 LoginBase *m_loginWidget;
116 /// synchronization settings page 119 /// synchronization settings page
117 SyncBase *m_syncWidget; 120 SyncBase *m_syncWidget;
118 121
119 int m_nbSuccessReq; 122 int m_nbSuccessReq;
120 bool m_plugins_changed; 123 bool m_plugins_changed;
121 124
122 void readConfig(); 125 void readConfig();
123 void loadPlugins(); 126 void loadPlugins();
124 127
125 // Login and Sync stuff 128 // Login and Sync stuff
126 void loadUsers(); 129 void loadUsers();
127 bool telnetAvailable() const; 130 bool telnetAvailable() const;
128 bool sshAvailable() const; 131 bool sshAvailable() const;
129 void updateGUI(); 132 void updateGUI();
130 133
131 static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits); 134 static void parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits);
132 void selectNet(int auth_peer,int auth_peer_bits,bool update); 135 void selectNet(int auth_peer,int auth_peer_bits,bool update);
133 136
134 137
135 bool autoLogin; 138 bool autoLogin;
136 QString autoLoginName; 139 QString autoLoginName;
137}; 140};
138 141
139 142
140#endif // MULTIAUTHCONFIG_H 143#endif // MULTIAUTHCONFIG_H
141 144
diff --git a/core/settings/security/security.pro b/core/settings/security/security.pro
index 5d2ae08..e9f4061 100644
--- a/core/settings/security/security.pro
+++ b/core/settings/security/security.pro
@@ -1,16 +1,10 @@
1CONFIG += qt warn_on 1CONFIG += qt warn_on quick-app
2
3HEADERS = multiauthconfig.h 2HEADERS = multiauthconfig.h
4
5SOURCES = multiauthconfig.cpp main.cpp 3SOURCES = multiauthconfig.cpp main.cpp
6
7 INTERFACES= loginbase.ui syncbase.ui 4 INTERFACES= loginbase.ui syncbase.ui
8 5
9INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
10
11LIBS += -lqpe -lopiecore2 -lopieui2 -lopiesecurity2 7LIBS += -lqpe -lopiecore2 -lopieui2 -lopiesecurity2
12
13DESTDIR = $(OPIEDIR)/bin
14TARGET = security 8TARGET = security
15 9
16include ( $(OPIEDIR)/include.pro ) 10include ( $(OPIEDIR)/include.pro )