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 @@ -44,9 +44,10 @@ 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; @@ -218,6 +219,7 @@ 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; } @@ -754,5 +756,5 @@ bool PPPData::isUniqueAccname(const QString &n) { bool PPPData::deleteAccount() { - //FIXME: + //FIXME: PPPData::deleteAccount // if(caccount < 0) return false; @@ -827,5 +829,5 @@ int PPPData::newaccount() { int PPPData::copyaccount(int i) { -// FIXME +// FIXME: PPPData::copyaccount // if(highcount >= MAX_ACCOUNTS) return -1; @@ -1277,10 +1279,12 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces ) 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 ); |