forked from qt-creator/qt-creator
Maemo: Display UTFS server stderr output.
This will help us diagnose errors.
This commit is contained in:
@@ -110,6 +110,8 @@ void MaemoDeployStep::ctor()
|
||||
SLOT(handleMountError(QString)));
|
||||
connect(m_mounter, SIGNAL(reportProgress(QString)), this,
|
||||
SLOT(handleProgressReport(QString)));
|
||||
connect(m_mounter, SIGNAL(debugOutput(QString)), this,
|
||||
SLOT(handleMountDebugOutput(QString)));
|
||||
}
|
||||
|
||||
bool MaemoDeployStep::init()
|
||||
@@ -429,6 +431,12 @@ void MaemoDeployStep::handleMountError(const QString &errorMsg)
|
||||
raiseError(errorMsg);
|
||||
}
|
||||
|
||||
void MaemoDeployStep::handleMountDebugOutput(const QString &output)
|
||||
{
|
||||
if (!m_stopped)
|
||||
writeOutput(output, ErrorOutput);
|
||||
}
|
||||
|
||||
void MaemoDeployStep::setupMount()
|
||||
{
|
||||
Q_ASSERT(m_needsInstall || !m_filesToCopy.isEmpty());
|
||||
|
||||
@@ -94,6 +94,7 @@ private slots:
|
||||
void handleMounted();
|
||||
void handleUnmounted();
|
||||
void handleMountError(const QString &errorMsg);
|
||||
void handleMountDebugOutput(const QString &output);
|
||||
void handleProgressReport(const QString &progressMsg);
|
||||
void handleCopyProcessFinished(int exitStatus);
|
||||
void handleCleanupTimeout();
|
||||
|
||||
@@ -300,11 +300,22 @@ void MaemoRemoteMounter::startUtfsServers()
|
||||
SLOT(handleUtfsServerFinished(int,QProcess::ExitStatus)));
|
||||
connect(utfsServerProc.data(), SIGNAL(error(QProcess::ProcessError)),
|
||||
this, SLOT(handleUtfsServerError(QProcess::ProcessError)));
|
||||
connect(utfsServerProc.data(), SIGNAL(readyReadStandardError()), this,
|
||||
SLOT(handleUtfsServerStderr()));
|
||||
m_utfsServers << utfsServerProc;
|
||||
utfsServerProc->start(utfsServer(), utfsServerArgs);
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::handleUtfsServerStderr()
|
||||
{
|
||||
if (!m_stop) {
|
||||
QProcess * const proc = static_cast<QProcess *>(sender());
|
||||
const QByteArray &output = proc->readAllStandardError();
|
||||
emit debugOutput(QString::fromLocal8Bit(output));
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::handleUtfsServerError(QProcess::ProcessError)
|
||||
{
|
||||
if (m_stop || m_utfsServers.isEmpty())
|
||||
|
||||
@@ -76,6 +76,7 @@ signals:
|
||||
void unmounted();
|
||||
void error(const QString &reason);
|
||||
void reportProgress(const QString &progressOutput);
|
||||
void debugOutput(const QString &output);
|
||||
|
||||
private slots:
|
||||
void handleUploaderInitialized();
|
||||
@@ -90,6 +91,7 @@ private slots:
|
||||
void handleUtfsServerFinished(int exitCode,
|
||||
QProcess::ExitStatus exitStatus);
|
||||
void handleUtfsServerTimeout();
|
||||
void handleUtfsServerStderr();
|
||||
|
||||
private:
|
||||
void deployUtfsClient();
|
||||
|
||||
@@ -89,6 +89,8 @@ void MaemoRunControl::start()
|
||||
SLOT(handleRemoteProcessFinished(int)));
|
||||
connect(m_runner, SIGNAL(reportProgress(QString)), this,
|
||||
SLOT(handleProgressReport(QString)));
|
||||
connect(m_runner, SIGNAL(mountDebugOutput(QString)), this,
|
||||
SLOT(handleMountDebugOutput(QString)));
|
||||
m_runner->start();
|
||||
}
|
||||
}
|
||||
@@ -139,6 +141,11 @@ void MaemoRunControl::handleProgressReport(const QString &progressString)
|
||||
emit appendMessage(this, progressString, false);
|
||||
}
|
||||
|
||||
void MaemoRunControl::handleMountDebugOutput(const QString &output)
|
||||
{
|
||||
emit addToOutputWindowInline(this, output, true);
|
||||
}
|
||||
|
||||
bool MaemoRunControl::isRunning() const
|
||||
{
|
||||
return m_running;
|
||||
|
||||
@@ -65,6 +65,7 @@ private slots:
|
||||
void handleRemoteOutput(const QByteArray &output);
|
||||
void handleRemoteErrorOutput(const QByteArray &output);
|
||||
void handleProgressReport(const QString &progressString);
|
||||
void handleMountDebugOutput(const QString &output);
|
||||
|
||||
private:
|
||||
void setFinished();
|
||||
|
||||
@@ -69,6 +69,8 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent,
|
||||
SLOT(handleMounterError(QString)));
|
||||
connect(m_mounter, SIGNAL(reportProgress(QString)), this,
|
||||
SIGNAL(reportProgress(QString)));
|
||||
connect(m_mounter, SIGNAL(debugOutput(QString)), this,
|
||||
SIGNAL(mountDebugOutput(QString)));
|
||||
}
|
||||
|
||||
MaemoSshRunner::~MaemoSshRunner() {}
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
|
||||
signals:
|
||||
void error(const QString &error);
|
||||
void mountDebugOutput(const QString &output);
|
||||
void readyForExecution();
|
||||
void remoteOutput(const QByteArray &output);
|
||||
void remoteErrorOutput(const QByteArray &output);
|
||||
|
||||
Reference in New Issue
Block a user