forked from qt-creator/qt-creator
Git: Increase delay for mergetool
On Windows it takes more than 500ms to retrieve the first line. Really wait until we have an entire line then read. Change-Id: I9f7c222c314ea977179ed549281ef145ba756c73 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
6dca1499ac
commit
7740c31746
@@ -119,8 +119,13 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
|
|||||||
MergeTool::FileState MergeTool::waitAndReadStatus(QString &extraInfo)
|
MergeTool::FileState MergeTool::waitAndReadStatus(QString &extraInfo)
|
||||||
{
|
{
|
||||||
QByteArray state;
|
QByteArray state;
|
||||||
if (m_process->canReadLine() || (m_process->waitForReadyRead(500) && m_process->canReadLine())) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
|
if (m_process->canReadLine()) {
|
||||||
state = m_process->readLine().trimmed();
|
state = m_process->readLine().trimmed();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
m_process->waitForReadyRead(500);
|
||||||
|
}
|
||||||
// " {local}: modified file"
|
// " {local}: modified file"
|
||||||
// " {remote}: deleted"
|
// " {remote}: deleted"
|
||||||
if (!state.isEmpty()) {
|
if (!state.isEmpty()) {
|
||||||
@@ -145,7 +150,6 @@ MergeTool::FileState MergeTool::waitAndReadStatus(QString &extraInfo)
|
|||||||
return SymbolicLinkState;
|
return SymbolicLinkState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return UnknownState;
|
return UnknownState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user