From 289d6f8596e307372a10e3b3851ea44f6be6fddb Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Date: Thu, 4 Jun 2009 10:38:49 +0200
Subject: [PATCH] nicer

---
 src/plugins/debugger/gdb/gdbengine.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 9b0ae33cf80..b84f891c1e9 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1494,8 +1494,7 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
 
     QString scriptFileName = theDebuggerStringSetting(GdbScriptFile);
     if (!scriptFileName.isEmpty()) {
-        QFile scriptFile(scriptFileName);
-        if (scriptFile.open(QIODevice::ReadOnly)) {
+        if (QFileInfo(scriptFileName).isReadable()) {
             postCommand(_("source ") + scriptFileName);
         } else {
             QMessageBox::warning(q->mainWindow(),
-- 
GitLab