From 177ed96b35c4004c2073570d7376ef2fe6582f17 Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@nokia.com> Date: Tue, 27 Mar 2012 18:35:40 +0200 Subject: [PATCH] WelcomePage: Make welcome page more resilient Do not try to open non-existant project files when asked to open an example. Change-Id: Ibcd106a0a8354f98998e61cafa3f5cd2ce2844b0 Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com> --- src/plugins/qtsupport/gettingstartedwelcomepage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index 0aae7088728..f9296c87270 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -401,6 +401,9 @@ void ExamplesWelcomePage::openProject(const QString &projectFile, const QStringL QStringList filesToOpen = additionalFilesToOpen; QFileInfo proFileInfo(proFile); + if (!proFileInfo.exists()) + return; + // If the Qt is a distro Qt on Linux, it will not be writable, hence compilation will fail if (!proFileInfo.isWritable()) proFile = copyToAlternativeLocation(proFileInfo, filesToOpen, dependencies); -- GitLab