Port the compile output window away from HTML to QTextCharFormat

Is more then twice as fast
This commit is contained in:
dt
2010-06-08 15:04:42 +02:00
parent d807b14c85
commit 181cecbb32
14 changed files with 98 additions and 55 deletions

View File

@@ -114,7 +114,8 @@ bool MaemoPackageCreationStep::createPackage()
if (!packagingNeeded())
return true;
emit addOutput(tr("Creating package file ..."));
QTextCharFormat textCharFormat;
emit addOutput(tr("Creating package file ..."), textCharFormat);
QFile configFile(targetRoot() % QLatin1String("/config.sh"));
if (!configFile.open(QIODevice::ReadOnly)) {
raiseError(tr("Cannot open MADDE config file '%1'.")
@@ -213,14 +214,15 @@ bool MaemoPackageCreationStep::createPackage()
return false;
}
emit addOutput(tr("Package created."));
emit addOutput(tr("Package created."), textCharFormat);
m_packageContents->setUnModified();
return true;
}
bool MaemoPackageCreationStep::runCommand(QProcess &proc, const QString &command)
{
emit addOutput(tr("Package Creation: Running command '%1'.").arg(command));
QTextCharFormat textCharFormat;
emit addOutput(tr("Package Creation: Running command '%1'.").arg(command), textCharFormat);
QString perl;
#ifdef Q_OS_WIN
perl = maddeRoot() + QLatin1String("/bin/perl.exe ");
@@ -323,7 +325,8 @@ QString MaemoPackageCreationStep::nativePath(const QFile &file) const
void MaemoPackageCreationStep::raiseError(const QString &shortMsg,
const QString &detailedMsg)
{
emit addOutput(detailedMsg.isNull() ? shortMsg : detailedMsg);
QTextCharFormat textCharFormat;
emit addOutput(detailedMsg.isNull() ? shortMsg : detailedMsg, textCharFormat);
emit addTask(Task(Task::Error, shortMsg, QString(), -1,
TASK_CATEGORY_BUILDSYSTEM));
}