forked from qt-creator/qt-creator
Squish: Fix querying server
Broke with switching the stdout handling from handling it
directly to using a callback in 27c8e2a638
.
Change-Id: I69a9058b92807b0a4083b242eb7e4e982baa9096
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -117,7 +117,7 @@ class SquishServerSettings : public AspectContainer
|
||||
public:
|
||||
SquishServerSettings();
|
||||
|
||||
void setFromXmlOutput(const QByteArray &output);
|
||||
void setFromXmlOutput(const QString &output);
|
||||
|
||||
QMap<QString, QString> mappedAuts; // name, path
|
||||
QMap<QString, QString> attachableAuts; // name, host:port
|
||||
@@ -181,7 +181,7 @@ InfoMode infoModeFromType(const QString &type)
|
||||
return None;
|
||||
}
|
||||
|
||||
void SquishServerSettings::setFromXmlOutput(const QByteArray &output)
|
||||
void SquishServerSettings::setFromXmlOutput(const QString &output)
|
||||
{
|
||||
SquishServerSettings newSettings;
|
||||
InfoMode infoMode = None;
|
||||
@@ -403,7 +403,7 @@ SquishServerSettingsWidget::SquishServerSettingsWidget(QWidget *parent)
|
||||
// query settings
|
||||
SquishTools *squishTools = SquishTools::instance();
|
||||
connect(squishTools, &SquishTools::queryFinished, this,
|
||||
[this, progress] (const QByteArray &out) {
|
||||
[this, progress] (const QString &out) {
|
||||
m_serverSettings.setFromXmlOutput(out);
|
||||
m_originalSettings.setFromXmlOutput(out);
|
||||
repopulateApplicationView();
|
||||
|
@@ -202,6 +202,7 @@ void SquishTools::queryServerSettings()
|
||||
return;
|
||||
}
|
||||
m_squishRunnerMode = QueryMode;
|
||||
m_fullRunnerOutput.clear();
|
||||
startSquishServer(RunnerQueryRequested);
|
||||
}
|
||||
|
||||
@@ -497,8 +498,9 @@ void SquishTools::onServerFinished()
|
||||
void SquishTools::onRunnerFinished()
|
||||
{
|
||||
if (m_squishRunnerMode == QueryMode) {
|
||||
emit queryFinished(m_runnerProcess.readAllStandardOutput());
|
||||
emit queryFinished(m_fullRunnerOutput);
|
||||
setState(RunnerStopped);
|
||||
m_fullRunnerOutput.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -663,8 +665,10 @@ void SquishTools::onRunnerErrorOutput()
|
||||
|
||||
void SquishTools::onRunnerStdOutput(const QString &lineIn)
|
||||
{
|
||||
if (m_request == RunnerQueryRequested) // only handle test runs here
|
||||
if (m_request == RunnerQueryRequested) { // only handle test runs here
|
||||
m_fullRunnerOutput.append(lineIn); // but store output for query, see onRunnerFinished()
|
||||
return;
|
||||
}
|
||||
|
||||
int fileLine = -1;
|
||||
int fileColumn = -1;
|
||||
|
@@ -61,7 +61,7 @@ signals:
|
||||
void squishTestRunStarted();
|
||||
void squishTestRunFinished();
|
||||
void resultOutputCreated(const QByteArray &output);
|
||||
void queryFinished(const QByteArray &output);
|
||||
void queryFinished(const QString &output);
|
||||
void configChangesFailed(QProcess::ProcessError error);
|
||||
void configChangesWritten();
|
||||
void localsUpdated(const QString &output);
|
||||
@@ -122,6 +122,7 @@ private:
|
||||
QStringList m_testCases;
|
||||
QStringList m_reportFiles;
|
||||
QString m_currentResultsDirectory;
|
||||
QString m_fullRunnerOutput; // used when querying the server
|
||||
Utils::FilePath m_currentTestCasePath;
|
||||
QFile *m_currentResultsXML = nullptr;
|
||||
QFileSystemWatcher *m_resultsFileWatcher = nullptr;
|
||||
|
Reference in New Issue
Block a user