diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /lanbrowsing | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
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
Diffstat (limited to 'lanbrowsing')
24 files changed, 174 insertions, 169 deletions
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 <kdebug.h> #include <kdialog.h> -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 <kdebug.h> -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 = "<<writeStuff.latin1()<<"\n"; tmp.close(); - TQString suCommand=TQString("cp '%1' '%2'; chmod 644 '%3'; rm -f '%4'").arg(m_tmpFilename).arg(m_configFilename).arg(m_configFilename).arg(m_tmpFilename); + TQString suCommand=TQString("cp '%1' '%2'; chmod 644 '%3'; rm -f '%4'").tqarg(m_tmpFilename).tqarg(m_configFilename).tqarg(m_configFilename).tqarg(m_tmpFilename); KProcess *proc = new KProcess(); connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(saveDone(KProcess *))); *proc<<"kdesu"<<"-c"<<suCommand; - KApplication::setOverrideCursor(Qt::waitCursor); + KApplication::setOverrideCursor(TQt::waitCursor); setEnabled(false); if ( !proc->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+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->netmask+";<br>"; + msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->nettqmask+";<br>"; } - KMessageBox::information(0,TQString("<html>%1</html>").arg(msg)); + KMessageBox::information(0,TQString("<html>%1</html>").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 <krestrictedline.h> #include <keditlistbox.h> -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+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->netmask+";<br>"; + msg+="<b>"+tmp->name+": </b>"+tmp->addr+"/"+tmp->nettqmask+";<br>"; } - KMessageBox::information(0,TQString("<html>%1</html>").arg(msg)); + KMessageBox::information(0,TQString("<html>%1</html>").tqarg(msg)); } - KMessageBox::information(0,TQString("<html>%1</html>").arg(i18n("The ResLISa daemon is now configured " + KMessageBox::information(0,TQString("<html>%1</html>").tqarg(i18n("The ResLISa daemon is now configured " "correctly, hopefully.<br>Make sure that the reslisa binary is installed <i>suid root</i>."))); 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 <tqlabel.h> -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 <netinet/in.h> #include <arpa/inet.h> -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,<br>" "whether or not they are samba servers.<br>" @@ -193,13 +193,13 @@ void SetupWizard::setupSearchPage() "Only samba/windows servers will respond.<br>" "This method is not very reliable.<br>" "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("<b>If unsure, keep it as is.</b>"),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.<br>" - "If you are part of a small network, e.g. with network mask 255.255.255.0<br>" - "use your IP address/network mask.<br>"),m_addressesPage); - info->setTextFormat(Qt::RichText); + "If you are part of a small network, e.g. with network tqmask 255.255.255.0<br>" + "use your IP address/network tqmask.<br>"),m_addressesPage); + info->setTextFormat(TQt::RichText); m_pingAddresses=new KRestrictedLine(m_addressesPage,"0123456789./;-"); info=new TQLabel(i18n("<br>There are four ways to specify address ranges:<br>" - "1. IP address/network mask, like <code>192.168.0.0/255.255.255.0;</code><br>" + "1. IP address/network tqmask, like <code>192.168.0.0/255.255.255.0;</code><br>" "2. single IP addresses, like <code>10.0.0.23;</code><br>" "3. continuous ranges, like <code>10.0.1.0-10.0.1.200;</code><br>" "4. ranges for each part of the address, like <code>10-10.1-5.1-25.1-3;</code><br>" "You can also enter combinations of 1 to 4, separated by \";\", like<br>" "<code>192.168.0.0/255.255.255.0;10.0.0.0;10.0.1.1-10.0.1.100;</code><br>"),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("<b>If unsure, keep it as is.</b>"), 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.<br>" "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.<br>" - "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("<b>If unsure, keep it as is.</b>"), 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("<br>Enter your IP address and network mask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage); - info->setAlignment(AlignLeft|AlignVCenter|WordBreak); + TQLabel *info=new TQLabel(i18n("<br>Enter your IP address and network tqmask here, like <code>192.168.0.1/255.255.255.0</code>"),m_bcastPage); + info->tqsetAlignment(AlignLeft|AlignVCenter|WordBreak); m_bcastAddress=new KRestrictedLine(m_bcastPage,"0123456789./"); info=new TQLabel(i18n("<br>To reduce the network load, the LISa servers in one network<br>" "cooperate with each other. Therefore you have to enter the broadcast<br>" "address here. If you are connected to more than one network, choose <br>" "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("<b>If unsure, keep it as is.</b>"), 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("<br>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("<b>If unsure, keep it as is.</b>"), 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<br>" "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?<br>"),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?<br>" "If LISa doesn't find all hosts you could try to decrease this value.<br>"),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("<b>If unsure, keep it as is.</b>"), 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 <code>/etc/lisarc</code>.<br>" "To test the server, try <code>lan:/</code> in Konqueror.<br><br>" "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.<br>"); else text+=i18n("There are three ways to specify IP addresses:<br>" - "1. IP address/network mask, like<code> 192.168.0.0/255.255.255.0;</code><br>" + "1. IP address/network tqmask, like<code> 192.168.0.0/255.255.255.0;</code><br>" "2. continuous ranges, like<code> 10.0.1.0-10.0.1.200;</code><br>" "3. single IP addresses, like<code> 10.0.0.23;</code><br>" "You can also enter combinations of 1 to 3, separated by \";\", <br>" @@ -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 <kcmodule.h> -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 "<<currentBuf; @@ -381,7 +381,7 @@ int LANProtocol::rlanReadDataFromServer() 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(socketname)); + error(ERR_INTERNAL_SERVER,i18n("Received unexpected data from %1").tqarg(socketname.data())); return 0; } kdDebug(7101)<<"RLANProtocol::readDataFromServer: processing "<<currentBuf; diff --git a/lanbrowsing/lisa/addressvalidator.cpp b/lanbrowsing/lisa/addressvalidator.cpp index aa292806..f4dab083 100644 --- a/lanbrowsing/lisa/addressvalidator.cpp +++ b/lanbrowsing/lisa/addressvalidator.cpp @@ -33,7 +33,7 @@ using namespace std; AddressValidator::AddressValidator(const MyString& addressSpecs) //this is 127.0.0.0 :localhostNet(htonl(0x7f000000)) -//with mask 255.255.255.0 +//with tqmask 255.255.255.0 ,localhostMask(htonl(0xffffff00)) { clearSpecs(); @@ -44,7 +44,7 @@ AddressValidator::AddressValidator(const MyString& addressSpecs) AddressValidator::AddressValidator() //this is 127.0.0.0 :localhostNet(htonl(0x7f000000)) - //with mask 255.255.255.0 + //with tqmask 255.255.255.0 ,localhostMask(htonl(0xffffff00)) { clearSpecs(); @@ -74,20 +74,20 @@ void AddressValidator::setValidAddresses(MyString addressSpecs) nextPart=addressSpecs.left(pos); addressSpecs=addressSpecs.mid(pos+1); dcerr<<"setValidAddresses: nextPart: "<<nextPart<<std::endl; - if ((nextPart.contains('.')==3) && (nextPart.contains('-')==0)) + if ((nextPart.tqcontains('.')==3) && (nextPart.tqcontains('-')==0)) { addSpec(EXACTADDR_SPEC,inet_addr(nextPart.data())); dcerr<<"setValidAddresses: exact addr: " <<std::ios::hex<<inet_addr(nextPart.data())<<std::ios::dec<<std::endl; } - else if ((nextPart.contains('-')==1) && (nextPart.contains('.')==6)) + else if ((nextPart.tqcontains('-')==1) && (nextPart.tqcontains('.')==6)) { int p2=nextPart.find("-"); MyString from=nextPart.left(p2); MyString to=nextPart.mid(p2+1); addSpec(RANGE_SPEC,ntohl(inet_addr(from.data())),ntohl(inet_addr(to.data()))); } - else if ((nextPart.contains('-')==4) && (nextPart.contains('.')==3)) + else if ((nextPart.tqcontains('-')==4) && (nextPart.tqcontains('.')==3)) { unsigned int i1=0; unsigned int i2=0; @@ -114,12 +114,12 @@ void AddressValidator::setValidAddresses(MyString addressSpecs) { pos=nextPart.find('/'); MyString netStr=nextPart.left(pos); - MyString maskStr=nextPart.mid(pos+1); - int mask=inet_addr(maskStr.data()); - int net= (inet_addr(netStr.data()) & mask); - dcerr<<"setValidAddresses: net/mask: " - <<std::ios::hex<<net<<"/"<<mask<<std::ios::dec<<std::endl; - addSpec(NETMASK_SPEC,net,mask); + MyString tqmaskStr=nextPart.mid(pos+1); + int tqmask=inet_addr(tqmaskStr.data()); + int net= (inet_addr(netStr.data()) & tqmask); + dcerr<<"setValidAddresses: net/tqmask: " + <<std::ios::hex<<net<<"/"<<tqmask<<std::ios::dec<<std::endl; + addSpec(NETMASK_SPEC,net,tqmask); } } } @@ -130,19 +130,19 @@ void AddressValidator::clearSpecs() for (int i=0; i<MAX_SPECS; i++) { specs[i].address=0; - specs[i].mask=0; + specs[i].tqmask=0; specs[i].typeOfSpec=NO_SPEC; } } -void AddressValidator::addSpec(int type, int address, int mask) +void AddressValidator::addSpec(int type, int address, int tqmask) { for (int i=0; i<MAX_SPECS; i++) { if (specs[i].typeOfSpec==NO_SPEC) { specs[i].address=address; - specs[i].mask=mask; + specs[i].tqmask=tqmask; specs[i].typeOfSpec=type; return; } @@ -155,7 +155,7 @@ int AddressValidator::isValid(int addressNBO) <<std::ios::hex<<addressNBO<<std::ios::dec<<std::endl; //localhost is always allowed dcerr<<"isValid() local net: "<< - std::ios::hex<<localhostNet<<" mask: "<<localhostMask<<" AND: "<<(addressNBO & + std::ios::hex<<localhostNet<<" tqmask: "<<localhostMask<<" AND: "<<(addressNBO & localhostMask)<<std::ios::dec<<std::endl; if ((addressNBO & localhostMask) == localhostNet) return 1; @@ -183,17 +183,17 @@ int AddressValidator::isValid(int addressNBO) else if (specs[i].typeOfSpec==NETMASK_SPEC) { dcerr<<"isValid: ANDing "<< - std::ios::hex<<(addressNBO & specs[i].mask)<<" "<< + std::ios::hex<<(addressNBO & specs[i].tqmask)<<" "<< specs[i].address<<std::ios::dec<<std::endl; - if ((addressNBO & specs[i].mask) == specs[i].address) + if ((addressNBO & specs[i].tqmask) == specs[i].address) { - dcerr<<"isValid: net/mask"<<std::endl; + dcerr<<"isValid: net/tqmask"<<std::endl; return 1; } } else if (specs[i].typeOfSpec==RANGE_SPEC) { - if ((ntohl(addressNBO)>=specs[i].address) && (ntohl(addressNBO)<=specs[i].mask)) + if ((ntohl(addressNBO)>=specs[i].address) && (ntohl(addressNBO)<=specs[i].tqmask)) { dcerr<<"isValid: range"<<std::endl; return 1; @@ -202,19 +202,19 @@ int AddressValidator::isValid(int addressNBO) else if (specs[i].typeOfSpec==MULTIRANGE_SPEC) { unsigned int addr=ntohl(addressNBO); - dcerr<<"isValid ntohl="<<hex<<addr<<" addr: "<<specs[i].address<<" ma: "<<specs[i].mask<<dec<<std::endl; - unsigned int mask=0x000000ff; + dcerr<<"isValid ntohl="<<hex<<addr<<" addr: "<<specs[i].address<<" ma: "<<specs[i].tqmask<<dec<<std::endl; + unsigned int tqmask=0x000000ff; int failure=0; for (int j=0; j<4; j++) { - dcerr<<"isValid "<<hex<<"mask="<<mask<<" addr="<<(addr&mask)<<" addr="<<(specs[i].address & mask)<<" ma="<<(specs[i].mask&mask)<<std::endl; - if (((addr & mask) < (specs[i].address & mask)) - || ((addr & mask) > (specs[i].mask & mask))) + dcerr<<"isValid "<<hex<<"tqmask="<<tqmask<<" addr="<<(addr&tqmask)<<" addr="<<(specs[i].address & tqmask)<<" ma="<<(specs[i].tqmask&tqmask)<<std::endl; + if (((addr & tqmask) < (specs[i].address & tqmask)) + || ((addr & tqmask) > (specs[i].tqmask & tqmask))) { failure=1; break; } - mask=mask<<8; + tqmask=tqmask<<8; } dcerr<<"isValid: multirange"<<std::endl; if (!failure) diff --git a/lanbrowsing/lisa/addressvalidator.h b/lanbrowsing/lisa/addressvalidator.h index 6f1c723e..c2c332ab 100644 --- a/lanbrowsing/lisa/addressvalidator.h +++ b/lanbrowsing/lisa/addressvalidator.h @@ -29,7 +29,7 @@ struct AddressSpec { int address; - int mask; + int tqmask; int typeOfSpec; }; @@ -48,7 +48,7 @@ class AddressValidator int localhostNet; int localhostMask; MyString allowedHosts; - void addSpec(int type, int address, int mask=0); + void addSpec(int type, int address, int tqmask=0); AddressSpec specs[MAX_SPECS]; }; diff --git a/lanbrowsing/lisa/client.cpp b/lanbrowsing/lisa/client.cpp index 21069a17..e26b2674 100644 --- a/lanbrowsing/lisa/client.cpp +++ b/lanbrowsing/lisa/client.cpp @@ -34,8 +34,8 @@ #define dcerr if (LISA_DEBUG==1) std::cerr<<"Client::" -Client::Client(NetManager* parent, int socketFD, int closeOnDelete) -:parentServer(parent) +Client::Client(NetManager* tqparent, int socketFD, int closeOnDelete) +:tqparentServer(tqparent) ,m_fd(socketFD) ,m_done(0) ,m_closeOnDelete(closeOnDelete) @@ -46,7 +46,7 @@ Client::Client(NetManager* parent, int socketFD, int closeOnDelete) } Client::Client() -:parentServer(0) +:tqparentServer(0) ,m_fd(-1) ,m_done(1) ,m_closeOnDelete(1) @@ -55,7 +55,7 @@ Client::Client() } Client::Client(const Client& c) -:parentServer(c.parentServer) +:tqparentServer(c.tqparentServer) ,m_fd(c.m_fd) ,m_creationTime(c.m_creationTime) ,m_done(c.m_done) @@ -74,24 +74,24 @@ int Client::tryToGetInfo() return 1; } dcerr<<"tryToGetInfo: calling data.getFile()"<<std::endl; - if (!parentServer->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"<<std::endl; return 1; } else if (pid!=0) { - //parent + //tqparent return 1; };*/ //child //this one does it all :-) dcerr<<"tryToGetInfo: sending data to client"<<std::endl; - parentServer->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 <ctype.h> -//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 "<<netAddressStr<<" with mask "<<tmp<<std::endl; + mdcerr<<"NetManager::readConfig: broadcastNet "<<netAddressStr<<" with tqmask "<<tmp<<std::endl; int netMask=inet_addr(tmp.c_str()); int netAddress=inet_addr(netAddressStr.c_str()); m_broadcastAddress= netAddress | (~netMask); - mdcerr<<"NetManager::readConfig: net "<<std::ios::hex<<netAddress<<" with mask "<<netMask<<" gives "<<m_broadcastAddress<<std::endl; + mdcerr<<"NetManager::readConfig: net "<<std::ios::hex<<netAddress<<" with tqmask "<<netMask<<" gives "<<m_broadcastAddress<<std::endl; //maybe this way we can avoid that all servers on the net send //their requests synchronously, since now the refreshtime isn't @@ -365,10 +365,10 @@ MyString NetManager::getConfigFileName() int length=strlen(buf); if (buf[length-1]=='\n') buf[length-1]='\0'; MyString kdeDirs(buf); - while (kdeDirs.contains(':')) + while (kdeDirs.tqcontains(':')) { - MyString nextDir=kdeDirs.left(kdeDirs.find(':')); - kdeDirs=kdeDirs.mid(kdeDirs.find(':')+1); + MyString nextDir=kdeDirs.left(kdeDirs.tqfind(':')); + kdeDirs=kdeDirs.mid(kdeDirs.tqfind(':')+1); nextDir=nextDir+tmpBase; mdcerr<<"trying to open "<<nextDir<<std::endl; if (fileReadable(nextDir)) @@ -602,7 +602,7 @@ void NetManager::scan() } else if (pid!=0) { - //parent + //tqparent ::close(fileDescr[1]); m_pipeFD=fileDescr[0]; m_childPid=pid; @@ -617,7 +617,7 @@ void NetManager::scan() doScan(); //in the child we don't have to call setServerServer() //since this opens the listening socket, what has to be done - //in the parent process + //in the tqparent process m_serverServer=1; } else @@ -629,7 +629,7 @@ void NetManager::scan() doScan(); //in the child we don't have to call setServerServer() //since this opens the listening socket, what has to be done - //in the parent process + //in the tqparent process m_serverServer=1; } else @@ -639,7 +639,7 @@ void NetManager::scan() m_serverServer=0; } } - mdcerr<<" NetScanner::scan: sending information to parent process"<<std::endl; + mdcerr<<" NetScanner::scan: sending information to tqparent process"<<std::endl; writeDataToFD(fileDescr[1],m_serverServer); mdcerr<<" NetScanner::scan: closed FD: "<<::close(fileDescr[1])<<std::endl; mdcerr<<" NetScanner::scan: exiting now"<<std::endl; diff --git a/lanbrowsing/lisa/netscanner.cpp b/lanbrowsing/lisa/netscanner.cpp index acf0515c..ac8f512d 100644 --- a/lanbrowsing/lisa/netscanner.cpp +++ b/lanbrowsing/lisa/netscanner.cpp @@ -187,17 +187,17 @@ struct in_addr NetScanner::getIPfromArray(unsigned int index) // mdcerr<<"NetScanner::getIPFromArray: -"<<tmp<<"-"<<std::endl; while (!tmp.isEmpty()) { - if (tmp.contains('/')) + if (tmp.tqcontains('/')) { - //mdcerr<<"net/mask combination detected"<<std::endl; + //mdcerr<<"net/tqmask combination detected"<<std::endl; MyString netStr(tmp.left(tmp.find("/"))); - MyString maskStr(tmp.mid(tmp.find("/")+1)); - unsigned int mask(IPAddress(maskStr).asInt()); - unsigned int net(IPAddress(netStr).asInt()&mask); - if ((~mask)<indexLeft) + MyString tqmaskStr(tmp.mid(tmp.find("/")+1)); + unsigned int tqmask(IPAddress(tqmaskStr).asInt()); + unsigned int net(IPAddress(netStr).asInt()&tqmask); + if ((~tqmask)<indexLeft) { - indexLeft=indexLeft-(~mask+1); - tmpIndex+=(~mask)+1; + indexLeft=indexLeft-(~tqmask+1); + tmpIndex+=(~tqmask)+1; //mdcerr<<"i: "<<tmpIndex<<" left: "<<indexLeft<<std::endl; } else @@ -207,7 +207,7 @@ struct in_addr NetScanner::getIPfromArray(unsigned int index) //return string2Struct(ipInt2String(net)); } } - else if (tmp.contains('-')==1) + else if (tmp.tqcontains('-')==1) { //mdcerr<<"single range detected"<<std::endl; MyString fromIPStr(tmp.left(tmp.find("-"))); @@ -233,7 +233,7 @@ struct in_addr NetScanner::getIPfromArray(unsigned int index) } } - else if (tmp.contains('-')==4) + else if (tmp.tqcontains('-')==4) { //mdcerr<<"multiple range detected"<<std::endl; int cp(tmp.find('-')); @@ -291,7 +291,7 @@ struct in_addr NetScanner::getIPfromArray(unsigned int index) } } //single IP address - else if (tmp.contains('.')==3) + else if (tmp.tqcontains('.')==3) { //mdcerr<<"single IP address detected"<<std::endl; //if (tmpIndex==index) return string2Struct(tmp); @@ -316,7 +316,7 @@ void NetScanner::resetIPRange() MyString NetScanner::getNextIPRange() { - if (tmpIPRange.contains(';')<1) return ""; + if (tmpIPRange.tqcontains(';')<1) return ""; int cp(tmpIPRange.find(';')); MyString tmp(tmpIPRange.left(cp)); tmpIPRange=tmpIPRange.mid(cp+1); diff --git a/lanbrowsing/lisa/strictmain.cpp b/lanbrowsing/lisa/strictmain.cpp index a948d6df..829c8f5d 100644 --- a/lanbrowsing/lisa/strictmain.cpp +++ b/lanbrowsing/lisa/strictmain.cpp @@ -203,11 +203,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) |