[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kppp
From: Nickolai Shaforostoff <shafff () ukr ! net>
Date: 2008-12-19 19:20:34
Message-ID: 1229714434.056719.19797.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 899081 by shaforo:
add "life :)" GPRS/EDGE provider info. it specifies a modem init string,
so added few lines to providerdb.cpp to place the setting into the right group.
also replacedd unnecessary qregexp vars with usual qstring/char
M +1 -1 DB/Provider/Ukraine/CMakeLists.txt
A DB/Provider/Ukraine/LifeEDGE
M +18 -14 providerdb.cpp
--- trunk/KDE/kdenetwork/kppp/DB/Provider/Ukraine/CMakeLists.txt #899080:899081
@@ -1 +1 @@
-install( FILES .directory Adamant IPTelecom NuVse DESTINATION \
${DATA_INSTALL_DIR}/kppp/Provider/Ukraine) +install( FILES .directory Adamant \
IPTelecom NuVse LifeEDGE DESTINATION \
${DATA_INSTALL_DIR}/kppp/Provider/Ukraine)
--- trunk/KDE/kdenetwork/kppp/providerdb.cpp #899080:899081
@@ -139,26 +139,30 @@
void ProviderDB::accept() {
- QRegExp re_username("%USERNAME%");
- QRegExp re_password("%PASSWORD%");
+ QString usernamePlaceholder="%USERNAME%";
+ QString passwordPlaceholder="%PASSWORD%";
+ QString username=page4->username();
+ QString password=page4->password();
- QMap <QString, QString> map(cfg->entryMap("<default>"));
- QMap <QString, QString>::Iterator it(map.begin());
+ QMap <QString, QString> map=cfg->entryMap("<default>");
+ QMap <QString, QString>::Iterator it=map.begin();
while(it != map.end()) {
QString key = it.key();
QString value = *it;
- if(value.contains(re_username))
- value.replace(re_username, page4->username());
+ value.replace(usernamePlaceholder,username);
+ value.replace(passwordPlaceholder,password);
- if(value.contains(re_password))
- value.replace(re_password, page4->password());
-
gpppdata.writeConfig(gpppdata.currentAccountGroup(), key, value);
if(key == "Name")
gpppdata.setAccname(value);
++it;
}
+
+ map=cfg->entryMap(MODEM_GRP);
+ for(it=map.begin(); it!=map.end(); ++it) {
+ gpppdata.writeConfig(gpppdata.currentModemGroup(), it.key(), *it);
+ }
gpppdata.writeConfig(gpppdata.currentAccountGroup(), "DialPrefix", \
page5->prefix()); done(Accepted);
@@ -189,6 +193,8 @@
//
/////////////////////////////////////////////////////////////////////////////
PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) {
+ //TODO when ported to MVC -- preselect country
+
QLabel *l = new QLabel(i18n("Select the location where you plan to use this\n"
"account from the list below. If your country or\n"
"location is not listed, you have to create the\n"
@@ -306,8 +312,7 @@
dir = _dir;
QString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first();
- QRegExp re1(" ");
- dir = dir.replace(re1, "_");
+ dir = dir.replace(' ', "_");
dir1 += dir;
QDir d(dir1);
@@ -321,7 +326,6 @@
QFileInfo fi;
// traverse the list and insert into the widget
- QRegExp re("_");
while(it != itEnd) {
fi = *it;
QString fname = fi.fileName();
@@ -455,7 +459,7 @@
tl->addStretch(1);
}
-
+//BEGIN pseudo percentencoding routines
void urlDecode(QString &s) {
QString s1;
@@ -486,7 +490,7 @@
}
s = s1;
}
+//END pseudo percentencoding routines
-
#include "providerdb.moc"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic