Commit c9af39eb authored by Eike Ziller's avatar Eike Ziller
Browse files

Examples: Better check for non-writable location

Checking the .pro file is actually not too relevant, so extend the check
to the .pro files directory, and more importantly, to the directory
above, which will be used as the default location for shadow build

Change-Id: I867118902abb2cf4b621e976b6ba953ef8f0431a
Reviewed-by: default avatarDaniel Teske <>
parent 63373ecc
......@@ -403,9 +403,13 @@ void ExamplesWelcomePage::openProject(const QString &projectFile,
if (!proFileInfo.exists())
QFileInfo pathInfo(proFileInfo.path());
// If the Qt is a distro Qt on Linux, it will not be writable, hence compilation will fail
if (!proFileInfo.isWritable())
if (!proFileInfo.isWritable()
|| !pathInfo.isWritable() /* path of .pro file */
|| !QFileInfo(pathInfo.path()).isWritable() /* shadow build directory */) {
proFile = copyToAlternativeLocation(proFileInfo, filesToOpen, dependencies);
// don't try to load help and files if loading the help request is being cancelled
QString errorMessage;
Supports Markdown
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