summaryrefslogtreecommitdiffstats
path: root/src/kchmsourcefactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kchmsourcefactory.cpp')
-rw-r--r--src/kchmsourcefactory.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/kchmsourcefactory.cpp b/src/kchmsourcefactory.cpp
index 8b4232c..896a447 100644
--- a/src/kchmsourcefactory.cpp
+++ b/src/kchmsourcefactory.cpp
@@ -19,9 +19,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qcstring.h>
-#include <qimage.h>
-#include <qdir.h>
+#include <tqcstring.h>
+#include <tqimage.h>
+#include <tqdir.h>
#include "libchmfile.h"
#include "libchmurlfactory.h"
@@ -33,15 +33,15 @@
KCHMSourceFactory::KCHMSourceFactory (KCHMViewWindow * viewwindow)
- : QMimeSourceFactory()
+ : TQMimeSourceFactory()
{
m_viewWindow = viewwindow;
}
-const QMimeSource * KCHMSourceFactory::data( const QString & abs_name ) const
+const TQMimeSource * KCHMSourceFactory::data( const TQString & abs_name ) const
{
- QString data, file, path = abs_name;
+ TQString data, file, path = abs_name;
// Retreive the data from chm file
LCHMFile * chm = ::mainWindow->chmFile();
@@ -49,7 +49,7 @@ const QMimeSource * KCHMSourceFactory::data( const QString & abs_name ) const
if ( !chm )
return 0;
- int pos = path.find ('#');
+ int pos = path.tqfind ('#');
if ( pos != -1 )
path = path.left (pos);
@@ -58,37 +58,37 @@ const QMimeSource * KCHMSourceFactory::data( const QString & abs_name ) const
// to generate the HTML page, and set it.
if ( LCHMUrlFactory::handleFileType( path, data ) )
{
- ((QMimeSourceFactory*)this)->setText (path, data);
+ ((TQMimeSourceFactory*)this)->setText (path, data);
}
else if ( path.endsWith (".htm") || path.endsWith (".html") )
{
if ( chm->getFileContentAsString( &data, path ) )
- ((QMimeSourceFactory*)this)->setText (path, data);
+ ((TQMimeSourceFactory*)this)->setText (path, data);
}
else
{
// treat as image
- QImage img;
- QByteArray buf;
+ TQImage img;
+ TQByteArray buf;
- QString fpath = KCHMViewWindow_QTextBrowser::decodeUrl( path );
+ TQString fpath = KCHMViewWindow_QTextBrowser::decodeUrl( path );
if ( chm->getFileContentAsBinary( &buf, fpath ) )
{
if ( img.loadFromData ( (const uchar *) buf.data(), buf.size() ) )
- ((QMimeSourceFactory*)this)->setImage (path, img);
+ ((TQMimeSourceFactory*)this)->setImage (path, img);
}
else
{
- ((QMimeSourceFactory*)this)->setImage( path, img );
+ ((TQMimeSourceFactory*)this)->setImage( path, img );
qWarning( "Could not resolve file %s\n", path.ascii() );
}
}
- return QMimeSourceFactory::data (path);
+ return TQMimeSourceFactory::data (path);
}
-QString KCHMSourceFactory::makeAbsolute ( const QString & abs_or_rel_name, const QString & ) const
+TQString KCHMSourceFactory::makeAbsolute ( const TQString & abs_or_rel_name, const TQString & ) const
{
return m_viewWindow->makeURLabsolute ( abs_or_rel_name, false );
}