diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index 7a6ab92ff688ef2a359f2ca7052635f7e9d20865..4268c645ccc5938cd7fa7de2af3c9d4891c16ee3 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -403,9 +403,13 @@ void ExamplesWelcomePage::openProject(const QString &projectFile, if (!proFileInfo.exists()) return; + 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;