Commit c0db9cc9 authored by Lukas Appelhans's avatar Lukas Appelhans

Rename to avoid conflicts

parent 590ff7f2
......@@ -104,7 +104,7 @@ void PlainHookOperation::Private::process()
ChrootedProcess * process = new ChrootedProcess(q, root);
q->connect(process, SIGNAL(errorsOccured(QList<Akabei::Error*>)), SLOT(slotErrors(QList<Akabei::Error*>)));
q->connect(process, SIGNAL(finished(bool)), SLOT(slotFinished(bool)));
q->connect(process, SIGNAL(scriptFinished(bool)), SLOT(slotFinished(bool)));
q->connect(process, SIGNAL(addMessage(QString)), SLOT(slotMessage(QString)));
qDebug() << "Run" << QString("sh %1").arg((*it)->path());
process->run(QString("sh %1").arg((*it)->path()));
......
......@@ -64,11 +64,11 @@ void ChrootedProcess::slotFinished(int exitCode)
}
if (exitCode == 0 || m_operation->processingOptions().testFlag(Akabei::Force)) {
// Good.
emit finished(true);
emit scriptFinished(true);
} else {
// Bad.
emit errorsOccured(QList<Error*>() << new Akabei::Error(Akabei::Error::ScripletError, tr("Scriptlet failed to executed properly"), m_operation));
emit finished(false);
emit scriptFinished(false);
}
deleteLater();
}
......@@ -85,9 +85,8 @@ void ChrootedProcess::slotReadyRead()
void ChrootedProcess::slotError(QProcess::ProcessError error)
{
qDebug() << "Error occured" << error;
emit errorsOccured(QList<Akabei::Error*>() << new Akabei::Error(Akabei::Error::ScripletError, tr("The scriplet for the following package failed to execute") + m_operation->targetName()));
emit finished(false);
emit errorsOccured(QList<Akabei::Error*>() << new Akabei::Error(Akabei::Error::ScripletError, tr("The scriplet for the following package failed to execute: %1").arg(m_operation->targetName())));
emit scriptFinished(false);
}
class PlainScriptletOperation::Private
......@@ -136,7 +135,7 @@ void PlainScriptletOperation::run()
d->process = new ChrootedProcess(this, root);
connect(d->process, SIGNAL(errorsOccured(QList<Akabei::Error*>)), SLOT(slotErrors(QList<Akabei::Error*>)));
connect(d->process, SIGNAL(finished(bool)), SLOT(slotFinished(bool)));
connect(d->process, SIGNAL(scriptFinished(bool)), SLOT(slotFinished(bool)));
connect(d->process, SIGNAL(addMessage(QString)), SLOT(slotMessage(QString)));
QString toRun = QString("sh %1 %2").arg(d->temp->fileName(), d->args.join(QChar(' ')));
d->process->run(toRun, d->temp);
......@@ -156,6 +155,7 @@ void PlainScriptletOperation::slotErrors(QList< Error* > errs)
void PlainScriptletOperation::slotFinished(bool fin)
{
qDebug() << "Set finished:" << fin;
setFinished(fin);
}
......
......@@ -38,7 +38,7 @@ class ChrootedProcess : public QProcess
signals:
void errorsOccured(QList<Akabei::Error*> errors);
void finished(bool fin);
void scriptFinished(bool fin);
void addMessage(const QString &mes);
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment