From 073be111f48507f027256c6ecd6f11b19a2a18fc Mon Sep 17 00:00:00 2001 From: Amit Chaudhuri Date: Thu, 18 Apr 2013 08:59:31 +0100 Subject: Delay Qt ui construction The Qt ui will need to read the dive_table to populate widgets with dives. Gtk functionality in init_ui is required to parse the dives. Split init_ui to allow parsing to proceed and complete before Qt ui mainwindow constructor is called. Play with qDebug()'s printf style (Thiago!) Signed-off-by: Amit Chaudhuri Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 577b7fb67..e81d9deab 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -46,6 +46,10 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()) dive = new DiveItem(1,QString("01/03/13"),14.2, 29.0,QString("Wraysbury"),root); Q_UNUSED(dive) + + qDebug("dive_table checks - number of dives is %d", dive_table.nr); + qDebug("# allocated dives = %d, pre-existing = %d", + dive_table.allocated, dive_table.preexisting); } -- cgit v1.2.3-70-g09d2