Speed up opening .pro files on windows for some users

If the build directory is empty, which can happen if we are parsing
a completely unconfigured project, then UIDIR might end up being '/'.

The uiHeaderFile function appeneded /ui_XXX.h to that, leading to
a network path.

Fix that by ensuring in various places that we handle this case.

Task-number: QTCREATORBUG-10733
Change-Id: Ib848ed4efbeacc6ee7ff862bef861a58f6d3ea34
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-07-22 12:28:46 +02:00
parent d765cd73a2
commit 518720e06e
3 changed files with 22 additions and 14 deletions

View File

@@ -896,7 +896,9 @@ QString QmakeProject::generatedUiHeader(const FileName &formFile) const
// the top-level project only.
if (m_rootProjectNode)
if (const QmakeProFileNode *pro = proFileNodeOf(m_rootProjectNode, FormType, formFile))
return QmakeProFileNode::uiHeaderFile(pro->uiDirectory(pro->buildDir()), formFile);
return QmakeProFileNode::uiHeaderFile(
pro->uiDirectory(Utils::FileName::fromString(pro->buildDir())),
formFile);
return QString();
}