[nvemftp-commit] nvemftp/lib/nnet nhostinfo.cpp,1.14,1.15
Status: Beta
Brought to you by:
ndiin
|
From: <nd...@us...> - 2003-11-23 05:28:37
|
Update of /cvsroot/nvemftp/nvemftp/lib/nnet
In directory sc8-pr-cvs1:/tmp/cvs-serv3666/lib/nnet
Modified Files:
nhostinfo.cpp
Log Message:
Use a temporary variable before doing a .replace()
Index: nhostinfo.cpp
===================================================================
RCS file: /cvsroot/nvemftp/nvemftp/lib/nnet/nhostinfo.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- nhostinfo.cpp 23 Nov 2003 05:09:21 -0000 1.14
+++ nhostinfo.cpp 23 Nov 2003 05:28:34 -0000 1.15
@@ -225,13 +225,13 @@
QUrl url(orig);
protocol = url.protocol();
host = url.host();
-mhost += host;
+ mhost += host;
port = url.port();
-mport += port;
+ mport += port;
user = url.user();
-muser += user;
+ muser += user;
pass = url.password();
-mpass += pass;
+ mpass += pass;
std::cout << "Orig: '" << orig << "'\n"
<< "URI: " << url.toString() << "\n"
<< "User: " << url.user() << "\n"
@@ -342,7 +342,8 @@
// Scan for port values in host:port notation.
for (uint i = 0; i < mhost.count(); i++) {
- rg.setPattern(mhost[i].replace(".", "\\.") + ":(\\d+)[^0-9A-Za-z]");
+ QString thost = mhost[i];
+ rg.setPattern(thost.replace(".", "\\.") + ":(\\d+)[^0-9A-Za-z]");
pos = 0;
while ((pos = rg.search(textDump, pos)) != -1) {
int posport = rg.cap(1).toInt();
|