diff options
Diffstat (limited to 'src/logviewer.cpp')
-rw-r--r-- | src/logviewer.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/logviewer.cpp b/src/logviewer.cpp index cb4d333..6e09db4 100644 --- a/src/logviewer.cpp +++ b/src/logviewer.cpp @@ -25,8 +25,8 @@ */ // QT header -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> // KDE header #include <ktextedit.h> @@ -38,19 +38,19 @@ #include "logviewer.h" /*! This is the default constructor of the class LogViewer. */ -LogViewer::LogViewer( QString filename, QWidget *parent, const char *name) - :log_viewer(parent, name, false, WDestructiveClose ) { +LogViewer::LogViewer( TQString filename, TQWidget *tqparent, const char *name) + :log_viewer(tqparent, name, false, WDestructiveClose ) { - this->setCaption(i18n("KPowersave Logfile Viewer: %1").arg(filename)); + this->setCaption(i18n("KPowersave Logfile Viewer: %1").tqarg(filename)); - if (!QFile::exists ( filename )) + if (!TQFile::exists ( filename )) return; log_file = filename; - QFile file (log_file); + TQFile file (log_file); if (file.open(IO_ReadOnly)) { - QTextStream stream ( &file ); + TQTextStream stream ( &file ); kTextEdit->setText (stream.read()); kTextEdit->setReadOnly(true); } @@ -59,7 +59,7 @@ LogViewer::LogViewer( QString filename, QWidget *parent, const char *name) /*! This is the default destructor of the class LogViewer. */ LogViewer::~LogViewer(){ - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /*! @@ -75,23 +75,23 @@ void LogViewer::pB_close_clicked() { */ void LogViewer::pB_save_clicked() { - QString sFileName; + TQString sFileName; bool tryagain = true; while (tryagain == true) { int answer; - QString msg; + TQString msg; - sFileName = KFileDialog::getSaveFileName( QDir::homeDirPath() ); - QFileInfo info (sFileName); + sFileName = KFileDialog::getSaveFileName( TQDir::homeDirPath() ); + TQFileInfo info (sFileName); - if (QFile::exists(sFileName) && info.isWritable() && info.isReadable() && info.isFile()) { + if (TQFile::exists(sFileName) && info.isWritable() && info.isReadable() && info.isFile()) { msg = i18n("File already exist. Overwrite the file?"); answer = KMessageBox::questionYesNo(this, msg , i18n("Error while save logfile")); if (answer == KMessageBox::Yes) { tryagain = false; } - } else if (QFile::exists(sFileName)) { + } else if (TQFile::exists(sFileName)) { msg = i18n("File already exist."); answer = KMessageBox::warningContinueCancel(this, msg , i18n("Error while save logfile"), @@ -105,11 +105,11 @@ void LogViewer::pB_save_clicked() { } } - QFile in(log_file); - QFile out(sFileName); + TQFile in(log_file); + TQFile out(sFileName); if (in.open(IO_ReadOnly)) { if (out.open(IO_WriteOnly)) { - QByteArray input(4096); + TQByteArray input(4096); long l = 0; while (!in.atEnd()) { l = in.readLine(input.data(), 4096); |