Diffstat (limited to 'noncore/settings/networksettings/ppp/pppdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppdata.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp index 23db409..8f066ff 100644 --- a/noncore/settings/networksettings/ppp/pppdata.cpp +++ b/noncore/settings/networksettings/ppp/pppdata.cpp @@ -42,13 +42,14 @@ #define SEP QString("%1SEPARATOR%1") PPPData::PPPData() : modemDeviceGroup(-1), - highcount(-1), // start out with no entries - caccount(-1), // set the current account index also - suidprocessid(-1), // process ID of setuid child - pppdisrunning(false), - pppderror(0) + passwd(""), + highcount(-1), // start out with no entries + caccount(-1), // set the current account index also + suidprocessid(-1), // process ID of setuid child + pppdisrunning(false), + pppderror(0) { highcount = readNumConfig(GENERAL_GRP, NUMACCOUNTS_KEY, 0) - 1; if (highcount > MAX_ACCOUNTS) @@ -216,10 +217,11 @@ void PPPData::writeListConfig(const QString &group, const QString &key, // // functions to set/return general information // -QString PPPData::password() const { - return passwd; +QString PPPData::password(){ + if ( storePassword() ) return storedPassword(); + else return passwd; } void PPPData::setPassword(const QString &pw) { @@ -752,9 +754,9 @@ bool PPPData::isUniqueAccname(const QString &n) { } bool PPPData::deleteAccount() { - //FIXME: + //FIXME: PPPData::deleteAccount // if(caccount < 0) return false; // QMap <QString, QString> map; @@ -825,9 +827,9 @@ int PPPData::newaccount() { return caccount; } int PPPData::copyaccount(int i) { -// FIXME +// FIXME: PPPData::copyaccount // if(highcount >= MAX_ACCOUNTS) return -1; // setAccountbyIndex(i); @@ -1275,14 +1277,16 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces ) { QMap<QString,QString>::Iterator it; int i = 0; Config cfg = config(); - for( it = ifaces.begin(); it != ifaces.end(); ++it, ++i ){ - cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i)); + for( it = ifaces.begin(); it != ifaces.end(); ++it ){ + cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i++)); cfg.writeEntry( ACOUNTS_DEV, it.key() ); cfg.writeEntry( ACOUNTS_ACC, it.data() ); + qDebug("I %i",i); } cfg.setGroup( ACCLIST_GRP ); + qDebug("saved %i account settings", i); cfg.writeEntry( ACCOUNTS_COUNT, i ); } |