From 328fc788a3834265ed177b82d0bc030091168742 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 6 Feb 2010 19:00:18 +0100 Subject: [PATCH] Fix missing console page in bat --- bacula/src/qt-console/main.cpp | 4 ++++ bacula/src/qt-console/mainwin.cpp | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bacula/src/qt-console/main.cpp b/bacula/src/qt-console/main.cpp index f212c03b19..492de11437 100644 --- a/bacula/src/qt-console/main.cpp +++ b/bacula/src/qt-console/main.cpp @@ -82,6 +82,10 @@ int main(int argc, char *argv[]) textdomain("bacula"); #endif +#ifdef HAVE_WIN32 + set_trace(true); /* output to trace file */ +#endif + init_stack_dump(); my_name_is(argc, argv, "bat"); lmgr_init_thread(); diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 8859416f52..61ce6b44db 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -94,10 +94,11 @@ MainWin::MainWin(QWidget *parent) : QMainWindow(parent) readSettings(); - foreach(Console *console, m_consoleHash) + foreach(Console *console, m_consoleHash) { console->connect_dir(); + } m_currentConsole = (Console*)getFromHash(m_firstItem); - QTimer::singleShot(750, this, SLOT(popLists())); + QTimer::singleShot(5000, this, SLOT(popLists())); if (m_miscDebug) { QString directoryResourceName; m_currentConsole->getDirResName(directoryResourceName); @@ -108,8 +109,9 @@ MainWin::MainWin(QWidget *parent) : QMainWindow(parent) void MainWin::popLists() { - foreach(Console *console, m_consoleHash) + foreach(Console *console, m_consoleHash) { console->populateLists(true); + } m_doConnect = true; connectConsoleSignals(); connectSignals(); @@ -155,7 +157,6 @@ void MainWin::createPages() */ QBrush redBrush(Qt::red); item->setForeground(0, redBrush); - m_currentConsole->dockPage(); /* * Create instances in alphabetic order of the rest @@ -182,6 +183,8 @@ void MainWin::createPages() treeWidget->expandItem(topItem); tabWidget->setCurrentWidget(m_currentConsole); + m_currentConsole->undockPage(); + m_currentConsole->dockPage(); } UnlockRes(); } -- 2.39.5