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