From f87d54ff8b92f7c619ce385f450cade6c57593fb Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Sun, 25 Mar 2007 22:28:16 +0000 Subject: [PATCH] dhb Don't modify the incoming string. This can cause issues. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4420 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/console/console.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index 6c8020f25d..d6d8a8e723 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -587,11 +587,13 @@ void Console::setDirRes(DIRRES *dir) QStringList* Console::dosql(QString* sqlcmd) { int stat; + /* don't effect the string coming in */ + QString cmd(*sqlcmd); QStringList* strlstret = new QStringList; - *sqlcmd = ".sql \"" + *sqlcmd + "\""; + cmd = ".sql \"" + cmd + "\""; - write_dir(sqlcmd->toUtf8().data()); + write_dir(cmd.toUtf8().data()); while ((stat=read()) > 0) { QString line = msg(); QRegExp regex("^Using Catalog"); -- 2.39.5