summaryrefslogtreecommitdiffstats
path: root/src/arkollon/wizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/arkollon/wizard.cpp')
-rw-r--r--src/arkollon/wizard.cpp254
1 files changed, 127 insertions, 127 deletions
diff --git a/src/arkollon/wizard.cpp b/src/arkollon/wizard.cpp
index ba267a6..a15491b 100644
--- a/src/arkollon/wizard.cpp
+++ b/src/arkollon/wizard.cpp
@@ -19,31 +19,31 @@
***************************************************************************/
#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 <tqfiledialog.h>
+#include <tqwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqpainter.h>
+#include <tqheader.h>
+#include <tqapplication.h>
+#include <tqmessagebox.h>
+#include <tqprogressbar.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqhbox.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqfontmetrics.h>
+#include <tqcheckbox.h>
#include "data.h"
#include "rcparser.h"
#include "headerlistitem.h"
-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);
@@ -59,7 +59,7 @@ ComponentListItem::ComponentListItem(struct Component c, QListView* parent)
section=0;
}
-int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const
+int ComponentListItem::compare(TQListViewItem* i, int col, bool ascending) const
{
switch (i->rtti())
{
@@ -70,7 +70,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;
@@ -88,13 +88,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()));
@@ -105,7 +105,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");
@@ -140,7 +140,7 @@ void Wizard::kdeDirReady()
{
while (kdeDirProcess->canReadLineStdout())
{
- QString line = kdeDirProcess->readLineStdout();
+ TQString line = kdeDirProcess->readLineStdout();
if (!line.isEmpty())
kdeDir = line;
}
@@ -148,15 +148,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");
@@ -170,7 +170,7 @@ void Wizard::installedComponentsReady()
{
while (installedComponentsProcess->canReadLineStdout())
{
- QString line = installedComponentsProcess->readLineStdout();
+ TQString line = installedComponentsProcess->readLineStdout();
if (line.isEmpty())
continue;
@@ -185,7 +185,7 @@ void Wizard::installedComponentsReady()
void Wizard::setup()
{
- QFile uninstallScript("/tmp/arkollon-uninstall.sh");
+ TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists())
uninstallScript.remove();
@@ -194,14 +194,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();
}
@@ -209,7 +209,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;
}
@@ -223,37 +223,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);
@@ -271,15 +271,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)
@@ -305,13 +305,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);
@@ -329,18 +329,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);
@@ -358,13 +358,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;
@@ -379,13 +379,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>";
@@ -396,13 +396,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;
@@ -422,32 +422,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 KlamAV.desktop");
- QFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall KlamAV.desktop");
+ TQFile source(dir + "/Uninstall KlamAV.desktop");
+ TQFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall KlamAV.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();
@@ -465,7 +465,7 @@ void Wizard::nextPressed()
{
bool itemsSelected = false;
- QListViewItemIterator it( componentList );
+ TQListViewItemIterator it( componentList );
while ( it.current() )
{
if (it.current()->rtti() != 1001)
@@ -480,7 +480,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;
}
}
@@ -524,9 +524,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)
@@ -540,7 +540,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();
}
@@ -554,7 +554,7 @@ void Wizard::startProcess()
currentComponent = 0;
currentStage = None;
- currentIsQMake = false;
+ currentIsTQMake = false;
nextStep();
}
@@ -572,24 +572,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
{
@@ -608,7 +608,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("");
@@ -617,7 +617,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;
}
@@ -634,8 +634,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);
@@ -685,25 +685,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';
@@ -715,8 +715,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");
@@ -733,7 +733,7 @@ void Wizard::nextStep()
{
currentStage = None;
currentComponent++;
- currentIsQMake = false;
+ currentIsTQMake = false;
if (currentComponent >= selectedComponents.count())
{
progressLabel1->setText("<b>Installation completed!</b>");
@@ -766,11 +766,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();
}
@@ -782,7 +782,7 @@ void Wizard::processExited()
}
if (externalProcess->exitStatus() != 0)
{
- logLine("Return value " + QString::number(externalProcess->exitStatus()));
+ logLine("Return value " + TQString::number(externalProcess->exitStatus()));
errorOccured();
return;
}
@@ -795,7 +795,7 @@ void Wizard::readyReadStderr()
{
while (externalProcess->canReadLineStderr())
{
- QString line = externalProcess->readLineStderr().latin1();
+ TQString line = externalProcess->readLineStderr().latin1();
logDialog->logBox->append(" * "+line);
}
}
@@ -804,7 +804,7 @@ void Wizard::readyReadStdout()
{
while (externalProcess->canReadLineStdout())
{
- QString line = externalProcess->readLineStdout().latin1();
+ TQString line = externalProcess->readLineStdout().latin1();
logDialog->logBox->append(line);
if (currentStage == Configure)
@@ -816,7 +816,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;
@@ -831,7 +831,7 @@ void Wizard::readyReadStdout()
}
}
-void Wizard::updateTime(QString key)
+void Wizard::updateTime(TQString key)
{
if (!timer.isNull())
{
@@ -841,7 +841,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>");
@@ -850,11 +850,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;
@@ -862,14 +862,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);
@@ -887,24 +887,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);
}
}