summaryrefslogtreecommitdiffstats
path: root/kioslave/man
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
commit495d08bc2db58ee7fc4ea55a7158f2f61b82fc56 (patch)
treedaabcb652c07b9a17cad88ca50b63a2d91ead4a3 /kioslave/man
parent50001f1757f97510e80cb1990e2f2d5b00144c2a (diff)
downloadtdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.tar.gz
tdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1211357 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/man')
-rw-r--r--kioslave/man/kio_man.cpp38
-rw-r--r--kioslave/man/kmanpart.cpp4
-rw-r--r--kioslave/man/kmanpart.h2
-rw-r--r--kioslave/man/man2html.cpp70
4 files changed, 57 insertions, 57 deletions
diff --git a/kioslave/man/kio_man.cpp b/kioslave/man/kio_man.cpp
index 013a15248..daa54dd33 100644
--- a/kioslave/man/kio_man.cpp
+++ b/kioslave/man/kio_man.cpp
@@ -238,14 +238,14 @@ TQStringList MANProtocol::manDirectories()
&& S_ISDIR( sbuf.st_mode ) )
{
const TQString p = TQDir(dir).canonicalPath();
- if (!man_dirs.contains(p)) man_dirs += p;
+ if (!man_dirs.tqcontains(p)) man_dirs += p;
}
}
}
// Untranslated pages in "<mandir>"
const TQString p = TQDir(*it_dir).canonicalPath();
- if (!man_dirs.contains(p)) man_dirs += p;
+ if (!man_dirs.tqcontains(p)) man_dirs += p;
}
return man_dirs;
}
@@ -331,7 +331,7 @@ TQStringList MANProtocol::findPages(const TQString &_section,
if (sect.lower()==it_real) it_real = sect;
// Only add sect if not already contained, avoid duplicates
- if (!sect_list.contains(sect) && _section.isEmpty()) {
+ if (!sect_list.tqcontains(sect) && _section.isEmpty()) {
kdDebug() << "another section " << sect << endl;
sect_list += sect;
}
@@ -425,11 +425,11 @@ static TQString text2html(const TQString& txt)
{
TQString reply = txt;
- reply = reply.replace('&', "&amp;");
- reply = reply.replace('<', "&lt;");
- reply = reply.replace('>', "&gt;");
- reply = reply.replace('"', "&dquot;");
- reply = reply.replace('\'', "&quot;");
+ reply = reply.tqreplace('&', "&amp;");
+ reply = reply.tqreplace('<', "&lt;");
+ reply = reply.tqreplace('>', "&gt;");
+ reply = reply.tqreplace('"', "&dquot;");
+ reply = reply.tqreplace('\'', "&quot;");
return reply;
}
@@ -534,7 +534,7 @@ char *MANProtocol::readManPage(const char *_filename)
* If the path name constains the string sman, assume that it's SGML and
* convert it to roff format (used on Solaris). */
//TQString file_mimetype = KMimeType::findByPath(TQString(filename), 0, false)->name();
- if (filename.contains("sman", false)) //file_mimetype == "text/html" || )
+ if (filename.tqcontains("sman", false)) //file_mimetype == "text/html" || )
{
myStdStream =TQString::null;
KProcess proc;
@@ -971,7 +971,7 @@ void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_c
{
// What is the default mapping?
catmandir = mandir;
- catmandir.replace("/usr/share/","/var/cache/");
+ catmandir.tqreplace("/usr/share/","/var/cache/");
if ( constr_catmanpath.findIndex( catmandir ) == -1 )
constr_catmanpath += catmandir;
}
@@ -1001,7 +1001,7 @@ void MANProtocol::checkManPaths()
if ( manpath_env.isEmpty()
|| manpath_env[0] == ':'
|| manpath_env[manpath_env.length()-1] == ':'
- || manpath_env.contains( "::" ) )
+ || manpath_env.tqcontains( "::" ) )
{
construct_path = true; // need to read config file
}
@@ -1027,7 +1027,7 @@ void MANProtocol::checkManPaths()
//
// The merging syntax with ":" and "::" in $MANPATH will be
// satisfied if any empty string in path_list_env (there
- // should be 1 or 0) is replaced by the constructed path.
+ // should be 1 or 0) is tqreplaced by the constructed path.
const TQStringList path_list_env = TQStringList::split( ':', manpath_env , true );
@@ -1253,7 +1253,7 @@ void MANProtocol::showIndex(const TQString& section)
{
os << "<tr><td><a href=\"man:" << it.data() << "\">\n"
<< it.key() << "</a></td><td>&nbsp;</td><td> "
- << (indexmap.contains(it.key()) ? indexmap[it.key()] : "" )
+ << (indexmap.tqcontains(it.key()) ? indexmap[it.key()] : "" )
<< "</td></tr>" << endl;
}
@@ -1384,12 +1384,12 @@ void MANProtocol::showIndex(const TQString& section)
{
struct man_index_t *manindex = indexlist[i];
- // qstrncmp():
+ // tqstrncmp():
// "last_man" has already a \0 string ending, but
// "manindex->manpage_begin" has not,
// so do compare at most "manindex->manpage_len" of the strings.
if (last_index->manpage_len == manindex->manpage_len &&
- !qstrncmp(last_index->manpage_begin,
+ !tqstrncmp(last_index->manpage_begin,
manindex->manpage_begin,
manindex->manpage_len)
)
@@ -1415,7 +1415,7 @@ void MANProtocol::showIndex(const TQString& section)
((char *)manindex->manpage_begin)[manindex->manpage_len] = '\0';
os << manindex->manpage_begin
<< "</a></td><td>&nbsp;</td><td> "
- << (indexmap.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" )
+ << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" )
<< "</td></tr>" << endl;
last_index = manindex;
}
@@ -1438,12 +1438,12 @@ void MANProtocol::showIndex(const TQString& section)
{
struct man_index_t *manindex = mit.current();
- // qstrncmp():
+ // tqstrncmp():
// "last_man" has already a \0 string ending, but
// "manindex->manpage_begin" has not,
// so do compare at most "manindex->manpage_len" of the strings.
if (last_index->manpage_len == manindex->manpage_len &&
- !qstrncmp(last_index->manpage_begin,
+ !tqstrncmp(last_index->manpage_begin,
manindex->manpage_begin,
manindex->manpage_len)
)
@@ -1457,7 +1457,7 @@ void MANProtocol::showIndex(const TQString& section)
manindex->manpage_begin[manindex->manpage_len] = '\0';
os << manindex->manpage_begin
<< "</a></td><td>&nbsp;</td><td> "
- << (indexmap.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" )
+ << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" )
<< "</td></tr>" << endl;
last_index = manindex;
}
diff --git a/kioslave/man/kmanpart.cpp b/kioslave/man/kmanpart.cpp
index b52085596..e48754a55 100644
--- a/kioslave/man/kmanpart.cpp
+++ b/kioslave/man/kmanpart.cpp
@@ -50,10 +50,10 @@ KManPartFactory::~KManPartFactory()
delete s_about;
}
-KParts::Part* KManPartFactory::createPartObject( TQWidget * parentWidget, const char* /*widgetName*/, TQObject *,
+KParts::Part* KManPartFactory::createPartObject( TQWidget * tqparentWidget, const char* /*widgetName*/, TQObject *,
const char* name, const char* /*className*/,const TQStringList & )
{
- KManPart* part = new KManPart(parentWidget, name );
+ KManPart* part = new KManPart(tqparentWidget, name );
return part;
}
diff --git a/kioslave/man/kmanpart.h b/kioslave/man/kmanpart.h
index f2d9e3891..92d51e18b 100644
--- a/kioslave/man/kmanpart.h
+++ b/kioslave/man/kmanpart.h
@@ -44,7 +44,7 @@ class KManPartFactory: public KParts::Factory
KManPartFactory( TQObject * parent = 0, const char * name = 0 );
virtual ~KManPartFactory();
- virtual KParts::Part* createPartObject( TQWidget * parentWidget, const char * widgetName ,
+ virtual KParts::Part* createPartObject( TQWidget * tqparentWidget, const char * widgetName ,
TQObject* parent, const char* name, const char * classname,
const TQStringList &args);
diff --git a/kioslave/man/man2html.cpp b/kioslave/man/man2html.cpp
index 089ba239b..d9e3b5fe9 100644
--- a/kioslave/man/man2html.cpp
+++ b/kioslave/man/man2html.cpp
@@ -18,7 +18,7 @@
// End of verbatim comment
-// kate: space-indent on; indent-width 4; replace-tabs on;
+// kate: space-indent on; indent-width 4; tqreplace-tabs on;
/*
* man2html-linux-1.0/1.1
@@ -49,7 +49,7 @@
** every directory should start and end with the '/' and that the first
** directory should be "/" to allow a full path as an argument.
**
-** The program first check if PATH_INFO contains some information.
+** The program first check if PATH_INFO tqcontains some information.
** If it does (t.i. man2html/some/thing is used), the program will look
** for a manpage called PATH_INFO in the manpath.
**
@@ -58,7 +58,7 @@
**
** name name of manpage (csh, printf, xv, troff)
** section the section (1 2 3 4 5 6 7 8 9 n l 1v ...)
-** -M path an extra directory to look for manpages (replaces "/")
+** -M path an extra directory to look for manpages (tqreplaces "/")
**
** If man2html finds multiple manpages that satisfy the options, an index
** is displayed and the user can make a choice. If only one page is
@@ -332,7 +332,7 @@ static void InitNumberDefinitions( void )
{
// As the date number registers are more for end-users, better choose local time.
// Groff seems to support Gregorian dates only
- TQDate today( TQDate::currentDate( Qt::LocalTime ) );
+ TQDate today( TQDate::tqcurrentDate( Qt::LocalTime ) );
s_numberDefinitionMap.insert( "year", today.year() ); // Y2K-correct year
s_numberDefinitionMap.insert( "yr", today.year() - 1900 ); // Y2K-incorrect year
s_numberDefinitionMap.insert( "mo", today.month() );
@@ -882,7 +882,7 @@ static void add_links(char *c)
if (g-7>=c && g[-1]==':')
{
// We have perhaps an email address starting with mailto:
- if (!qstrncmp("mailto:",g-7,7))
+ if (!tqstrncmp("mailto:",g-7,7))
g-=7;
}
h=f+1;
@@ -1958,13 +1958,13 @@ static char *scan_expression(char *c, int *result);
static char *scan_format(char *c, TABLEROW **result, int *maxcol)
{
- TABLEROW *layout, *currow;
+ TABLEROW *tqlayout, *currow;
TABLEITEM *curfield;
int i,j;
if (*result) {
clear_table(*result);
}
- layout= currow=new TABLEROW();
+ tqlayout= currow=new TABLEROW();
curfield=new TABLEITEM(currow);
while (*c && *c!='.') {
switch (*c) {
@@ -2029,13 +2029,13 @@ static char *scan_format(char *c, TABLEROW **result, int *maxcol)
}
if (*c=='.') while (*c++!='\n');
*maxcol=0;
- currow=layout;
+ currow=tqlayout;
while (currow) {
i=currow->length();
if (i>*maxcol) *maxcol=i;
currow=currow->next;
}
- *result=layout;
+ *result=tqlayout;
return c;
}
@@ -2066,7 +2066,7 @@ static char *scan_table(char *c)
TQCString oldfont;
int oldsize,oldfillout;
char itemsep='\t';
- TABLEROW *layout=NULL, *currow;
+ TABLEROW *tqlayout=NULL, *currow;
int curfield = -1;
while (*c++!='\n');
h=c;
@@ -2085,7 +2085,7 @@ static char *scan_table(char *c)
/* scan table options */
while (c<h) {
while (isspace(*c)) c++;
- for (i=0; tableopt[i] && qstrncmp(tableopt[i],c,tableoptl[i]);i++);
+ for (i=0; tableopt[i] && tqstrncmp(tableopt[i],c,tableoptl[i]);i++);
c=c+tableoptl[i];
switch (i) {
case 0: center=1; break;
@@ -2104,10 +2104,10 @@ static char *scan_table(char *c)
}
c=h+1;
}
- /* scan layout */
- c=scan_format(c,&layout, &maxcol);
-// currow=layout;
- currow=next_row(layout);
+ /* scan tqlayout */
+ c=scan_format(c,&tqlayout, &maxcol);
+// currow=tqlayout;
+ currow=next_row(tqlayout);
curfield=0;
i=0;
while (!finished && *c) {
@@ -2121,7 +2121,7 @@ static char *scan_table(char *c)
currow->prev->next->prev=currow->prev;
currow->prev=currow->prev->next;
} else {
- currow->prev=layout=new TABLEROW();
+ currow->prev=tqlayout=new TABLEROW();
currow->prev->prev=NULL;
currow->prev->next=currow;
}
@@ -2216,7 +2216,7 @@ static char *scan_table(char *c)
}
}
/* calculate colspan and rowspan */
- currow=layout;
+ currow=tqlayout;
while (currow->next) currow=currow->next;
while (currow) {
int ti = 0, ti1 = 0, ti2 = -1;
@@ -2260,7 +2260,7 @@ static char *scan_table(char *c)
if (expand) out_html(" WIDTH=\"100%\"");
}
out_html(">\n");
- currow=layout;
+ currow=tqlayout;
while (currow) {
j=0;
out_html("<TR VALIGN=top>");
@@ -2318,7 +2318,7 @@ static char *scan_table(char *c)
currow=currow->next;
}
- clear_table(layout);
+ clear_table(tqlayout);
if (box && !border) out_html("</TABLE>");
out_html("</TABLE>");
@@ -2360,14 +2360,14 @@ static char *scan_expression( char *c, int *result, const unsigned int numLoop )
}
c++;
h=c;
- while (*c!= sep && (!tcmp || qstrncmp(c,tcmp,4))) c++;
+ while (*c!= sep && (!tcmp || tqstrncmp(c,tcmp,4))) c++;
*c='\n';
scan_troff(h, 1, &st1);
*c=sep;
if (tcmp) c=c+3;
c++;
h=c;
- while (*c!=sep && (!tcmp || qstrncmp(c,tcmp,4))) c++;
+ while (*c!=sep && (!tcmp || tqstrncmp(c,tcmp,4))) c++;
*c='\n';
scan_troff(h,1,&st2);
*c=sep;
@@ -3032,7 +3032,7 @@ static int get_request(char *req, int len)
"%T", "An", "Aq", "Bq", "Qq", "UR", "UE", "UN", "troff", "nroff", "als",
"rr", "rnn", "aln", "shift", "while", "do", "Dx", 0 };
int r = 0;
- while (requests[r] && qstrncmp(req, requests[r], len)) r++;
+ while (requests[r] && tqstrncmp(req, requests[r], len)) r++;
return requests[r] ? r : REQ_UNKNOWN;
}
@@ -3237,7 +3237,7 @@ static char *scan_request(char *c)
while (*c && *c!='\n') c++;
c++;
h=c;
- while (*c && qstrncmp(c,".di",3)) while (*c && *c++!='\n');
+ while (*c && tqstrncmp(c,".di",3)) while (*c && *c++!='\n');
*c='\0';
char* result=0;
scan_troff(h,0,&result);
@@ -3358,7 +3358,7 @@ static char *scan_request(char *c)
{
char *line=NULL;
c=scan_troff(c,1, &line);
- if (line && qstrncmp(line, "<BR>", 4))
+ if (line && tqstrncmp(line, "<BR>", 4))
{
out_html(line);
out_html("<BR>\n");
@@ -3489,7 +3489,7 @@ static char *scan_request(char *c)
while (*c && *c!='\n') c++,i++;
}
c++;
- while (*c && qstrncmp(c,endwith,i)) while (*c++!='\n');
+ while (*c && tqstrncmp(c,endwith,i)) while (*c++!='\n');
while (*c && *c++!='\n');
break;
}
@@ -4015,7 +4015,7 @@ static char *scan_request(char *c)
out_html("\n<H3>");
else
out_html("\n<H2>");
- mandoc_synopsis = qstrncmp(c, "SYNOPSIS", 8) == 0;
+ mandoc_synopsis = tqstrncmp(c, "SYNOPSIS", 8) == 0;
c = mandoc_command ? scan_troff_mandoc(c,1,NULL) : scan_troff(c,1,NULL);
if (mode)
out_html("</H3>\n");
@@ -4064,8 +4064,8 @@ static char *scan_request(char *c)
{
if (wordlist[i][0] == '\007')
wordlist[i]++;
- if (wordlist[i][qstrlen(wordlist[i])-1] == '\007')
- wordlist[i][qstrlen(wordlist[i])-1] = 0;
+ if (wordlist[i][tqstrlen(wordlist[i])-1] == '\007')
+ wordlist[i][tqstrlen(wordlist[i])-1] = 0;
}
output_possible=true;
out_html( DOCTYPE"<HTML>\n<HEAD>\n");
@@ -4147,7 +4147,7 @@ static char *scan_request(char *c)
out_html(set_font("I"));
if (words>1) wordlist[1][-1]='\0';
const char *c2=lookup_abbrev(wordlist[0]);
- curpos+=qstrlen(c2);
+ curpos+=tqstrlen(c2);
out_html(c2);
out_html(set_font("R"));
if (words>1)
@@ -4293,8 +4293,8 @@ static char *scan_request(char *c)
}
c = next_line;
sl=c;
- const int length=qstrlen(endmacro);
- while (*c && qstrncmp(c,endmacro,length))
+ const int length=tqstrlen(endmacro);
+ while (*c && tqstrncmp(c,endmacro,length))
c=skip_till_newline(c);
TQCString macro;
@@ -4401,7 +4401,7 @@ static char *scan_request(char *c)
case REQ_It: // mdoc(7) "list ITem"
{
c=c+j;
- if (qstrncmp(c, "Xo", 2) == 0 && isspace(*(c+2)))
+ if (tqstrncmp(c, "Xo", 2) == 0 && isspace(*(c+2)))
c = skip_till_newline(c);
if (dl_set[itemdepth] & BL_DESC_LIST)
{
@@ -5233,7 +5233,7 @@ static char *scan_request(char *c)
}
case REQ_do: // groff(7) "DO command"
{
- // HACK: we just replace do by a \n and a .
+ // HACK: we just tqreplace do by a \n and a .
*c = '\n';
c++;
*c = '.';
@@ -5303,7 +5303,7 @@ static char *scan_troff(char *c, bool san, char **result)
if (result) {
if (*result) {
buffer=*result;
- buffpos=qstrlen(buffer);
+ buffpos=tqstrlen(buffer);
buffmax=buffpos;
} else {
buffer = stralloc(LARGE_STR_MAX);
@@ -5528,7 +5528,7 @@ void scan_man_page(const char *man_page)
s_dollarZero = ""; // No macro called yet!
output_possible = false;
- int strLength = qstrlen(man_page);
+ int strLength = tqstrlen(man_page);
char *buf = new char[strLength + 2];
qstrcpy(buf+1, man_page);
buf[0] = '\n';