]> git.sur5r.net Git - bacula/bacula/commitdiff
dhb Don't modify the incoming string. This can cause issues.
authorDirk H Bartley <dbartley@schupan.com>
Sun, 25 Mar 2007 22:28:16 +0000 (22:28 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Sun, 25 Mar 2007 22:28:16 +0000 (22:28 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4420 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/console/console.cpp

index 6c8020f25d3e661094d4cc0c0463db3ff967b57c..d6d8a8e723b821a38d34a1b639174bd080a8acd7 100644 (file)
@@ -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");