diff options
author | Slávek Banko <[email protected]> | 2013-07-27 16:57:53 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-27 18:48:46 +0200 |
commit | 7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931 (patch) | |
tree | 4655c7263ca5c64d23d10167cb459dd9cb253815 /src/arkollon/wizard.cpp | |
parent | 88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff) | |
download | tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip |
Initial TQt conversion
Diffstat (limited to 'src/arkollon/wizard.cpp')
-rw-r--r-- | src/arkollon/wizard.cpp | 260 |
1 files changed, 130 insertions, 130 deletions
diff --git a/src/arkollon/wizard.cpp b/src/arkollon/wizard.cpp index 8e92ebf..ae6b94b 100644 --- a/src/arkollon/wizard.cpp +++ b/src/arkollon/wizard.cpp @@ -19,35 +19,35 @@ ***************************************************************************/ #include "wizard.h" -#include <qfiledialog.h> -#include <qwidgetstack.h> -#include <qpushbutton.h> -#include <qpainter.h> -#include <qheader.h> -#include <qapplication.h> -#include <qmessagebox.h> -#include <qprogressbar.h> -#include <qradiobutton.h> -#include <qtextedit.h> -#include <qlineedit.h> -#include <qpopupmenu.h> -#include <qhbox.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qfontmetrics.h> -#include <qcheckbox.h> +#include <ntqfiledialog.h> +#include <ntqwidgetstack.h> +#include <ntqpushbutton.h> +#include <ntqpainter.h> +#include <ntqheader.h> +#include <ntqapplication.h> +#include <ntqmessagebox.h> +#include <ntqprogressbar.h> +#include <ntqradiobutton.h> +#include <ntqtextedit.h> +#include <ntqlineedit.h> +#include <ntqpopupmenu.h> +#include <ntqhbox.h> +#include <ntqfileinfo.h> +#include <ntqlabel.h> +#include <ntqfontmetrics.h> +#include <ntqcheckbox.h> #include "data.h" #include "rcparser.h" #include "headerlistitem.h" -typedef QValueVector<CompileError> CompileErrorVector; +typedef TQValueVector<CompileError> CompileErrorVector; CompileErrorVector errs( 5 ); // vector of 3 Employees -ComponentListItem::ComponentListItem(struct Component c, QListView* parent) - : QCheckListItem(parent, "", QCheckListItem::CheckBox) +ComponentListItem::ComponentListItem(struct Component c, TQListView* parent) + : TQCheckListItem(parent, "", TQCheckListItem::CheckBox) { component = c; setText(0, c.niceName); @@ -65,7 +65,7 @@ ComponentListItem::ComponentListItem(struct Component c, QListView* parent) } -int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const +int ComponentListItem::compare(TQListViewItem* i, int col, bool ascending) const { switch (i->rtti()) { @@ -76,7 +76,7 @@ int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const return -1; if (section > item->section) return 1; - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } break; @@ -94,13 +94,13 @@ int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const -Wizard::Wizard(QWidget *parent, const char *name) +Wizard::Wizard(TQWidget *parent, const char *name) : WizardBase(parent, name, false, WDestructiveClose) { componentInfo->setMaximumSize(32767,70); componentList->header()->hide(); //progressLabel2->setMaximumSize(32767, progressLabel2->fontMetrics().height()*2); - externalProcess = new QProcess(this); + externalProcess = new TQProcess(this); connect(externalProcess, SIGNAL(processExited()), SLOT(processExited())); connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout())); connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr())); @@ -111,7 +111,7 @@ Wizard::Wizard(QWidget *parent, const char *name) createActionFormats(); - kdeDirProcess = new QProcess(this); + kdeDirProcess = new TQProcess(this); connect(kdeDirProcess, SIGNAL(readyReadStdout()), SLOT(kdeDirReady())); connect(kdeDirProcess, SIGNAL(processExited()), SLOT(getInstalledComponents())); kdeDirProcess->addArgument("kde-config"); @@ -132,7 +132,7 @@ Wizard::Wizard(QWidget *parent, const char *name) errs[3] = CompileError( "installing config files as root", "The installation reported an" "error because I attempted to install the privoxy config files as root. <b> There is no " "need to take any action on your part. Privoxy has been installed and you can now use it with TorK. " ); - errs[4] = CompileError( "Qt (>= ", "The installation process finished with an error because it needs a " + errs[4] = CompileError( "TQt (>= ", "The installation process finished with an error because it needs a " " component missing on your system. To correct this, " "do the following: <br> 1. Download and install any packages for your distribution with (i) 'qt' and " " either 'devel' or 'lib' in their name. <br> 2. Retry installation. " ); @@ -168,7 +168,7 @@ void Wizard::kdeDirReady() { while (kdeDirProcess->canReadLineStdout()) { - QString line = kdeDirProcess->readLineStdout(); + TQString line = kdeDirProcess->readLineStdout(); if (!line.isEmpty()) kdeDir = line; } @@ -176,15 +176,15 @@ void Wizard::kdeDirReady() void Wizard::getInstalledComponents() { - QFile uninstallScript("/tmp/arkollon-uninstall.sh"); + TQFile uninstallScript("/tmp/arkollon-uninstall.sh"); if (uninstallScript.exists()) uninstallScript.remove(); uninstallScript.open(IO_WriteOnly); - QDataStream stream(&uninstallScript); + TQDataStream stream(&uninstallScript); stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len); uninstallScript.close(); - installedComponentsProcess = new QProcess(this); + installedComponentsProcess = new TQProcess(this); connect(installedComponentsProcess, SIGNAL(readyReadStdout()), SLOT(installedComponentsReady())); connect(installedComponentsProcess, SIGNAL(processExited()), SLOT(setup())); installedComponentsProcess->addArgument("/bin/sh"); @@ -198,7 +198,7 @@ void Wizard::installedComponentsReady() { while (installedComponentsProcess->canReadLineStdout()) { - QString line = installedComponentsProcess->readLineStdout(); + TQString line = installedComponentsProcess->readLineStdout(); if (line.isEmpty()) continue; @@ -213,7 +213,7 @@ void Wizard::installedComponentsReady() void Wizard::setup() { - QFile uninstallScript("/tmp/arkollon-uninstall.sh"); + TQFile uninstallScript("/tmp/arkollon-uninstall.sh"); if (uninstallScript.exists()) uninstallScript.remove(); @@ -222,14 +222,14 @@ void Wizard::setup() // Firstly check if there's an arkollonrc file in the current directory // If there is, use it. - dir = QDir::currentDirPath(); - if (qApp->argc() > 1) + dir = TQDir::currentDirPath(); + if (tqApp->argc() > 1) { // The directory specified on the command line overrides the current dir. - QDir d(qApp->argv()[1]); + TQDir d(tqApp->argv()[1]); dir = d.absPath(); } - if (QFile::exists(dir + "/arkollonrc")) + if (TQFile::exists(dir + "/arkollonrc")) { setupFromRc(); } @@ -237,7 +237,7 @@ void Wizard::setup() { if (!setupFromDir()) { - QMessageBox::critical(NULL, "Error", "This directory does not contain any recognised buildsystem", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + TQMessageBox::critical(NULL, "Error", "This directory does not contain any recognised buildsystem", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton); reject(); return; } @@ -251,37 +251,37 @@ void Wizard::setupFromRc() parser.addSearchDir(dir); if (!parser.openFile("arkollonrc")) { - QMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory could not be read", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + TQMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory could not be read", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton); reject(); return; } parser.setSection("Arkollon"); - QString appName = parser.readString("AppName"); + TQString appName = parser.readString("AppName"); if (appName.isEmpty()) { - QMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory contains no application name!", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + TQMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory contains no application name!", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton); reject(); return; } setAppName(appName); - QString icon32Path = parser.readString("Icon32"); - QString icon16Path = parser.readString("Icon16"); - if ((!icon32Path.isEmpty()) && (QFile::exists(dir + "/" + icon32Path))) + TQString icon32Path = parser.readString("Icon32"); + TQString icon16Path = parser.readString("Icon16"); + if ((!icon32Path.isEmpty()) && (TQFile::exists(dir + "/" + icon32Path))) { - QPixmap icon32(dir + "/" + icon32Path); + TQPixmap icon32(dir + "/" + icon32Path); appIcon->setPixmap(icon32); } - if ((!icon16Path.isEmpty()) && (QFile::exists(dir + "/" + icon16Path))) + if ((!icon16Path.isEmpty()) && (TQFile::exists(dir + "/" + icon16Path))) { - QPixmap icon16(dir + "/" + icon16Path); + TQPixmap icon16(dir + "/" + icon16Path); setIcon(icon16); } buildOrder = parser.readList("BuildOrder"); - QStringList compNames = parser.readList("Components"); - QStringList::Iterator it = compNames.begin(); + TQStringList compNames = parser.readList("Components"); + TQStringList::Iterator it = compNames.begin(); while( it != compNames.end() ) { parser.setSection(*it); @@ -299,15 +299,15 @@ void Wizard::setupFromRc() c.alreadyInstalled = false; // Load the buildtimes data - if (QFile::exists(dir + "/" + c.subDir + "/buildtimes")) + if (TQFile::exists(dir + "/" + c.subDir + "/buildtimes")) { - QRegExp re("([^,]*,[^,]*),(\\d*)"); - QFile file(dir + "/" + c.subDir + "/buildtimes"); + TQRegExp re("([^,]*,[^,]*),(\\d*)"); + TQFile file(dir + "/" + c.subDir + "/buildtimes"); file.open(IO_ReadOnly); - QTextStream stream(&file); + TQTextStream stream(&file); for (;;) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if (line.isNull()) break; if (re.search(line) == -1) @@ -333,13 +333,13 @@ void Wizard::setupFromRc() } // Check if it's already installed - QStringList::Iterator it2 = installedComponents.begin(); + TQStringList::Iterator it2 = installedComponents.begin(); while( it2 != installedComponents.end() ) { int dashPos = c.subDir.findRev('-'); if (dashPos < 0) dashPos = c.subDir.length(); - QString version = c.subDir.left(dashPos) + ":" + c.subDir.right(c.subDir.length() - dashPos - 1); + TQString version = c.subDir.left(dashPos) + ":" + c.subDir.right(c.subDir.length() - dashPos - 1); if (*it2 == version.lower()) { item->setOn(false); @@ -357,18 +357,18 @@ void Wizard::setupFromRc() bool Wizard::setupFromDir() { - if ((!QFile::exists(dir + "/configure")) && - (!QFile::exists(dir + "/autogen.sh")) && - (!QFile::exists(dir + "/auto-gen.sh"))) + if ((!TQFile::exists(dir + "/configure")) && + (!TQFile::exists(dir + "/autogen.sh")) && + (!TQFile::exists(dir + "/auto-gen.sh"))) { - QDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); - if (myDir.entryList("*.pro", QDir::Files).count() <= 0) + TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); + if (myDir.entryList("*.pro", TQDir::Files).count() <= 0) return false; } // Use the directory name as the appname - QDir myDir2(dir); - QString dirName = myDir2.dirName(); + TQDir myDir2(dir); + TQString dirName = myDir2.dirName(); setAppName(makeDirNice(dirName)); buildOrder.append(dirName); @@ -386,13 +386,13 @@ bool Wizard::setupFromDir() header->setText(0, "Required components"); header->section = 0; - QStringList::Iterator it2 = installedComponents.begin(); + TQStringList::Iterator it2 = installedComponents.begin(); while( it2 != installedComponents.end() ) { int dashPos = dirName.findRev('-'); if (dashPos < 0) dashPos = dirName.length(); - QString version = dirName.left(dashPos) + ":" + dirName.right(dirName.length() - dashPos - 1); + TQString version = dirName.left(dashPos) + ":" + dirName.right(dirName.length() - dashPos - 1); if (*it2 == version.lower()) item->component.alreadyInstalled = true; ++it2; @@ -407,13 +407,13 @@ Wizard::~Wizard() } -void Wizard::componentSelected(QListViewItem* item) +void Wizard::componentSelected(TQListViewItem* item) { if (item->rtti() != 1001) return; ComponentListItem* i = (ComponentListItem*) item; - QString text = "<p><b>" + item->text(0) + "</b>"; + TQString text = "<p><b>" + item->text(0) + "</b>"; if (i->component.alreadyInstalled) text += " <i>(Already installed)</i>"; text += "</p><p>"; @@ -424,13 +424,13 @@ void Wizard::componentSelected(QListViewItem* item) } -QString Wizard::makeDirNice(QString name) +TQString Wizard::makeDirNice(TQString name) { int dashPos = name.findRev('-'); if (dashPos < 0) dashPos = name.length(); - QString ret = name.left(dashPos); + TQString ret = name.left(dashPos); ret = ret.left(1).upper() + ret.right(ret.length()-1); return ret; @@ -450,32 +450,32 @@ void Wizard::nextPressed() int currentId = installStack->id(installStack->visibleWidget()); if (currentId == 3) { - QDir d(kdeDir); + TQDir d(kdeDir); d.mkdir("share/apps/kdesktop/Desktop"); if (shortcutBox->isChecked()) { - QFile source(dir + "/" + desktop); - QString destDir = kdeDir + "/share/apps/kdesktop/Desktop"; + TQFile source(dir + "/" + desktop); + TQString destDir = kdeDir + "/share/apps/kdesktop/Desktop"; int slashPos = desktop.findRev('/'); if (slashPos < 0) slashPos = 0; - QFile dest(destDir + "/" + desktop.right(desktop.length() - slashPos)); + TQFile dest(destDir + "/" + desktop.right(desktop.length() - slashPos)); source.open(IO_ReadOnly); dest.open(IO_WriteOnly | IO_Truncate); - QDataStream destStream(&dest); - QByteArray data = source.readAll(); + TQDataStream destStream(&dest); + TQByteArray data = source.readAll(); destStream.writeRawBytes(data.data(), data.size()); source.close(); dest.close(); } if (uninstallBox->isChecked()) { - QFile source(dir + "/Uninstall TorK.desktop"); - QFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall TorK.desktop"); + TQFile source(dir + "/Uninstall TorK.desktop"); + TQFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall TorK.desktop"); source.open(IO_ReadOnly); dest.open(IO_WriteOnly | IO_Truncate); - QDataStream destStream(&dest); - QByteArray data = source.readAll(); + TQDataStream destStream(&dest); + TQByteArray data = source.readAll(); destStream.writeRawBytes(data.data(), data.size()); source.close(); dest.close(); @@ -493,7 +493,7 @@ void Wizard::nextPressed() { bool itemsSelected = false; - QListViewItemIterator it( componentList ); + TQListViewItemIterator it( componentList ); while ( it.current() ) { if (it.current()->rtti() != 1001) @@ -508,7 +508,7 @@ void Wizard::nextPressed() } if (!itemsSelected) { - QMessageBox::warning(this, "Warning", "You need to select at least one component", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + TQMessageBox::warning(this, "Warning", "You need to select at least one component", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton); return; } } @@ -552,9 +552,9 @@ void Wizard::startProcess() totalBTime = 0; elapsedTime = 0; elapsedBTime = 0; - for ( QStringList::Iterator it = buildOrder.begin(); it != buildOrder.end(); ++it ) + for ( TQStringList::Iterator it = buildOrder.begin(); it != buildOrder.end(); ++it ) { - QListViewItemIterator it2( componentList ); + TQListViewItemIterator it2( componentList ); while ( it2.current() ) { if (it2.current()->rtti() != 1001) @@ -568,7 +568,7 @@ void Wizard::startProcess() if (item->isOn()) { selectedComponents.append(item->component); - QMap<QString, uint>::iterator it3; + TQMap<TQString, uint>::iterator it3; for ( it3 = item->component.buildTimes.begin(); it3 != item->component.buildTimes.end(); ++it3 ) totalBTime += it3.data(); } @@ -582,7 +582,7 @@ void Wizard::startProcess() currentComponent = 0; currentStage = None; - currentIsQMake = false; + currentIsTQMake = false; nextStep(); } @@ -600,24 +600,24 @@ void Wizard::nextStep() setProgress2Text(""); //progressLabel2->setCursorPosition(0); currentStage = Autogen; - QDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); - if (myDir.entryList("*.pro", QDir::Files).count() > 0) + TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); + if (myDir.entryList("*.pro", TQDir::Files).count() > 0) { - currentIsQMake = true; + currentIsTQMake = true; nextStep(); return; } - if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/configure")) + if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/configure")) { nextStep(); return; } - QString autogenName; - if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/autogen.sh")) + TQString autogenName; + if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/autogen.sh")) autogenName = "autogen.sh"; - else if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/auto-gen.sh")) + else if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/auto-gen.sh")) autogenName = "auto-gen.sh"; else { @@ -636,7 +636,7 @@ void Wizard::nextStep() { //progressBar->setProgress(progressBar->progress() + 1); currentStage = Configure; - if (currentIsQMake) + if (currentIsTQMake) { progressLabel1->setText("<b>Running qmake for " + selectedComponents[currentComponent].niceName + "</b>"); setProgress2Text(""); @@ -645,7 +645,7 @@ void Wizard::nextStep() externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir); if (!externalProcess->start()) { - logLine("Error: qmake was not found. Try installing the Qt-devel libraries."); + logLine("Error: qmake was not found. Try installing the TQt-devel libraries."); errorOccured(); return; } @@ -662,8 +662,8 @@ void Wizard::nextStep() //externalProcess->addArgument("--prefix=" + prefix); if (!selectedComponents[currentComponent].confOptions.isEmpty()) { - QStringList extraArgs = QStringList::split(" ", sub(selectedComponents[currentComponent].confOptions)); - for ( QStringList::Iterator it = extraArgs.begin(); it != extraArgs.end(); ++it ) + TQStringList extraArgs = TQStringList::split(" ", sub(selectedComponents[currentComponent].confOptions)); + for ( TQStringList::Iterator it = extraArgs.begin(); it != extraArgs.end(); ++it ) externalProcess->addArgument(*it); } externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir); @@ -713,25 +713,25 @@ void Wizard::nextStep() progressLabel1->setText("<b>Writing uninstall information for " + selectedComponents[currentComponent].niceName + "</b>"); setProgress2Text(""); - QFile postInstallScript("/tmp/arkollon-postinstall.sh"); + TQFile postInstallScript("/tmp/arkollon-postinstall.sh"); if (postInstallScript.exists()) postInstallScript.remove(); postInstallScript.open(IO_WriteOnly); - QDataStream stream(&postInstallScript); + TQDataStream stream(&postInstallScript); stream.writeRawBytes((const char*)postinstall_sh_data, postinstall_sh_len); postInstallScript.close(); - QFile fileList("/tmp/arkollon-filelist"); + TQFile fileList("/tmp/arkollon-filelist"); if (fileList.exists()) fileList.remove(); fileList.open(IO_WriteOnly); - QTextStream fileStream(&fileList); - QStringList doneFiles; - for ( QStringList::Iterator it = installedFiles.begin(); it != installedFiles.end(); ++it ) + TQTextStream fileStream(&fileList); + TQStringList doneFiles; + for ( TQStringList::Iterator it = installedFiles.begin(); it != installedFiles.end(); ++it ) { if (doneFiles.find(*it) != doneFiles.end()) continue; - QFileInfo fileInfo(*it); + TQFileInfo fileInfo(*it); if (fileInfo.isDir()) continue; fileStream << (*it) << '\n'; @@ -743,8 +743,8 @@ void Wizard::nextStep() int dashPos = c.subDir.findRev('-'); if (dashPos < 0) dashPos = c.subDir.length(); - QString appname = c.subDir.left(dashPos); - QString version = c.subDir.right(c.subDir.length() - dashPos - 1); + TQString appname = c.subDir.left(dashPos); + TQString version = c.subDir.right(c.subDir.length() - dashPos - 1); externalProcess->addArgument("/bin/sh"); externalProcess->addArgument("/tmp/arkollon-postinstall.sh"); @@ -761,7 +761,7 @@ void Wizard::nextStep() { currentStage = None; currentComponent++; - currentIsQMake = false; + currentIsTQMake = false; if (currentComponent >= selectedComponents.count()) { progressLabel1->setText("<b>Installation completed!</b>"); @@ -794,11 +794,11 @@ void Wizard::processExited() if (currentStage == WriteUninstallInfo) { // Remove temp files from the last stage - QFile postInstallScript("/tmp/arkollon-postinstall.sh"); + TQFile postInstallScript("/tmp/arkollon-postinstall.sh"); if (postInstallScript.exists()) postInstallScript.remove(); - QFile fileList("/tmp/arkollon-filelist"); + TQFile fileList("/tmp/arkollon-filelist"); if (fileList.exists()) fileList.remove(); } @@ -810,7 +810,7 @@ void Wizard::processExited() } if (externalProcess->exitStatus() != 0) { - logLine("Return value " + QString::number(externalProcess->exitStatus())); + logLine("Return value " + TQString::number(externalProcess->exitStatus())); errorOccured(); return; } @@ -823,11 +823,11 @@ void Wizard::readyReadStderr() { while (externalProcess->canReadLineStderr()) { - QString line = externalProcess->readLineStderr().latin1(); + TQString line = externalProcess->readLineStderr().latin1(); CompileErrorVector::iterator it; for( it = errs.begin(); it != errs.end(); ++it ){ if (line.contains((*it).type())) - QMessageBox::information( this, (*it).type(), (*it).message() ); + TQMessageBox::information( this, (*it).type(), (*it).message() ); } logDialog->logBox->append(" * "+line); } @@ -837,7 +837,7 @@ void Wizard::readyReadStdout() { while (externalProcess->canReadLineStdout()) { - QString line = externalProcess->readLineStdout().latin1(); + TQString line = externalProcess->readLineStdout().latin1(); logDialog->logBox->append(line); if (currentStage == Configure) @@ -849,7 +849,7 @@ void Wizard::readyReadStdout() if (line.right(1) == "\\") continue; commandLine = commandLine.left(commandLine.find(';')); - for ( QValueList<ActionFormat>::Iterator it = actionFormats.begin(); it != actionFormats.end(); ++it ) + for ( TQValueList<ActionFormat>::Iterator it = actionFormats.begin(); it != actionFormats.end(); ++it ) { if ((*it).regExp.search(commandLine) == -1) continue; @@ -864,7 +864,7 @@ void Wizard::readyReadStdout() } } -void Wizard::updateTime(QString key) +void Wizard::updateTime(TQString key) { if (!timer.isNull()) { @@ -874,7 +874,7 @@ void Wizard::updateTime(QString key) int remainingTime = (int)((float)(totalBTime - elapsedBTime) * ratio) / 60000; if (remainingTime < 0) remainingTime = 0; - QString text = QString::number(remainingTime + 1) + " minutes"; + TQString text = TQString::number(remainingTime + 1) + " minutes"; if (remainingTime == 0) text = "1 minute"; timeRemaining->setText("Estimated time remaining: <b>" + text + "</b>"); @@ -883,11 +883,11 @@ void Wizard::updateTime(QString key) timer.start(); } -void Wizard::logLine(QString line) +void Wizard::logLine(TQString line) { - QString tmp = line; - QStringList lines = QStringList::split("\n", tmp); - for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) + TQString tmp = line; + TQStringList lines = TQStringList::split("\n", tmp); + for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { if ((*it).isEmpty()) continue; @@ -895,14 +895,14 @@ void Wizard::logLine(QString line) } } -void Wizard::setProgress2Text(QString text) +void Wizard::setProgress2Text(TQString text) { - QString croppedText = text; + TQString croppedText = text; int i = croppedText.length(); - QFont boldFont = progressLabel2->font(); + TQFont boldFont = progressLabel2->font(); boldFont.setBold(true); - QFontMetrics boldFontMetrics(boldFont); + TQFontMetrics boldFontMetrics(boldFont); while (boldFontMetrics.width(croppedText) > progressLabel2->width()) { croppedText = croppedText.left(--i); @@ -920,24 +920,24 @@ void Wizard::errorOccured() previousButton->setEnabled(true); } -QString Wizard::sub(QString s) +TQString Wizard::sub(TQString s) { - QString tmp = s; - tmp.replace(QRegExp("\\$KDEDIR"), kdeDir); - tmp.replace(QRegExp("\\$HOMEDIR"), QDir::homeDirPath()); - tmp.replace(QRegExp("~"), QDir::homeDirPath()); - tmp.replace(QRegExp("\\$PREFIX"), "/usr/local"); + TQString tmp = s; + tmp.replace(TQRegExp("\\$KDEDIR"), kdeDir); + tmp.replace(TQRegExp("\\$HOMEDIR"), TQDir::homeDirPath()); + tmp.replace(TQRegExp("~"), TQDir::homeDirPath()); + tmp.replace(TQRegExp("\\$PREFIX"), "/usr/local"); return tmp; } void Wizard::runPressed() { - QProcess* proc = new QProcess(this); + TQProcess* proc = new TQProcess(this); proc->addArgument(exec); if (!proc->start()) { - QMessageBox::warning(this, "Warning", "The application could not be started<br>"+exec, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + TQMessageBox::warning(this, "Warning", "The application could not be started<br>"+exec, TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton); } } |