summaryrefslogtreecommitdiffstats
path: root/lanbrowsing/lisa/netscanner.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /lanbrowsing/lisa/netscanner.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-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/lisa/netscanner.cpp')
-rw-r--r--lanbrowsing/lisa/netscanner.cpp24
1 files changed, 12 insertions, 12 deletions
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);