]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/pages.cpp
Fix bat seg fault
[bacula/bacula] / bacula / src / qt-console / pages.cpp
index 49321898149d39cd325fd2a0dc41a2b175edf000..8537604b029a31d0f9ffa4c0870a571867bb49e0 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -51,6 +51,23 @@ bool isWin32Path(QString &fullPath)
    return toret;
 }
 
+/* Need to initialize variables here */
+Pages::Pages()
+{
+   m_docked = false;
+   m_onceDocked = false;
+   m_closeable = true;
+   m_dockOnFirstUse = true;
+}
+
+/* first Use Dock */
+void Pages::firstUseDock()
+{
+   if (!m_onceDocked && m_dockOnFirstUse) {
+      dockPage();
+   }
+}
+
 /*
  * dockPage
  * This function is intended to be called from within the Pages class to pull
@@ -272,7 +289,7 @@ void Pages::consoleCommand(QString &command, bool setCurrent)
 {
    int conn;
    bool donotify = false;
-   if (m_console->availableDirComm(conn))  {
+   if (m_console->getDirComm(conn))  {
       if (m_console->is_notify_enabled(conn)) {
          donotify = true;
          m_console->notify(conn, false);