From e6077c30d14e9d662e8843c554db86c0d366d0b6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 6 Jun 2024 13:44:12 +0900 Subject: Rename str nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/networkprotocol-example.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'doc/html/networkprotocol-example.html') diff --git a/doc/html/networkprotocol-example.html b/doc/html/networkprotocol-example.html index 926f4f3c1..b511608dd 100644 --- a/doc/html/networkprotocol-example.html +++ b/doc/html/networkprotocol-example.html @@ -107,7 +107,7 @@ protected slots: #include <ntqurlinfo.h> #include <stdlib.h> #include <ntqurloperator.h> -#include <ntqstringlist.h> +#include <tqstringlist.h> #include <ntqregexp.h> Nntp::Nntp() @@ -137,21 +137,21 @@ Nntp::~Nntp() void Nntp::operationListChildren( TQNetworkOperation * ) { // create a command - TQString path = url()->path(), cmd; - if ( path.isEmpty() || path == "/" ) { + TQString path = url()->path(), cmd; + if ( path.isEmpty() || path == "/" ) { // if the path is empty or we are in the root dir, // we want to read the list of available newsgroups cmd = "list newsgroups\r\n"; } else if ( url()->isDir() ) { // if the path is a directory (in our case a news group) // we want to list the articles of this group - path = path.replace( "/", "" ); + path = path.replace( "/", "" ); cmd = "listgroup " + path + "\r\n"; } else return; // write the command to the socket - commandSocket->writeBlock( cmd.latin1(), cmd.length() ); + commandSocket->writeBlock( cmd.latin1(), cmd.length() ); readGroups = TRUE; } @@ -160,17 +160,17 @@ Nntp::~Nntp() // get the dirPath of the URL (this is our news group) // and the filename (which is the article we want to read) TQUrl u( op->arg( 0 ) ); - TQString dirPath = u.dirPath(), file = u.fileName(); - dirPath = dirPath.replace( "/", "" ); + TQString dirPath = u.dirPath(), file = u.fileName(); + dirPath = dirPath.replace( "/", "" ); // go to the group in which the article is - TQString cmd; + TQString cmd; cmd = "group " + dirPath + "\r\n"; - commandSocket->writeBlock( cmd.latin1(), cmd.length() ); + commandSocket->writeBlock( cmd.latin1(), cmd.length() ); // read the head of the article cmd = "article " + file + "\r\n"; - commandSocket->writeBlock( cmd.latin1(), cmd.length() ); + commandSocket->writeBlock( cmd.latin1(), cmd.length() ); readArticle = TRUE; } @@ -271,7 +271,7 @@ void Nntp::parseGroups() // read one line after the other while ( commandSocket->canReadLine() ) { - TQString s = commandSocket->readLine(); + TQString s = commandSocket->readLine(); // if the line starts with a dot, all groups or articles have been listed, // so we finished processing the listChildren() command @@ -294,11 +294,11 @@ void Nntp::parseGroups() // parse the line and create a TQUrlInfo object // which describes the child (group or article) bool tab = s.find( '\t' ) != -1; - TQString group = s.mid( 0, s.find( tab ? '\t' : ' ' ) ); + TQString group = s.mid( 0, s.find( tab ? '\t' : ' ' ) ); TQUrlInfo inf; inf.setName( group ); - TQString path = url()->path(); - inf.setDir( path.isEmpty() || path == "/" ); + TQString path = url()->path(); + inf.setDir( path.isEmpty() || path == "/" ); inf.setSymLink( FALSE ); inf.setFile( !inf.isDir() ); inf.setWritable( FALSE ); @@ -317,7 +317,7 @@ void Nntp::parseArticle() // read an article one line after the other while ( commandSocket->canReadLine() ) { - TQString s = commandSocket->readLine(); + TQString s = commandSocket->readLine(); // if the line starts with a dot, we finished reading something if ( s[ 0 ] == '.' ) { @@ -331,7 +331,7 @@ void Nntp::parseArticle() s.remove( s.length() - 1, 1 ); // emit the new data of the article which we read - emit data( TQCString( s.ascii() ), operationInProgress() ); + emit data( TQCString( s.ascii() ), operationInProgress() ); } } @@ -341,7 +341,7 @@ void Nntp::error( int code ) code == TQSocket::ErrConnectionRefused ) { // this signal is called if connecting to the server failed if ( operationInProgress() ) { - TQString msg = tr( "Host not found or couldn't connect to: \n" + url()->host() ); + TQString msg = tr( "Host not found or couldn't connect to: \n" + url()->host() ); operationInProgress()->setState( StFailed ); operationInProgress()->setProtocolDetail( msg ); operationInProgress()->setErrorCode( (int)ErrHostNotFound ); -- cgit v1.2.3