From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kppp/providerdb.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'kppp/providerdb.cpp') diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp index adcb8336..a86b915d 100644 --- a/kppp/providerdb.cpp +++ b/kppp/providerdb.cpp @@ -44,12 +44,12 @@ #include -#define UNENCODED_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" +#define UNENCODED_CHARS "ABCDEFGHIJKLMNOPTQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" TQWizard* ProviderDB::wiz = 0L; -ProviderDB::ProviderDB(TQWidget *parent) : - KWizard(parent, "", true), +ProviderDB::ProviderDB(TQWidget *tqparent) : + KWizard(tqparent, "", true), cfg(0) { setCaption(i18n("Create New Account")); @@ -88,7 +88,7 @@ ProviderDB::ProviderDB(TQWidget *parent) : connect((const TQObject *)backButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(pageSelected())); - // resize(minimumSize()); + // resize(tqminimumSize()); adjustSize(); } @@ -143,11 +143,11 @@ void ProviderDB::accept() { while(it != map.end()) { TQString key = it.key(); TQString value = *it; - if(value.contains(re_username)) - value.replace(re_username, page4->username()); + if(value.tqcontains(re_username)) + value.tqreplace(re_username, page4->username()); - if(value.contains(re_password)) - value.replace(re_password, page4->password()); + if(value.tqcontains(re_password)) + value.tqreplace(re_password, page4->password()); gpppdata.writeConfig(gpppdata.currentAccountGroup(), key, value); @@ -164,7 +164,7 @@ void ProviderDB::accept() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Intro::PDB_Intro(TQWidget *parent) : TQWidget(parent) { +PDB_Intro::PDB_Intro(TQWidget *tqparent) : TQWidget(tqparent) { TQLabel *l = new TQLabel(i18n("You will be asked a few questions on information\n" "which is needed to establish an Internet connection\n" "with your Internet Service Provider (ISP).\n\n" @@ -182,7 +182,7 @@ PDB_Intro::PDB_Intro(TQWidget *parent) : TQWidget(parent) { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) { +PDB_Country::PDB_Country(TQWidget *tqparent) : TQWidget(tqparent) { TQLabel *l = new TQLabel(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" @@ -213,9 +213,9 @@ PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) { d.setSorting(TQDir::Name); // read the list of files - const QFileInfoList *flist = d.entryInfoList(); + const TQFileInfoList *flist = d.entryInfoList(); if(flist) { - QFileInfoListIterator it( *flist ); + TQFileInfoListIterator it( *flist ); TQFileInfo *fi; // traverse the flist and insert into a map for sorting TQMap countries; @@ -251,7 +251,7 @@ PDB_Country::~PDB_Country() } void PDB_Country::selectionChanged(int idx) { - // TQWizard *wizard = (TQWizard *)parent(); Why doesn't this work ? + // TQWizard *wizard = (TQWizard *)tqparent(); Why doesn't this work ? ProviderDB::wiz->setNextEnabled(this, (idx != -1)); } @@ -259,7 +259,7 @@ void PDB_Country::selectionChanged(int idx) { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Provider::PDB_Provider(TQWidget *parent) : TQWidget(parent) { +PDB_Provider::PDB_Provider(TQWidget *tqparent) : TQWidget(tqparent) { TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); TQLabel *l = new TQLabel(i18n("Select your Internet Service Provider (ISP) from\n" "the list below. If the ISP is not in this list,\n" @@ -296,7 +296,7 @@ void PDB_Provider::setDir(const TQString &_dir) { TQString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first(); TQRegExp re1(" "); - dir = dir.replace(re1, "_"); + dir = dir.tqreplace(re1, "_"); dir1 += dir; TQDir d(dir1); @@ -304,8 +304,8 @@ void PDB_Provider::setDir(const TQString &_dir) { d.setSorting(TQDir::Name); // read the list of files - const QFileInfoList *list = d.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = d.entryInfoList(); + TQFileInfoListIterator it( *list ); TQFileInfo *fi; // traverse the list and insert into the widget @@ -319,7 +319,7 @@ void PDB_Provider::setDir(const TQString &_dir) { ++it; } - // TODO: Qt 1.x needs this if list is empty + // TODO: TQt 1.x needs this if list is empty lb->update(); } } @@ -334,7 +334,7 @@ TQString PDB_Provider::getDir() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_UserInfo::PDB_UserInfo(TQWidget *parent) : TQWidget(parent) { +PDB_UserInfo::PDB_UserInfo(TQWidget *tqparent) : TQWidget(tqparent) { TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); TQLabel *l = new TQLabel(i18n("To log on to your ISP, kppp needs the username\n" "and the password you got from your ISP. Type\n" @@ -388,7 +388,7 @@ void PDB_UserInfo::activate() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_DialPrefix::PDB_DialPrefix(TQWidget *parent) : TQWidget(parent) { +PDB_DialPrefix::PDB_DialPrefix(TQWidget *tqparent) : TQWidget(tqparent) { TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); TQLabel *l = new TQLabel(i18n("If you need a special dial prefix (e.g. if you\n" "are using a telephone switch) you can specify\n" @@ -424,7 +424,7 @@ void PDB_DialPrefix::activate() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Finished::PDB_Finished(TQWidget *parent) : TQWidget(parent) { +PDB_Finished::PDB_Finished(TQWidget *tqparent) : TQWidget(tqparent) { TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); TQLabel *l = new TQLabel(i18n("Finished!\n\n" "A new account has been created. Click \"Finish\" to\n" @@ -458,10 +458,10 @@ void urlEncode(TQString &s) { TQString s1, tmp; for(uint i = 0; i < s.length(); i++) { - if(TQString(UNENCODED_CHARS).find(s[i]) >= 0) + if(TQString(UNENCODED_CHARS).tqfind(s[i]) >= 0) s1 += s[i]; else { - tmp.sprintf("%%%03i", s[i].unicode()); + tmp.sprintf("%%%03i", s[i].tqunicode()); s1 += tmp; } } -- cgit v1.2.1