diff options
Diffstat (limited to 'file-integration/basketthumbcreator.cpp')
-rw-r--r-- | file-integration/basketthumbcreator.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/file-integration/basketthumbcreator.cpp b/file-integration/basketthumbcreator.cpp index afad656..abc6e90 100644 --- a/file-integration/basketthumbcreator.cpp +++ b/file-integration/basketthumbcreator.cpp @@ -18,30 +18,30 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <qstringlist.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqstringlist.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <ktempdir.h> #include "basketthumbcreator.h" -bool BasketThumbCreator::create(const QString &path, int /*width*/, int /*height*/, QImage &image) +bool BasketThumbCreator::create(const TQString &path, int /*width*/, int /*height*/, TQImage &image) { // Create the temporar folder: KTempDir tempDir; tempDir.setAutoDelete(true); - QString tempFolder = tempDir.name(); - QDir dir; + TQString tempFolder = tempDir.name(); + TQDir dir; dir.mkdir(tempFolder); - const Q_ULONG BUFFER_SIZE = 1024; + const TQ_ULONG BUFFER_SIZE = 1024; - QFile file(path); + TQFile file(path); if (file.open(IO_ReadOnly)) { - QTextStream stream(&file); - stream.setEncoding(QTextStream::Latin1); - QString line = stream.readLine(); + TQTextStream stream(&file); + stream.setEncoding(TQTextStream::Latin1); + TQString line = stream.readLine(); if (line != "BasKetNP:archive" && line != "BasKetNP:template") { file.close(); return false; @@ -49,9 +49,9 @@ bool BasketThumbCreator::create(const QString &path, int /*width*/, int /*height while (!stream.atEnd()) { // Get Key/Value Pair From the Line to Read: line = stream.readLine(); - int index = line.find(':'); - QString key; - QString value; + int index = line.tqfind(':'); + TQString key; + TQString value; if (index >= 0) { key = line.left(index); value = line.right(line.length() - index - 1); @@ -67,17 +67,17 @@ bool BasketThumbCreator::create(const QString &path, int /*width*/, int /*height return false; } // Get the preview file: - QFile previewFile(tempFolder + "preview.png"); + TQFile previewFile(tempFolder + "preview.png"); if (previewFile.open(IO_WriteOnly)) { char *buffer = new char[BUFFER_SIZE]; - Q_LONG sizeRead; - while ((sizeRead = file.readBlock(buffer, QMIN(BUFFER_SIZE, size))) > 0) { + TQ_LONG sizeRead; + while ((sizeRead = file.readBlock(buffer, TQMIN(BUFFER_SIZE, size))) > 0) { previewFile.writeBlock(buffer, sizeRead); size -= sizeRead; } previewFile.close(); delete buffer; - image = QImage(tempFolder + "preview.png"); + image = TQImage(tempFolder + "preview.png"); file.close(); return true; } @@ -91,8 +91,8 @@ bool BasketThumbCreator::create(const QString &path, int /*width*/, int /*height } // Get the archive file: char *buffer = new char[BUFFER_SIZE]; - Q_LONG sizeRead; - while ((sizeRead = file.readBlock(buffer, QMIN(BUFFER_SIZE, size))) > 0) { + TQ_LONG sizeRead; + while ((sizeRead = file.readBlock(buffer, TQMIN(BUFFER_SIZE, size))) > 0) { size -= sizeRead; } delete buffer; |