forked from qt-creator/qt-creator
Git: Fix branch expansion on show before the diff display is done
The description is shown first (with the <Expand> placeholder), and the diff parsing can be long. If <Expand> is clicked during parsing, it fails because the base directory is not set yet. Change-Id: Ib5e839b292c32091c726f24eb643d0fa5a142cb7 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
2b650f713a
commit
eaf8ccf118
@@ -113,7 +113,8 @@ void DiffEditorDocument::setDiffFiles(const QList<FileData> &data, const QString
|
||||
const QString &startupFile)
|
||||
{
|
||||
m_diffFiles = data;
|
||||
m_baseDirectory = directory;
|
||||
if (!directory.isEmpty())
|
||||
m_baseDirectory = directory;
|
||||
m_startupFile = startupFile;
|
||||
emit documentChanged();
|
||||
}
|
||||
@@ -128,6 +129,11 @@ QString DiffEditorDocument::baseDirectory() const
|
||||
return m_baseDirectory;
|
||||
}
|
||||
|
||||
void DiffEditorDocument::setBaseDirectory(const QString &directory)
|
||||
{
|
||||
m_baseDirectory = directory;
|
||||
}
|
||||
|
||||
QString DiffEditorDocument::startupFile() const
|
||||
{
|
||||
return m_startupFile;
|
||||
|
||||
Reference in New Issue
Block a user