Skip to content
Snippets Groups Projects
Commit 2cf6cd6c authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlProject: Print a warning if the mainFile given is not readable


Change-Id: If5951bb3121b13287a3ccf9d684bf23e0673231c
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@nokia.com>
parent 1dc7e0d3
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,17 @@ void QmlProject::parseProject(RefreshOptions options)
if (m_projectItem) {
m_projectItem.data()->setSourceDirectory(projectDir().path());
m_modelManager->updateSourceFiles(m_projectItem.data()->files(), true);
QString mainFilePath = m_projectItem.data()->mainFile();
if (!mainFilePath.isEmpty()) {
mainFilePath = projectDir().absoluteFilePath(mainFilePath);
if (!QFileInfo(mainFilePath).isReadable()) {
messageManager->printToOutputPane(
tr("Warning while loading project file %1.").arg(m_fileName));
messageManager->printToOutputPane(
tr("File '%' does not exist or is not readable.").arg(mainFilePath), true);
}
}
}
m_rootNode->refresh();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment