]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/restore/restoretree.cpp
Fix another bat seg fault
[bacula/bacula] / bacula / src / qt-console / restore / restoretree.cpp
index 094fc73d83c6a1c240ea92f9360657310b6c74a7..82fd10ad80de9286d1ea1514e89ace09deb24604 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.
@@ -47,10 +47,8 @@ restoreTree::restoreTree()
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0, QIcon(QString::fromUtf8(":images/browse.png")));
 
-   m_closeable = true;
    m_populated = false;
 
-   dockPage();
    m_debugCnt = 0;
    m_debugTrap = true;
 
@@ -64,9 +62,9 @@ restoreTree::restoreTree()
    area->setObjectName(QString::fromUtf8("area"));
    area->setWidget(widget);
    area->setWidgetResizable(true);
-   m_splitter->addWidget(splitter);
    m_splitter->addWidget(area);
-   splitter->setCollapsible(0, false);
+   m_splitter->addWidget(splitter);
+   splitter->setChildrenCollapsible(false);
 
    gridLayout->addWidget(m_splitter, 0, 0, 1, 1);
 
@@ -277,6 +275,8 @@ void restoreTree::populateDirectoryTree()
                fieldcnt += 1;
             }
          }
+      } else {
+         return;
       }
    } else {
      QMessageBox::warning(this, "Bat",
@@ -1857,3 +1857,11 @@ int restoreTree::queryFileIndex(QString &fullPath, int jobId)
    } /* if (index != -1) */
    return qfileIndex;
 }
+
+
+void restoreTree::PgSeltreeWidgetClicked()
+{
+   if (!isOnceDocked()) {
+      dockPage();
+   }
+}