diff options
Diffstat (limited to 'kfile-plugins')
-rw-r--r-- | kfile-plugins/cert/kfile_cert.cpp | 8 | ||||
-rw-r--r-- | kfile-plugins/cert/kfile_cert.h | 3 | ||||
-rw-r--r-- | kfile-plugins/desktop/kfile_desktop.cpp | 4 | ||||
-rw-r--r-- | kfile-plugins/desktop/kfile_desktop.h | 3 | ||||
-rw-r--r-- | kfile-plugins/folder/kfile_folder.cpp | 4 | ||||
-rw-r--r-- | kfile-plugins/folder/kfile_folder.h | 3 | ||||
-rw-r--r-- | kfile-plugins/html/kfile_html.cpp | 10 | ||||
-rw-r--r-- | kfile-plugins/html/kfile_html.h | 3 | ||||
-rw-r--r-- | kfile-plugins/lnk/kfile_lnk.cpp | 8 | ||||
-rw-r--r-- | kfile-plugins/lnk/kfile_lnk.h | 3 | ||||
-rw-r--r-- | kfile-plugins/lnk/lnkforward.cpp | 2 | ||||
-rw-r--r-- | kfile-plugins/lnk/lnkforward.h | 1 | ||||
-rw-r--r-- | kfile-plugins/lnk/read_lnk.cpp | 36 | ||||
-rw-r--r-- | kfile-plugins/lnk/read_lnk.h | 2 | ||||
-rw-r--r-- | kfile-plugins/mhtml/kfile_mhtml.cpp | 32 | ||||
-rw-r--r-- | kfile-plugins/mhtml/kfile_mhtml.h | 3 | ||||
-rw-r--r-- | kfile-plugins/txt/kfile_txt.cpp | 4 | ||||
-rw-r--r-- | kfile-plugins/txt/kfile_txt.h | 3 |
18 files changed, 70 insertions, 62 deletions
diff --git a/kfile-plugins/cert/kfile_cert.cpp b/kfile-plugins/cert/kfile_cert.cpp index 8a711ba..4175240 100644 --- a/kfile-plugins/cert/kfile_cert.cpp +++ b/kfile-plugins/cert/kfile_cert.cpp @@ -39,8 +39,8 @@ typedef KGenericFactory<CertPlugin> CertFactory; K_EXPORT_COMPONENT_FACTORY(kfile_cert, CertFactory("kfile-cert")) -CertPlugin::CertPlugin(TQObject *parent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) +CertPlugin::CertPlugin(TQObject *tqparent, const char *name, const TQStringList &args) + : KFilePlugin(tqparent, name, args) { //add the mimetype here - example: //KFileMimeTypeInfo* info = addMimeTypeInfo( "text/html" ); @@ -110,10 +110,10 @@ static KSSLCertificate *readCertFromFile(const TQString &path) KOSSL::self()->ERR_clear_error(); const char *begin_line = "-----BEGIN CERTIFICATE-----\n"; const char *end_line = "\n-----END CERTIFICATE-----"; - int begin_pos = file_string.find(begin_line); + int begin_pos = file_string.tqfind(begin_line); if (begin_pos >= 0) { begin_pos += strlen(begin_line); - int end_pos = file_string.find(end_line, begin_pos); + int end_pos = file_string.tqfind(end_line, begin_pos); if (end_pos >= 0) { // read the data between begin and end lines TQCString body = file_string.mid(begin_pos, end_pos - begin_pos); diff --git a/kfile-plugins/cert/kfile_cert.h b/kfile-plugins/cert/kfile_cert.h index 30607eb..2991674 100644 --- a/kfile-plugins/cert/kfile_cert.h +++ b/kfile-plugins/cert/kfile_cert.h @@ -31,10 +31,11 @@ class TQString; class CertPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT private: void appendDNItems(KFileMetaInfoGroup &group, const TQString &DN); public: - CertPlugin(TQObject *parent, const char *name, const TQStringList& args); + CertPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/desktop/kfile_desktop.cpp b/kfile-plugins/desktop/kfile_desktop.cpp index 5c56d9e..5d2c9cc 100644 --- a/kfile-plugins/desktop/kfile_desktop.cpp +++ b/kfile-plugins/desktop/kfile_desktop.cpp @@ -30,9 +30,9 @@ typedef KGenericFactory<KDotDesktopPlugin> DotDesktopFactory; K_EXPORT_COMPONENT_FACTORY(kfile_desktop, DotDesktopFactory("kfile_desktop")) -KDotDesktopPlugin::KDotDesktopPlugin(TQObject *parent, const char *name, +KDotDesktopPlugin::KDotDesktopPlugin(TQObject *tqparent, const char *name, const TQStringList &preferredItems) - : KFilePlugin(parent, name, preferredItems) + : KFilePlugin(tqparent, name, preferredItems) { kdDebug(7034) << ".desktop plugin\n"; diff --git a/kfile-plugins/desktop/kfile_desktop.h b/kfile-plugins/desktop/kfile_desktop.h index 7de277b..f4d6b25 100644 --- a/kfile-plugins/desktop/kfile_desktop.h +++ b/kfile-plugins/desktop/kfile_desktop.h @@ -28,9 +28,10 @@ class TQStringList; class KDotDesktopPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KDotDesktopPlugin( TQObject *parent, const char *name, + KDotDesktopPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo ( KFileMetaInfo& info, uint what ); diff --git a/kfile-plugins/folder/kfile_folder.cpp b/kfile-plugins/folder/kfile_folder.cpp index fe4ea9a..8b08084 100644 --- a/kfile-plugins/folder/kfile_folder.cpp +++ b/kfile-plugins/folder/kfile_folder.cpp @@ -30,10 +30,10 @@ typedef KGenericFactory<KFolderPlugin> KFolderFactory; K_EXPORT_COMPONENT_FACTORY(kfile_folder, KFolderFactory( "kfile_folder" )) -KFolderPlugin::KFolderPlugin(TQObject *parent, const char *name, +KFolderPlugin::KFolderPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "inode/directory" ); diff --git a/kfile-plugins/folder/kfile_folder.h b/kfile-plugins/folder/kfile_folder.h index 37487e4..ff3f241 100644 --- a/kfile-plugins/folder/kfile_folder.h +++ b/kfile-plugins/folder/kfile_folder.h @@ -27,9 +27,10 @@ class TQStringList; class KFolderPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KFolderPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KFolderPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/html/kfile_html.cpp b/kfile-plugins/html/kfile_html.cpp index 5adddfc..d49d184 100644 --- a/kfile-plugins/html/kfile_html.cpp +++ b/kfile-plugins/html/kfile_html.cpp @@ -34,9 +34,9 @@ typedef KGenericFactory<KHtmlPlugin> HtmlFactory; K_EXPORT_COMPONENT_FACTORY( kfile_html, HtmlFactory( "kfile_html" ) ) -KHtmlPlugin::KHtmlPlugin( TQObject *parent, const char *name, +KHtmlPlugin::KHtmlPlugin( TQObject *tqparent, const char *name, const TQStringList &args ) - : KFilePlugin( parent, name, args ) + : KFilePlugin( tqparent, name, args ) { kdDebug(7034) << "html plugin\n"; @@ -69,7 +69,7 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint ) // or until <body> if the author forgot it // In this case, it's better to limit the size of the buffer to something // sensible. Think a 0-filled 3GB file with an .html extension. - int maxBufSize = QMIN(f.size(), 32768); + int maxBufSize = TQMIN(f.size(), 32768); TQByteArray data(maxBufSize + 1); f.readBlock(data.data(), maxBufSize); data[maxBufSize]='\0'; @@ -86,7 +86,7 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint ) exp.setPattern("\\s*<\\s*!doctype\\s*([^>]*)\\s*>"); if (exp.search(s, last) != -1) { - kdDebug(7034) << "DocType: " << exp.capturedTexts().join("-") << endl; + kdDebug(7034) << "DocType: " << TQString(exp.capturedTexts().join("-")) << endl; appendItem(group, "Doctype", exp.cap(1)); last += exp.matchedLength(); } @@ -151,7 +151,7 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint ) // find out if it contains javascript exp.setPattern("<script>"); - appendItem(group, "Javascript", TQVariant( s.find(exp)!=-1, 42)); + appendItem(group, "Javascript", TQVariant( s.tqfind(exp)!=-1, 42)); return true; } diff --git a/kfile-plugins/html/kfile_html.h b/kfile-plugins/html/kfile_html.h index 5034d53..1f23eae 100644 --- a/kfile-plugins/html/kfile_html.h +++ b/kfile-plugins/html/kfile_html.h @@ -29,9 +29,10 @@ class TQStringList; class KHtmlPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KHtmlPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KHtmlPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what ); }; diff --git a/kfile-plugins/lnk/kfile_lnk.cpp b/kfile-plugins/lnk/kfile_lnk.cpp index eb9e106..46e8b9d 100644 --- a/kfile-plugins/lnk/kfile_lnk.cpp +++ b/kfile-plugins/lnk/kfile_lnk.cpp @@ -35,9 +35,9 @@ K_EXPORT_COMPONENT_FACTORY(kfile_lnk, lnkFactory( "kfile_lnk" )) //-------------------------------------------------------------------------------- -lnkPlugin::lnkPlugin(TQObject *parent, const char *name, +lnkPlugin::lnkPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-win-lnk" ); @@ -75,8 +75,8 @@ bool lnkPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) if ( ! lnkInfo.isNetworkPath ) { - appendItem(group, "Where", i18n("on Windows disk: %1").arg(lnkInfo.volumeName)); // volume label - appendItem(group, "PointsTo", TQString("%1%2").arg(lnkInfo.driveName).arg(lnkInfo.path)); + appendItem(group, "Where", i18n("on Windows disk: %1").tqarg(lnkInfo.volumeName)); // volume label + appendItem(group, "PointsTo", TQString("%1%2").tqarg(lnkInfo.driveName).tqarg(lnkInfo.path)); } else { diff --git a/kfile-plugins/lnk/kfile_lnk.h b/kfile-plugins/lnk/kfile_lnk.h index 3bb7a8f..bc8b832 100644 --- a/kfile-plugins/lnk/kfile_lnk.h +++ b/kfile-plugins/lnk/kfile_lnk.h @@ -35,9 +35,10 @@ class TQStringList; class lnkPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - lnkPlugin( TQObject *parent, const char *name, const TQStringList& args ); + lnkPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; diff --git a/kfile-plugins/lnk/lnkforward.cpp b/kfile-plugins/lnk/lnkforward.cpp index af4492b..9eb6af0 100644 --- a/kfile-plugins/lnk/lnkforward.cpp +++ b/kfile-plugins/lnk/lnkforward.cpp @@ -72,7 +72,7 @@ int LNKForwarder::run(KCmdLineArgs *args) bool ret = readLNK(args->arg(0), info); if ( ! ret ) return 1; - info.path.replace(TQChar('\\'), TQChar('/')); + info.path.tqreplace(TQChar('\\'), TQChar('/')); TQString path; diff --git a/kfile-plugins/lnk/lnkforward.h b/kfile-plugins/lnk/lnkforward.h index 8810902..9d0a510 100644 --- a/kfile-plugins/lnk/lnkforward.h +++ b/kfile-plugins/lnk/lnkforward.h @@ -31,6 +31,7 @@ class LNKForwarder : public KApplication { Q_OBJECT + TQ_OBJECT public: int run(KCmdLineArgs *args); diff --git a/kfile-plugins/lnk/read_lnk.cpp b/kfile-plugins/lnk/read_lnk.cpp index f65b657..645486e 100644 --- a/kfile-plugins/lnk/read_lnk.cpp +++ b/kfile-plugins/lnk/read_lnk.cpp @@ -33,27 +33,27 @@ struct LNKHeader { char magic[4]; char GUID[16]; - Q_UINT32 flags; - Q_UINT32 attributes; + TQ_UINT32 flags; + TQ_UINT32 attributes; char time1[8]; char time2[8]; char time3[8]; - Q_UINT32 length; - Q_UINT32 iconNum; - Q_UINT32 showWnd; - Q_UINT32 hotKey; + TQ_UINT32 length; + TQ_UINT32 iconNum; + TQ_UINT32 showWnd; + TQ_UINT32 hotKey; char filler[8]; }; struct LNKFileLocation { - Q_UINT32 totalLen; - Q_UINT32 ptr; - Q_UINT32 flags; - Q_UINT32 localVolume; - Q_UINT32 basePath; - Q_UINT32 netVolume; - Q_UINT32 pathname; + TQ_UINT32 totalLen; + TQ_UINT32 ptr; + TQ_UINT32 flags; + TQ_UINT32 localVolume; + TQ_UINT32 basePath; + TQ_UINT32 netVolume; + TQ_UINT32 pathname; }; //-------------------------------------------------------------------------------- @@ -97,7 +97,7 @@ bool readLNK(const KURL &url, LNKInfo &info) if ( header.flags & 0x1 ) // the shell item id list is present { - Q_UINT16 len; + TQ_UINT16 len; // skip that list if ( (fread(&len, sizeof(len), 1, fd) != 1) || (fseek(fd, len, SEEK_CUR) != 0) ) @@ -156,7 +156,7 @@ bool readLNK(const KURL &url, LNKInfo &info) { info.volumeName = (start + loc.localVolume + 0x10); // volume label - info.path = TQString::null; + info.path = TQString(); if ( *(start + loc.basePath) ) { @@ -182,8 +182,8 @@ bool readLNK(const KURL &url, LNKInfo &info) else // network path { info.path = TQString("%1\\%2") - .arg(start + loc.netVolume + 0x14) // network share name - .arg(start + loc.pathname); + .tqarg(start + loc.netVolume + 0x14) // network share name + .tqarg(start + loc.pathname); } delete [] data; @@ -191,7 +191,7 @@ bool readLNK(const KURL &url, LNKInfo &info) if ( header.flags & 0x4 ) // has description string { - Q_UINT16 len; + TQ_UINT16 len; if ( fread(&len, sizeof(len), 1, fd) != 1 ) { diff --git a/kfile-plugins/lnk/read_lnk.h b/kfile-plugins/lnk/read_lnk.h index ff8fe63..96f3226 100644 --- a/kfile-plugins/lnk/read_lnk.h +++ b/kfile-plugins/lnk/read_lnk.h @@ -31,7 +31,7 @@ struct LNKInfo { LNKInfo() : fileSize(0), isNetworkPath(false), isDirectory(false), isFileOrDir(false) {} - Q_UINT32 fileSize; + TQ_UINT32 fileSize; bool isNetworkPath; bool isDirectory; bool isFileOrDir; diff --git a/kfile-plugins/mhtml/kfile_mhtml.cpp b/kfile-plugins/mhtml/kfile_mhtml.cpp index 0a07ea9..96da46e 100644 --- a/kfile-plugins/mhtml/kfile_mhtml.cpp +++ b/kfile-plugins/mhtml/kfile_mhtml.cpp @@ -34,9 +34,9 @@ typedef KGenericFactory<mhtmlPlugin> mhtmlFactory; K_EXPORT_COMPONENT_FACTORY(kfile_mhtml, mhtmlFactory( "kfile_mhtml" )) -mhtmlPlugin::mhtmlPlugin(TQObject *parent, const char *name, +mhtmlPlugin::mhtmlPlugin(TQObject *tqparent, const char *name, const TQStringList &args) - : KFilePlugin(parent, name, args) + : KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-mimearchive" ); KFileMimeTypeInfo::GroupInfo* group = 0L; @@ -120,21 +120,21 @@ bool mhtmlPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) } TQString mhtmlPlugin::decodeRFC2047Phrase(const TQString &msg, bool removeLessGreater){ - int st=msg.find("=?"); + int st=msg.tqfind("=?"); int en=-1; TQString msgCopy=msg; TQString decodedText=msgCopy.left(st); TQString encodedText=msgCopy.mid(st); - st=encodedText.find("=?"); + st=encodedText.tqfind("=?"); while(st!=-1){ - en=encodedText.find("?="); - while(encodedText.mid(en+2,1)!=" " && en+2<(int)encodedText.length()) en=encodedText.find("?=",en+1); + en=encodedText.tqfind("?="); + while(encodedText.mid(en+2,1)!=" " && en+2<(int)encodedText.length()) en=encodedText.tqfind("?=",en+1); if(en==-1) break; decodedText+=encodedText.left(st); TQString tmp=encodedText.mid(st,en-st+2); encodedText=encodedText.mid(en+2); decodedText+=decodeRFC2047String(tmp); - st=encodedText.find("=?",st+1); + st=encodedText.tqfind("=?",st+1); } decodedText += encodedText; // remove unwanted '<' and '>' @@ -147,12 +147,12 @@ TQString mhtmlPlugin::decodeRFC2047Phrase(const TQString &msg, bool removeLessGr TQString dec=decodedText; TQString tmp; - st=decodedText.find("<"); + st=decodedText.tqfind("<"); while(st!=-1){ - st=dec.find("<",st); + st=dec.tqfind("<",st); if(st==0 || (st!=0 && (dec.mid(st-2,2)==", "))){ - en=dec.find(">",st); - if(en==-1 && dec.find(",",st)<en){ + en=dec.tqfind(">",st); + if(en==-1 && dec.tqfind(",",st)<en){ st++; continue; } @@ -172,17 +172,17 @@ TQString mhtmlPlugin::decodeRFC2047String(const TQString &msg){ TQString encodedText; TQString decodedText; int encEnd=0; - if(msg.startsWith("=?") && (encEnd=msg.findRev("?="))!=-1){ + if(msg.startsWith("=?") && (encEnd=msg.tqfindRev("?="))!=-1){ notEncodedText=msg.mid(encEnd+2); encodedText=msg.left(encEnd); encodedText=encodedText.mid(2,encodedText.length()-2); - int questionMark=encodedText.find('?'); + int questionMark=encodedText.tqfind('?'); if(questionMark==-1) return msg; charset=encodedText.left(questionMark).lower(); encoding=encodedText.mid(questionMark+1,1).lower(); if(encoding!="b" && encoding!="q") return msg; encodedText=encodedText.mid(questionMark+3); - if(charset.find(" ")!=-1 && encodedText.find(" ")!=-1) return msg; + if(charset.tqfind(" ")!=-1 && encodedText.tqfind(" ")!=-1) return msg; TQCString tmpIn; TQCString tmpOut; tmpIn = encodedText.local8Bit(); @@ -192,8 +192,8 @@ TQString mhtmlPlugin::decodeRFC2047String(const TQString &msg){ TQTextCodec *codec = TQTextCodec::codecForName(charset.local8Bit()); if(!codec) return msg; decodedText=codec->toUnicode(tmpOut); - decodedText=decodedText.replace("_"," "); - }else decodedText=tmpOut.replace("_"," "); + decodedText=decodedText.tqreplace("_"," "); + }else decodedText=tmpOut.tqreplace("_"," "); return decodedText + notEncodedText; }else return msg; } diff --git a/kfile-plugins/mhtml/kfile_mhtml.h b/kfile-plugins/mhtml/kfile_mhtml.h index 954cd07..217ddf1 100644 --- a/kfile-plugins/mhtml/kfile_mhtml.h +++ b/kfile-plugins/mhtml/kfile_mhtml.h @@ -32,9 +32,10 @@ class TQStringList; class mhtmlPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - mhtmlPlugin( TQObject *parent, const char *name, const TQStringList& args ); + mhtmlPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); private: TQString decodeRFC2047Phrase(const TQString &msg, bool removeLessGreater=TRUE); diff --git a/kfile-plugins/txt/kfile_txt.cpp b/kfile-plugins/txt/kfile_txt.cpp index fbd1c8b..47f0d64 100644 --- a/kfile-plugins/txt/kfile_txt.cpp +++ b/kfile-plugins/txt/kfile_txt.cpp @@ -30,8 +30,8 @@ typedef KGenericFactory<KTxtPlugin> TxtFactory; K_EXPORT_COMPONENT_FACTORY(kfile_txt, TxtFactory("kfile_txt")) -KTxtPlugin::KTxtPlugin(TQObject *parent, const char *name, - const TQStringList &args) : KFilePlugin(parent, name, args) +KTxtPlugin::KTxtPlugin(TQObject *tqparent, const char *name, + const TQStringList &args) : KFilePlugin(tqparent, name, args) { kdDebug(7034) << "Text file meta info plugin\n"; makeMimeTypeInfo( "text/plain" ); diff --git a/kfile-plugins/txt/kfile_txt.h b/kfile-plugins/txt/kfile_txt.h index ab7a206..c765a83 100644 --- a/kfile-plugins/txt/kfile_txt.h +++ b/kfile-plugins/txt/kfile_txt.h @@ -27,9 +27,10 @@ class TQStringList; class KTxtPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KTxtPlugin(TQObject *parent, const char *name, const TQStringList& args); + KTxtPlugin(TQObject *tqparent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); private: |