From 395a904bff7b4d6ead445c342f7ac0c5fbf29121 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 18 Jun 2011 17:00:31 +0000 Subject: TQt4 port kdeaddons This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfile-plugins/cert/kfile_cert.cpp | 8 ++++---- kfile-plugins/cert/kfile_cert.h | 3 ++- kfile-plugins/desktop/kfile_desktop.cpp | 4 ++-- kfile-plugins/desktop/kfile_desktop.h | 3 ++- kfile-plugins/folder/kfile_folder.cpp | 4 ++-- kfile-plugins/folder/kfile_folder.h | 3 ++- kfile-plugins/html/kfile_html.cpp | 10 ++++----- kfile-plugins/html/kfile_html.h | 3 ++- kfile-plugins/lnk/kfile_lnk.cpp | 8 ++++---- kfile-plugins/lnk/kfile_lnk.h | 3 ++- kfile-plugins/lnk/lnkforward.cpp | 2 +- kfile-plugins/lnk/lnkforward.h | 1 + kfile-plugins/lnk/read_lnk.cpp | 36 ++++++++++++++++----------------- kfile-plugins/lnk/read_lnk.h | 2 +- kfile-plugins/mhtml/kfile_mhtml.cpp | 32 ++++++++++++++--------------- kfile-plugins/mhtml/kfile_mhtml.h | 3 ++- kfile-plugins/txt/kfile_txt.cpp | 4 ++-- kfile-plugins/txt/kfile_txt.h | 3 ++- 18 files changed, 70 insertions(+), 62 deletions(-) (limited to 'kfile-plugins') 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 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 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 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 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 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("