From: Kern Sibbald Date: Sat, 6 Feb 2010 18:00:18 +0000 (+0100) Subject: Fix missing console page in bat X-Git-Tag: Release-5.0.1~124 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8f0a782eea4a149228ee334cf15a5d0dc78f0138;p=bacula%2Fbacula Fix missing console page in bat --- 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(); }