diff options
Diffstat (limited to 'lib/libchmfile/libchmurlfactory.h')
-rw-r--r-- | lib/libchmfile/libchmurlfactory.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/libchmfile/libchmurlfactory.h b/lib/libchmfile/libchmurlfactory.h index 29ac433..5481e8d 100644 --- a/lib/libchmfile/libchmurlfactory.h +++ b/lib/libchmfile/libchmurlfactory.h @@ -19,18 +19,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <qdir.h> -#include <qstring.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqstring.h> +#include <tqregexp.h> namespace LCHMUrlFactory { -static inline bool isRemoteURL( const QString & url, QString & protocol ) +static inline bool isRemoteURL( const TQString & url, TQString & protocol ) { // Check whether the URL is external - QRegExp uriregex ( "^(\\w+):\\/\\/" ); - QRegExp mailtoregex ( "^(mailto):" ); + TQRegExp uriregex ( "^(\\w+):\\/\\/" ); + TQRegExp mailtoregex ( "^(mailto):" ); // mailto: can also have different format, so handle it if ( url.startsWith( "mailto:" ) ) @@ -40,7 +40,7 @@ static inline bool isRemoteURL( const QString & url, QString & protocol ) } else if ( uriregex.search ( url ) != -1 ) { - QString proto = uriregex.cap ( 1 ).lower(); + TQString proto = TQString(uriregex.cap( 1 )).lower(); // Filter the URLs which need to be opened by a browser if ( proto == "http" @@ -57,15 +57,15 @@ static inline bool isRemoteURL( const QString & url, QString & protocol ) } // Some JS urls start with javascript:// -static inline bool isJavascriptURL( const QString & url ) +static inline bool isJavascriptURL( const TQString & url ) { return url.startsWith ("javascript://"); } // Parse urls like "ms-its:file name.chm::/topic.htm" -static inline bool isNewChmURL( const QString & url, QString & chmfile, QString & page ) +static inline bool isNewChmURL( const TQString & url, TQString & chmfile, TQString & page ) { - QRegExp uriregex ( "^ms-its:(.*)::(.*)$" ); + TQRegExp uriregex ( "^ms-its:(.*)::(.*)$" ); if ( uriregex.search ( url ) != -1 ) { @@ -78,15 +78,15 @@ static inline bool isNewChmURL( const QString & url, QString & chmfile, QString return false; } -static inline QString makeURLabsoluteIfNeeded( const QString & url ) +static inline TQString makeURLabsoluteIfNeeded( const TQString & url ) { - QString p1, p2, newurl = url; + TQString p1, p2, newurl = url; if ( !isRemoteURL (url, p1) && !isJavascriptURL (url) && !isNewChmURL (url, p1, p2) ) { - newurl = QDir::cleanDirPath (url); + newurl = TQDir::cleanDirPath (url); // Normalize url, so it becomes absolute if ( newurl[0] != '/' ) @@ -100,20 +100,20 @@ static inline QString makeURLabsoluteIfNeeded( const QString & url ) // Returns a special string, which allows the kio-slave, or viewwindow-browser iteraction // to regognize our own internal urls, which is necessary to show image-only pages. -static inline QString getInternalUriExtension() +static inline TQString getInternalUriExtension() { return ".KCHMVIEWER_SPECIAL_HANDLER"; } -static inline bool handleFileType( const QString& link, QString& generated ) +static inline bool handleFileType( const TQString& link, TQString& generated ) { - QString intext = getInternalUriExtension(); + TQString intext = getInternalUriExtension(); if ( !link.endsWith( intext ) ) return false; - QString filelink = link.left( link.length() - strlen( intext ) ); + TQString filelink = link.left( link.length() - strlen( intext ) ); generated = "<html><body><img src=\"" + filelink + "\"></body></html>"; return true; } |