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 --- lanbrowsing/kcmlisa/findnic.cpp | 36 ++++++++++---------- lanbrowsing/kcmlisa/findnic.h | 2 +- lanbrowsing/kcmlisa/kcmkiolan.cpp | 24 ++++++------- lanbrowsing/kcmlisa/kcmkiolan.h | 3 +- lanbrowsing/kcmlisa/kcmlisa.cpp | 28 +++++++-------- lanbrowsing/kcmlisa/kcmlisa.h | 3 +- lanbrowsing/kcmlisa/kcmreslisa.cpp | 20 +++++------ lanbrowsing/kcmlisa/kcmreslisa.h | 3 +- lanbrowsing/kcmlisa/main.cpp | 12 +++---- lanbrowsing/kcmlisa/portsettingsbar.cpp | 4 +-- lanbrowsing/kcmlisa/portsettingsbar.h | 5 +-- lanbrowsing/kcmlisa/setupwizard.cpp | 60 ++++++++++++++++----------------- lanbrowsing/kcmlisa/setupwizard.h | 5 +-- lanbrowsing/kio_lan/kio_lan.cpp | 6 ++-- lanbrowsing/lisa/addressvalidator.cpp | 50 +++++++++++++-------------- lanbrowsing/lisa/addressvalidator.h | 4 +-- lanbrowsing/lisa/client.cpp | 16 ++++----- lanbrowsing/lisa/client.h | 4 +-- lanbrowsing/lisa/main.cpp | 4 +-- lanbrowsing/lisa/mystring.cpp | 4 +-- lanbrowsing/lisa/mystring.h | 4 +-- lanbrowsing/lisa/netmanager.cpp | 18 +++++----- lanbrowsing/lisa/netscanner.cpp | 24 ++++++------- lanbrowsing/lisa/strictmain.cpp | 4 +-- 24 files changed, 174 insertions(+), 169 deletions(-) (limited to 'lanbrowsing') diff --git a/lanbrowsing/kcmlisa/findnic.cpp b/lanbrowsing/kcmlisa/findnic.cpp index 721834c9..7de4b19c 100644 --- a/lanbrowsing/kcmlisa/findnic.cpp +++ b/lanbrowsing/kcmlisa/findnic.cpp @@ -128,10 +128,10 @@ NICList* findNICs() if (result==0) { sinptr = (struct sockaddr_in *) &ifcopy.ifr_addr; - tmp->netmask=inet_ntoa(sinptr->sin_addr); + tmp->nettqmask=inet_ntoa(sinptr->sin_addr); } else - tmp->netmask=i18n("Unknown"); + tmp->nettqmask=i18n("Unknown"); nl->append(tmp); break; @@ -159,14 +159,14 @@ NICList* findNICs() getnameinfo(ifa->ifa_addr, ifa->ifa_addr->sa_len, buf, 127, 0, 0, NI_NUMERICHOST); tmp->addr = buf; - if (ifa->ifa_netmask != NULL) { + if (ifa->ifa_nettqmask != NULL) { #ifdef Q_OS_FREEBSD - struct sockaddr_in *sinptr = (struct sockaddr_in *)ifa->ifa_netmask; - tmp->netmask=inet_ntoa(sinptr->sin_addr); + struct sockaddr_in *sinptr = (struct sockaddr_in *)ifa->ifa_nettqmask; + tmp->nettqmask=inet_ntoa(sinptr->sin_addr); #else bzero(buf, 128); - getnameinfo(ifa->ifa_netmask, ifa->ifa_netmask->sa_len, buf, 127, 0, 0, NI_NUMERICHOST); - tmp->netmask = buf; + getnameinfo(ifa->ifa_nettqmask, ifa->ifa_nettqmask->sa_len, buf, 127, 0, 0, NI_NUMERICHOST); + tmp->nettqmask = buf; #endif } @@ -192,13 +192,13 @@ NICList* findNICs() void suggestSettingsForAddress(const TQString& addrMask, LisaConfigInfo& lci) { - TQString ip=addrMask.left(addrMask.find("/")); - TQString mask=addrMask.mid(addrMask.find("/")+1); + TQString ip=addrMask.left(addrMask.tqfind("/")); + TQString tqmask=addrMask.mid(addrMask.tqfind("/")+1); - if (mask[mask.length()-1]==';') - mask=mask.left(mask.length()-1); + if (tqmask[tqmask.length()-1]==';') + tqmask=tqmask.left(tqmask.length()-1); MyNIC tmpNic; - KInetSocketAddress::stringToAddr(AF_INET, mask.latin1(), &tmpNic.netmask); + KInetSocketAddress::stringToAddr(AF_INET, tqmask.latin1(), &tmpNic.nettqmask); KInetSocketAddress::stringToAddr(AF_INET, ip.latin1(), &tmpNic.addr); suggestSettingsForNic(&tmpNic,lci); } @@ -209,11 +209,11 @@ void suggestSettingsForNic(MyNIC* nic, LisaConfigInfo& lci) if (nic==0) return; TQString address = nic->addr; - TQString netmask = nic->netmask; + TQString nettqmask = nic->nettqmask; - TQString addrMask(address+"/"+netmask+";"); + TQString addrMask(address+"/"+nettqmask+";"); struct in_addr tmpaddr; - inet_aton(nic->netmask.latin1(), &tmpaddr); + inet_aton(nic->nettqmask.latin1(), &tmpaddr); unsigned int tmp= ntohl(tmpaddr.s_addr); //if the host part is less than 20 bits simply take it @@ -275,21 +275,21 @@ TQString flags_tos (unsigned int flags) if (flags & IFF_BROADCAST) { if (tmp.length()) { - tmp += TQString::fromLatin1(", "); + tmp += TQString::tqfromLatin1(", "); } tmp += i18n("Broadcast"); } if (flags & IFF_MULTICAST) { if (tmp.length()) { - tmp += TQString::fromLatin1(", "); + tmp += TQString::tqfromLatin1(", "); } tmp += i18n("Multicast"); } if (flags & IFF_LOOPBACK) { if (tmp.length()) { - tmp += TQString::fromLatin1(", "); + tmp += TQString::tqfromLatin1(", "); } tmp += i18n("Loopback"); } diff --git a/lanbrowsing/kcmlisa/findnic.h b/lanbrowsing/kcmlisa/findnic.h index bff0aabb..0e9453c0 100644 --- a/lanbrowsing/kcmlisa/findnic.h +++ b/lanbrowsing/kcmlisa/findnic.h @@ -32,7 +32,7 @@ struct MyNIC { TQString name; TQString addr; - TQString netmask; + TQString nettqmask; TQString state; TQString type; }; diff --git a/lanbrowsing/kcmlisa/kcmkiolan.cpp b/lanbrowsing/kcmlisa/kcmkiolan.cpp index 297f127b..d1c0c4f7 100644 --- a/lanbrowsing/kcmlisa/kcmkiolan.cpp +++ b/lanbrowsing/kcmlisa/kcmkiolan.cpp @@ -31,14 +31,14 @@ #include #include -IOSlaveSettings::IOSlaveSettings(const TQString& config, TQWidget *parent) -:KCModule(parent) +IOSlaveSettings::IOSlaveSettings(const TQString& config, TQWidget *tqparent) +:KCModule(tqparent) ,m_config(config,false,true) { - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - layout->setAutoAdd(true); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + tqlayout->setAutoAdd(true); - TQGroupBox* group=new TQGroupBox(1, Horizontal, i18n("Show Links for Following Services"), this); + TQGroupBox* group=new TQGroupBox(1,Qt::Horizontal, i18n("Show Links for Following Services"), this); m_ftpSettings=new PortSettingsBar(i18n("FTP (TCP, port 21): "), group); m_httpSettings=new PortSettingsBar(i18n("HTTP (TCP, port 80): "),group); @@ -53,13 +53,13 @@ IOSlaveSettings::IOSlaveSettings(const TQString& config, TQWidget *parent) label->setBuddy(m_defaultLisaHostLe); TQWidget *w=new TQWidget(this); - layout->setStretchFactor(m_ftpSettings,0); - layout->setStretchFactor(m_httpSettings,0); - layout->setStretchFactor(m_nfsSettings,0); - layout->setStretchFactor(m_smbSettings,0); - layout->setStretchFactor(m_shortHostnames,0); - layout->setStretchFactor(hbox,0); - layout->setStretchFactor(w,1); + tqlayout->setStretchFactor(m_ftpSettings,0); + tqlayout->setStretchFactor(m_httpSettings,0); + tqlayout->setStretchFactor(m_nfsSettings,0); + tqlayout->setStretchFactor(m_smbSettings,0); + tqlayout->setStretchFactor(m_shortHostnames,0); + tqlayout->setStretchFactor(hbox,0); + tqlayout->setStretchFactor(w,1); connect(m_ftpSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); connect(m_httpSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); diff --git a/lanbrowsing/kcmlisa/kcmkiolan.h b/lanbrowsing/kcmlisa/kcmkiolan.h index 24c67d3c..9fc4da67 100644 --- a/lanbrowsing/kcmlisa/kcmkiolan.h +++ b/lanbrowsing/kcmlisa/kcmkiolan.h @@ -31,8 +31,9 @@ class TQLineEdit; class IOSlaveSettings:public KCModule { Q_OBJECT + TQ_OBJECT public: - IOSlaveSettings(const TQString& config, TQWidget *parent=0); + IOSlaveSettings(const TQString& config, TQWidget *tqparent=0); virtual ~IOSlaveSettings() {}; void load(); void save(); diff --git a/lanbrowsing/kcmlisa/kcmlisa.cpp b/lanbrowsing/kcmlisa/kcmlisa.cpp index 7819b217..36ab9ba6 100644 --- a/lanbrowsing/kcmlisa/kcmlisa.cpp +++ b/lanbrowsing/kcmlisa/kcmlisa.cpp @@ -48,15 +48,15 @@ #include -LisaSettings::LisaSettings(const TQString& config, TQWidget *parent) -: KCModule(parent, "kcmlanbrowser") +LisaSettings::LisaSettings(const TQString& config, TQWidget *tqparent) +: KCModule(tqparent, "kcmlanbrowser") ,m_config(config,false,true) ,m_wizard(0) ,m_configFilename(config) ,m_changed(false) { - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - layout->setAutoAdd(true); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + tqlayout->setAutoAdd(true); TQWidget *dummy(0); @@ -83,10 +83,10 @@ LisaSettings::LisaSettings(const TQString& config, TQWidget *parent) TQGrid *addressesGrid = new TQGrid(2, Qt::Horizontal, this); addressesGrid->setSpacing(10); - layout->setStretchFactor(addressesGrid,0); + tqlayout->setStretchFactor(addressesGrid,0); label=new TQLabel(i18n("&Broadcast network address:"),addressesGrid); - comment=i18n("Your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)"); + comment=i18n("Your network address/subnet tqmask (e.g. 192.168.0.0/255.255.255.0;)"); TQToolTip::add(label, comment); m_broadcastNetwork=new KRestrictedLine(addressesGrid,"a","0123456789./;"); @@ -94,7 +94,7 @@ LisaSettings::LisaSettings(const TQString& config, TQWidget *parent) label->setBuddy(m_broadcastNetwork); label=new TQLabel(i18n("&Trusted IP addresses:"),addressesGrid); - comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)"); + comment = i18n("Usually your network address/subnet tqmask (e.g. 192.168.0.0/255.255.255.0;)"); TQToolTip::add(label, comment); m_allowedAddresses=new KRestrictedLine(addressesGrid,"a","0123456789./;"); @@ -102,13 +102,13 @@ LisaSettings::LisaSettings(const TQString& config, TQWidget *parent) label->setBuddy(m_allowedAddresses); dummy=new TQWidget(this); - layout->setStretchFactor(dummy,10); + tqlayout->setStretchFactor(dummy,10); hbox = new TQHBox(this); hbox->setSpacing(10); // m_autoSetup=new TQPushButton(i18n("&Guided LISa Setup..."),hbox); m_autoSetup=new TQPushButton(i18n("Setup Wizard..."),hbox); - m_autoSetup->setFixedWidth( m_autoSetup->sizeHint().width() ); + m_autoSetup->setFixedWidth( m_autoSetup->tqsizeHint().width() ); m_suggestSettings=new TQPushButton(i18n("&Suggest Settings"),hbox); @@ -288,17 +288,17 @@ void LisaSettings::save() confStream<<"PingNames = "<start() ) delete proc; } else - KMessageBox::sorry(0,i18n("Saving the results to %1 failed.").arg(m_configFilename)); + KMessageBox::sorry(0,i18n("Saving the results to %1 failed.").tqarg(m_configFilename)); } } @@ -335,9 +335,9 @@ void LisaSettings::suggestSettings() //not that easy to handle for (MyNIC* tmp=nics->first(); tmp!=0; tmp=nics->next()) { - msg+=""+tmp->name+": "+tmp->addr+"/"+tmp->netmask+";
"; + msg+=""+tmp->name+": "+tmp->addr+"/"+tmp->nettqmask+";
"; } - KMessageBox::information(0,TQString("%1").arg(msg)); + KMessageBox::information(0,TQString("%1").tqarg(msg)); } emit changed(); diff --git a/lanbrowsing/kcmlisa/kcmlisa.h b/lanbrowsing/kcmlisa/kcmlisa.h index d13c0592..af576ca1 100644 --- a/lanbrowsing/kcmlisa/kcmlisa.h +++ b/lanbrowsing/kcmlisa/kcmlisa.h @@ -37,8 +37,9 @@ class SetupWizard; class LisaSettings:public KCModule { Q_OBJECT + TQ_OBJECT public: - LisaSettings(const TQString& config, TQWidget *parent=0); + LisaSettings(const TQString& config, TQWidget *tqparent=0); virtual ~LisaSettings() {}; void load(); void save(); diff --git a/lanbrowsing/kcmlisa/kcmreslisa.cpp b/lanbrowsing/kcmlisa/kcmreslisa.cpp index fcaf104c..06342be4 100644 --- a/lanbrowsing/kcmlisa/kcmreslisa.cpp +++ b/lanbrowsing/kcmlisa/kcmreslisa.cpp @@ -36,8 +36,8 @@ #include #include -ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *parent) -: KCModule(parent) +ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *tqparent) +: KCModule(tqparent) ,m_config(config,false,true) ,m_kiolanConfig("kio_lanrc",false,true) ,m_advancedSettingsButton(0) @@ -53,8 +53,8 @@ ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *parent) ,m_maxPingsAtOnce(0) ,m_reslisaAdvancedDlg(0) { - TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - layout->setAutoAdd(true); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + tqlayout->setAutoAdd(true); TQVButtonGroup *gb=new TQVButtonGroup(i18n("Tell ResLISa Daemon How to Search for Hosts"),this); gb->setInsideSpacing(10); @@ -68,7 +68,7 @@ ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *parent) TQHBox *hbox=new TQHBox(this); hbox->setSpacing(10); TQLabel *label=new TQLabel(i18n("&Trusted addresses:"),hbox); - TQString comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)"); + TQString comment = i18n("Usually your network address/subnet tqmask (e.g. 192.168.0.0/255.255.255.0;)"); TQToolTip::add(label, comment); m_allowedAddresses=new KRestrictedLine(hbox,"a","0123456789./;"); TQToolTip::add(m_allowedAddresses,comment); @@ -218,8 +218,8 @@ void ResLisaSettings::suggestSettings() MyNIC *nic=nics->first(); TQString address = nic->addr; - TQString netmask = nic->netmask; - m_allowedAddresses->setText(address+"/"+netmask+";"); + TQString nettqmask = nic->nettqmask; + m_allowedAddresses->setText(address+"/"+nettqmask+";"); m_secondWait->setValue(0); m_secondScan->setChecked(FALSE); m_secondWait->setEnabled(FALSE); @@ -235,11 +235,11 @@ void ResLisaSettings::suggestSettings() //not that easy to handle for (MyNIC* tmp=nics->first(); tmp!=0; tmp=nics->next()) { - msg+=""+tmp->name+": "+tmp->addr+"/"+tmp->netmask+";
"; + msg+=""+tmp->name+": "+tmp->addr+"/"+tmp->nettqmask+";
"; } - KMessageBox::information(0,TQString("%1").arg(msg)); + KMessageBox::information(0,TQString("%1").tqarg(msg)); } - KMessageBox::information(0,TQString("%1").arg(i18n("The ResLISa daemon is now configured " + KMessageBox::information(0,TQString("%1").tqarg(i18n("The ResLISa daemon is now configured " "correctly, hopefully.
Make sure that the reslisa binary is installed suid root."))); emit changed(); diff --git a/lanbrowsing/kcmlisa/kcmreslisa.h b/lanbrowsing/kcmlisa/kcmreslisa.h index a10ce198..68cd8f4f 100644 --- a/lanbrowsing/kcmlisa/kcmreslisa.h +++ b/lanbrowsing/kcmlisa/kcmreslisa.h @@ -35,8 +35,9 @@ class KRestrictedLine; class ResLisaSettings:public KCModule { Q_OBJECT + TQ_OBJECT public: - ResLisaSettings(const TQString& config, TQWidget *parent=0); + ResLisaSettings(const TQString& config, TQWidget *tqparent=0); virtual ~ResLisaSettings() {} void load(); void save(); diff --git a/lanbrowsing/kcmlisa/main.cpp b/lanbrowsing/kcmlisa/main.cpp index 00d03e52..83d80ab5 100644 --- a/lanbrowsing/kcmlisa/main.cpp +++ b/lanbrowsing/kcmlisa/main.cpp @@ -33,17 +33,17 @@ extern "C" { - KDE_EXPORT KCModule *create_lisa(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_lisa(TQWidget *tqparent, const char *) { - return new LisaSettings("/etc/lisarc", parent); + return new LisaSettings("/etc/lisarc", tqparent); } - KDE_EXPORT KCModule *create_reslisa(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_reslisa(TQWidget *tqparent, const char *) { - return new ResLisaSettings(TQDir::homeDirPath()+"/.reslisarc", parent); + return new ResLisaSettings(TQDir::homeDirPath()+"/.reslisarc", tqparent); } - KDE_EXPORT KCModule *create_kiolan(TQWidget *parent, const char *) + KDE_EXPORT KCModule *create_kiolan(TQWidget *tqparent, const char *) { - return new IOSlaveSettings("kio_lanrc", parent); + return new IOSlaveSettings("kio_lanrc", tqparent); } } diff --git a/lanbrowsing/kcmlisa/portsettingsbar.cpp b/lanbrowsing/kcmlisa/portsettingsbar.cpp index 3e94c730..1b3e7c1b 100644 --- a/lanbrowsing/kcmlisa/portsettingsbar.cpp +++ b/lanbrowsing/kcmlisa/portsettingsbar.cpp @@ -23,8 +23,8 @@ #include -PortSettingsBar::PortSettingsBar(const TQString& title, TQWidget *parent) -:TQHBox(parent) +PortSettingsBar::PortSettingsBar(const TQString& title, TQWidget *tqparent) +:TQHBox(tqparent) { TQLabel* label=new TQLabel(title, this); m_box=new TQComboBox(this); diff --git a/lanbrowsing/kcmlisa/portsettingsbar.h b/lanbrowsing/kcmlisa/portsettingsbar.h index 150390dc..bc674788 100644 --- a/lanbrowsing/kcmlisa/portsettingsbar.h +++ b/lanbrowsing/kcmlisa/portsettingsbar.h @@ -28,11 +28,12 @@ #define PORTSETTINGS_PROVIDE 1 #define PORTSETTINGS_DISABLE 2 -class PortSettingsBar:public QHBox +class PortSettingsBar:public TQHBox { Q_OBJECT + TQ_OBJECT public: - PortSettingsBar(const TQString& title, TQWidget *parent=0); + PortSettingsBar(const TQString& title, TQWidget *tqparent=0); virtual ~PortSettingsBar() {}; int selected() const; void setChecked(int what); diff --git a/lanbrowsing/kcmlisa/setupwizard.cpp b/lanbrowsing/kcmlisa/setupwizard.cpp index fbe8db4e..ab73259c 100644 --- a/lanbrowsing/kcmlisa/setupwizard.cpp +++ b/lanbrowsing/kcmlisa/setupwizard.cpp @@ -31,8 +31,8 @@ #include #include -SetupWizard::SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo) - :TQWizard(parent,"hallo",true) +SetupWizard::SetupWizard(TQWidget* tqparent, LisaConfigInfo* configInfo) + :TQWizard(tqparent,"hallo",true) ,m_page1(0) ,m_noNicPage(0) ,m_multiNicPage(0) @@ -183,7 +183,7 @@ void SetupWizard::setupSearchPage() { m_searchPage=new TQVBox(this); TQLabel *info=new TQLabel(i18n("There are two ways LISa can search hosts on your network."),m_searchPage); - info->setTextFormat(Qt::RichText); + info->setTextFormat(TQt::RichText); m_ping=new TQCheckBox(i18n("Send pings"), m_searchPage); info=new TQLabel(i18n("All hosts with TCP/IP will respond,
" "whether or not they are samba servers.
" @@ -193,13 +193,13 @@ void SetupWizard::setupSearchPage() "Only samba/windows servers will respond.
" "This method is not very reliable.
" "You should enable it if you are part of a large network."),m_searchPage); - info->setTextFormat(Qt::RichText); + info->setTextFormat(TQt::RichText); TQWidget *dummy=new TQWidget(m_searchPage); m_searchPage->setStretchFactor(dummy,10); m_searchPage->setSpacing(KDialog::spacingHint()); m_searchPage->setMargin(KDialog::marginHint()); info=new TQLabel(i18n("If unsure, keep it as is."),m_searchPage); - info->setAlignment(AlignRight|AlignVCenter); + info->tqsetAlignment(AlignRight|AlignVCenter); setHelpEnabled( m_searchPage, false ); } @@ -208,24 +208,24 @@ void SetupWizard::setupAddressesPage() { m_addressesPage=new TQVBox(this); TQLabel *info=new TQLabel(i18n("All IP addresses included in the specified range will be pinged.
" - "If you are part of a small network, e.g. with network mask 255.255.255.0
" - "use your IP address/network mask.
"),m_addressesPage); - info->setTextFormat(Qt::RichText); + "If you are part of a small network, e.g. with network tqmask 255.255.255.0
" + "use your IP address/network tqmask.
"),m_addressesPage); + info->setTextFormat(TQt::RichText); m_pingAddresses=new KRestrictedLine(m_addressesPage,"0123456789./;-"); info=new TQLabel(i18n("
There are four ways to specify address ranges:
" - "1. IP address/network mask, like 192.168.0.0/255.255.255.0;
" + "1. IP address/network tqmask, like 192.168.0.0/255.255.255.0;
" "2. single IP addresses, like 10.0.0.23;
" "3. continuous ranges, like 10.0.1.0-10.0.1.200;
" "4. ranges for each part of the address, like 10-10.1-5.1-25.1-3;
" "You can also enter combinations of 1 to 4, separated by \";\", like
" "192.168.0.0/255.255.255.0;10.0.0.0;10.0.1.1-10.0.1.100;
"),m_addressesPage); - info->setAlignment(AlignLeft|AlignVCenter|WordBreak); + info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak); TQWidget *dummy=new TQWidget(m_addressesPage); m_addressesPage->setStretchFactor(dummy,10); m_addressesPage->setSpacing(KDialog::spacingHint()); m_addressesPage->setMargin(KDialog::marginHint()); info=new TQLabel(i18n("If unsure, keep it as is."), m_addressesPage); - info->setAlignment(AlignRight|AlignVCenter); + info->tqsetAlignment(AlignRight|AlignVCenter); setHelpEnabled( m_addressesPage, false ); } @@ -237,8 +237,8 @@ void SetupWizard::setupAllowedPage() "It provides a simple IP address based way to specify \"trusted\" hosts.
" "Only hosts which fit into the addresses given here are accepted by LISa as clients. " "The list of hosts published by LISa will also only contain hosts which fit into this scheme.
" - "Usually you enter your IP address/network mask here."),m_allowedAddressesPage); - info->setAlignment(AlignLeft|AlignVCenter|WordBreak); + "Usually you enter your IP address/network tqmask here."),m_allowedAddressesPage); + info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak); m_allowedAddresses=new KRestrictedLine(m_allowedAddressesPage,"0123456789./-;"); m_trustedHostsLabel=new TQLabel(m_allowedAddressesPage); @@ -247,7 +247,7 @@ void SetupWizard::setupAllowedPage() m_allowedAddressesPage->setSpacing(KDialog::spacingHint()); m_allowedAddressesPage->setMargin(KDialog::marginHint()); info=new TQLabel(i18n("If unsure, keep it as is."), m_allowedAddressesPage); - info->setAlignment(AlignRight|AlignVCenter); + info->tqsetAlignment(AlignRight|AlignVCenter); setHelpEnabled( m_allowedAddressesPage, false ); } @@ -255,19 +255,19 @@ void SetupWizard::setupAllowedPage() void SetupWizard::setupBcastPage() { m_bcastPage=new TQVBox(this); - TQLabel *info=new TQLabel(i18n("
Enter your IP address and network mask here, like 192.168.0.1/255.255.255.0"),m_bcastPage); - info->setAlignment(AlignLeft|AlignVCenter|WordBreak); + TQLabel *info=new TQLabel(i18n("
Enter your IP address and network tqmask here, like 192.168.0.1/255.255.255.0"),m_bcastPage); + info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak); m_bcastAddress=new KRestrictedLine(m_bcastPage,"0123456789./"); info=new TQLabel(i18n("
To reduce the network load, the LISa servers in one network
" "cooperate with each other. Therefore you have to enter the broadcast
" "address here. If you are connected to more than one network, choose
" "one of the broadcast addresses."),m_bcastPage); - info->setAlignment(AlignLeft|AlignVCenter|WordBreak); + info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak); TQWidget *dummy=new TQWidget(m_bcastPage); m_bcastPage->setStretchFactor(dummy,10); m_bcastPage->setSpacing(KDialog::spacingHint()); info=new TQLabel(i18n("If unsure, keep it as is."), m_bcastPage); - info->setAlignment(AlignRight|AlignVCenter); + info->tqsetAlignment(AlignRight|AlignVCenter); m_bcastPage->setSpacing(KDialog::spacingHint()); m_bcastPage->setMargin(KDialog::marginHint()); @@ -278,7 +278,7 @@ void SetupWizard::setupUpdateIntervalPage() { m_intervalPage=new TQVBox(this); TQLabel *info=new TQLabel(i18n("
Enter the interval after which LISa, if busy, will update its host list."),m_intervalPage); - info->setTextFormat(Qt::RichText); + info->setTextFormat(TQt::RichText); m_updatePeriod=new TQSpinBox(300,1800,10,m_intervalPage); m_updatePeriod->setSuffix(i18n(" sec")); @@ -287,14 +287,14 @@ void SetupWizard::setupUpdateIntervalPage() "up to 16 times the value you enter here, if nobody accesses the LISa server. " "So if you enter 300 sec = 5 min here, this does not mean that LISa will ping " "your whole network every 5 minutes. The interval will increase up to 16 x 5 min = 80 min."),m_intervalPage); - info->setAlignment(AlignLeft|AlignVCenter|WordBreak); + info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak); TQWidget *dummy=new TQWidget(m_intervalPage); m_intervalPage->setStretchFactor(dummy,10); m_intervalPage->setSpacing(KDialog::spacingHint()); m_intervalPage->setMargin(KDialog::marginHint()); info=new TQLabel(i18n("If unsure, keep it as is."), m_intervalPage); - info->setAlignment(AlignRight|AlignVCenter); - info->setTextFormat(Qt::RichText); + info->tqsetAlignment(AlignRight|AlignVCenter); + info->setTextFormat(TQt::RichText); setHelpEnabled( m_intervalPage, false ); } @@ -304,7 +304,7 @@ void SetupWizard::setupAdvancedSettingsPage() m_advancedPage=new TQVBox(this); TQLabel *info=new TQLabel(i18n("This page contains several settings you usually only
" "need if LISa doesn't find all hosts in your network."),m_advancedPage); - info->setTextFormat(Qt::RichText); + info->setTextFormat(TQt::RichText); m_deliverUnnamedHosts=new TQCheckBox(i18n("Re&port unnamed hosts"),m_advancedPage); info=new TQLabel(i18n("Should hosts for which LISa can\'t resolve the name be included in the host list?
"),m_advancedPage); @@ -318,7 +318,7 @@ void SetupWizard::setupAdvancedSettingsPage() hbox=new TQHBox(m_advancedPage); info=new TQLabel(i18n("Max. number of pings to send at once"),hbox); - info->setTextFormat(Qt::RichText); + info->setTextFormat(TQt::RichText); m_maxPingsAtOnce=new TQSpinBox(8,1024,5,hbox); info=new TQLabel(i18n("How many ping packets should LISa send at once?
" "If LISa doesn't find all hosts you could try to decrease this value.
"),m_advancedPage); @@ -328,7 +328,7 @@ void SetupWizard::setupAdvancedSettingsPage() hbox=new TQHBox(m_advancedPage); // hbox->setSpacing(10); // WTF? info=new TQLabel(i18n("Wait for replies after second scan"),hbox); - info->setTextFormat(Qt::RichText); + info->setTextFormat(TQt::RichText); m_secondWait=new TQSpinBox(0,1000,50,hbox); m_secondWait->setSuffix(i18n(" ms")); info=new TQLabel(i18n("If LISa doesn't find all hosts, enable this option."),m_advancedPage); @@ -338,7 +338,7 @@ void SetupWizard::setupAdvancedSettingsPage() //m_advancedPage->setMargin(KDialog::marginHint()); info=new TQLabel(i18n("If unsure, keep it as is."), m_advancedPage); - info->setAlignment(AlignRight|AlignVCenter); + info->tqsetAlignment(AlignRight|AlignVCenter); connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool))); setHelpEnabled( m_advancedPage, false ); @@ -356,7 +356,7 @@ void SetupWizard::setupFinalPage() "The config file will now be saved to /etc/lisarc.
" "To test the server, try lan:/ in Konqueror.

" "If you have problems or suggestions, visit http://lisa-home.sourceforge.net."),m_finalPage); - info->setTextFormat(Qt::RichText); + info->setTextFormat(TQt::RichText); TQWidget *dummy=new TQWidget(m_finalPage); m_finalPage->setStretchFactor(dummy,10); m_finalPage->setSpacing(KDialog::spacingHint()); @@ -398,7 +398,7 @@ void SetupWizard::next() m_nicListBox->clear(); for (MyNIC *nic=m_nics->first(); nic!=0; nic=m_nics->next()) { - TQString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";"; + TQString tmp=nic->name+": "+nic->addr+"/"+nic->nettqmask+";"; m_nicListBox->insertItem(tmp); } m_nicListBox->setSelected(0,true); @@ -462,7 +462,7 @@ void SetupWizard::showPage(TQWidget* page) text+=i18n("You can use the same syntax as on the previous page.
"); else text+=i18n("There are three ways to specify IP addresses:
" - "1. IP address/network mask, like 192.168.0.0/255.255.255.0;
" + "1. IP address/network tqmask, like 192.168.0.0/255.255.255.0;
" "2. continuous ranges, like 10.0.1.0-10.0.1.200;
" "3. single IP addresses, like 10.0.0.23;
" "You can also enter combinations of 1 to 3, separated by \";\",
" @@ -546,7 +546,7 @@ void SetupWizard::checkIPAddress(const TQString& addr) TQString address=addr.simplifyWhiteSpace(); TQRegExp regex("^\\d+\\.\\d+\\.\\d+\\.\\d+\\s*/\\s*\\d+\\.\\d+\\.\\d+\\.\\d+$"); setNextEnabled(m_noNicPage, (regex.search(address,0)!=-1)); -// setNextEnabled(m_noNicPage, (regex.find(address,0)!=-1)); +// setNextEnabled(m_noNicPage, (regex.tqfind(address,0)!=-1)); } void SetupWizard::applyLisaConfigInfo(LisaConfigInfo& lci) diff --git a/lanbrowsing/kcmlisa/setupwizard.h b/lanbrowsing/kcmlisa/setupwizard.h index 8ccd2a15..f571bd6e 100644 --- a/lanbrowsing/kcmlisa/setupwizard.h +++ b/lanbrowsing/kcmlisa/setupwizard.h @@ -40,11 +40,12 @@ #include -class SetupWizard:public QWizard +class SetupWizard:public TQWizard { Q_OBJECT + TQ_OBJECT public: - SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo); + SetupWizard(TQWidget* tqparent, LisaConfigInfo* configInfo); ~SetupWizard(); virtual void showPage(TQWidget* page); void clearAll(); diff --git a/lanbrowsing/kio_lan/kio_lan.cpp b/lanbrowsing/kio_lan/kio_lan.cpp index c1d79695..06eb0a18 100644 --- a/lanbrowsing/kio_lan/kio_lan.cpp +++ b/lanbrowsing/kio_lan/kio_lan.cpp @@ -187,7 +187,7 @@ int LANProtocol::lanReadDataFromServer() if ((bytesRead<0) || (receivedBytes<4)) { delete [] receiveBuffer; - error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(m_currentHost)); + error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").tqarg(m_currentHost)); return 0; } @@ -206,7 +206,7 @@ int LANProtocol::lanReadDataFromServer() if ((memchr(currentBuf,0,bytesLeft)==0) || (memchr(currentBuf,int('\n'),bytesLeft)==0)) { delete [] receiveBuffer; - error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").arg(m_currentHost)); + error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").tqarg(m_currentHost)); return 0; } kdDebug(7101)<<"LANProtocol::lanReadDataFromServer: processing "<=specs[i].address) && (ntohl(addressNBO)<=specs[i].mask)) + if ((ntohl(addressNBO)>=specs[i].address) && (ntohl(addressNBO)<=specs[i].tqmask)) { dcerr<<"isValid: range"<isInformed()) return 0; + if (!tqparentServer->isInformed()) return 0; //we fork now, so that writing to the client can't block the server process /* int pid=fork(); if (pid==-1) { - //parent + //tqparent dcerr<<"NetScanner::scan: error occurred"<writeDataToFD(fd(),0); + tqparentServer->writeDataToFD(fd(),0); close(); //exit(0); return 1; diff --git a/lanbrowsing/lisa/client.h b/lanbrowsing/lisa/client.h index efcf5f86..a82289c4 100644 --- a/lanbrowsing/lisa/client.h +++ b/lanbrowsing/lisa/client.h @@ -23,7 +23,7 @@ class NetManager; class Client { public: - Client(NetManager* parent, int socketFD, int closeOnDelete=1); + Client(NetManager* tqparent, int socketFD, int closeOnDelete=1); Client(); Client(const Client& c); ~Client(); @@ -34,7 +34,7 @@ class Client void close(); time_t age() {return time(0)-m_creationTime;}; private: - NetManager *parentServer; + NetManager *tqparentServer; int m_fd; //if something goes wrong close the connection after a timeout time_t m_creationTime; diff --git a/lanbrowsing/lisa/main.cpp b/lanbrowsing/lisa/main.cpp index 7de59389..e75fa0c1 100644 --- a/lanbrowsing/lisa/main.cpp +++ b/lanbrowsing/lisa/main.cpp @@ -225,11 +225,11 @@ int main(int argc, char** argv) } } - //fork and let the parent exit + //fork and let the tqparent exit pid_t pid=fork(); if (pid>0) { - //this is the parent + //this is the tqparent exit(0); } else if (pid<0) diff --git a/lanbrowsing/lisa/mystring.cpp b/lanbrowsing/lisa/mystring.cpp index 2b7af2d2..901c5db3 100644 --- a/lanbrowsing/lisa/mystring.cpp +++ b/lanbrowsing/lisa/mystring.cpp @@ -2,7 +2,7 @@ #include -//this one is taken from Qt/QCString +//this one is taken from TQt/TQCString MyString stripWhiteSpace(MyString str) { @@ -38,7 +38,7 @@ MyString stripWhiteSpace(MyString str) } //mainly taken from qcstring -int MyString::contains(char c) +int MyString::tqcontains(char c) { int count = 0; char const *d = c_str(); diff --git a/lanbrowsing/lisa/mystring.h b/lanbrowsing/lisa/mystring.h index 20d40e59..9e636e03 100644 --- a/lanbrowsing/lisa/mystring.h +++ b/lanbrowsing/lisa/mystring.h @@ -26,7 +26,7 @@ class MyString: public std::string else return (*this); }; - int contains(char c); + int tqcontains(char c); //char & operator[] (unsigned int i) {return ((string)(*this))[i];} //operator const char* () const {return c_str();} const char* data() const {return c_str();} @@ -35,7 +35,7 @@ class MyString: public std::string void simplifyWhiteSpace();*/ }; -//taken from Qt/QCString +//taken from TQt/TQCString MyString stripWhiteSpace(MyString str); #endif diff --git a/lanbrowsing/lisa/netmanager.cpp b/lanbrowsing/lisa/netmanager.cpp index e652ce97..43742564 100644 --- a/lanbrowsing/lisa/netmanager.cpp +++ b/lanbrowsing/lisa/netmanager.cpp @@ -142,11 +142,11 @@ void NetManager::configure(Config& config) MyString netAddressStr=tmp.left(tmp.find('/')); tmp=tmp.mid(tmp.find('/')+1); tmp=tmp.left(tmp.find(';')); - mdcerr<<"NetManager::readConfig: broadcastNet "<0) { - //this is the parent + //this is the tqparent exit(0); } else if (pid<0) -- cgit v1.2.1