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 <>
Reviewed-by: default avatarChristiaan Janssen <>
parent 1dc7e0d3
......@@ -122,6 +122,17 @@ void QmlProject::parseProject(RefreshOptions options)
if (m_projectItem) {>setSourceDirectory(projectDir().path());
m_modelManager->updateSourceFiles(>files(), true);
QString mainFilePath =>mainFile();
if (!mainFilePath.isEmpty()) {
mainFilePath = projectDir().absoluteFilePath(mainFilePath);
if (!QFileInfo(mainFilePath).isReadable()) {
tr("Warning while loading project file %1.").arg(m_fileName));
tr("File '%' does not exist or is not readable.").arg(mainFilePath), true);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment