Git: Do not rely on QProcess::readData/writeData in MergeTool

readData always returns 0 in Qt 5.7 (unless the process is not
running)...

Instead, write to the VCS output pane when reading from/writing to the
process.

Change-Id: Ie832d813d5a859b4ff5841fd2888783833c97945
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2016-09-20 11:05:03 +03:00
committed by Orgad Shaneh
parent 0c187a2b12
commit c64b3f9882
2 changed files with 18 additions and 32 deletions

View File

@@ -30,12 +30,12 @@
QT_BEGIN_NAMESPACE
class QMessageBox;
class QProcess;
QT_END_NAMESPACE
namespace Git {
namespace Internal {
class MergeToolProcess;
class GitClient;
class MergeTool : public QObject
@@ -67,6 +67,7 @@ private:
void prompt(const QString &title, const QString &question);
void readData();
void done();
void write(const QByteArray &bytes);
FileState waitAndReadStatus(QString &extraInfo);
QString mergeTypeName();
@@ -74,7 +75,7 @@ private:
void chooseAction();
void addButton(QMessageBox *msgBox, const QString &text, char key);
MergeToolProcess *m_process = nullptr;
QProcess *m_process = nullptr;
MergeType m_mergeType = NormalMerge;
QString m_fileName;
FileState m_localState = UnknownState;