From: Kern Sibbald Date: Mon, 12 May 2008 21:28:50 +0000 (+0000) Subject: Allow --without-qwt configure option X-Git-Tag: Release-3.0.0~1439 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5eb6c1066fa62bc4511e57eedf510fee8003cc88;p=bacula%2Fbacula Allow --without-qwt configure option git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6959 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/aclocal.m4 b/bacula/autoconf/aclocal.m4 index a1c61deb13..148a8f058f 100644 --- a/bacula/autoconf/aclocal.m4 +++ b/bacula/autoconf/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index c39f2e00c7..d61c45399d 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -275,6 +275,7 @@ QWT_INC= QWT_LDFLAGS= QWT_LIB= QWT= +no_qwt=no if test x$support_bat = xyes; then AC_MSG_CHECKING(for qwt support) AC_ARG_WITH(qwt, @@ -282,6 +283,7 @@ if test x$support_bat = xyes; then [ case "$with_qwt" in no) + no_qwt=yes ;; yes|*) if test -f ${with_qwt}/include/qwt.h; then @@ -297,7 +299,8 @@ if test x$support_bat = xyes; then # # Search in standard places, or --with-qwt not specified # - if test x$QWT_INC = x; then + if test $no_qwt = no; then + if test x$QWT_INC = x; then for root in /usr /usr/local; do for ver in qwt qwt5 qwt-qt4; do if test -f ${root}/include/${ver}/qwt.h; then @@ -314,6 +317,7 @@ if test x$support_bat = xyes; then fi done done + fi fi if test x$QWT_INC = x; then AC_MSG_RESULT(no) diff --git a/bacula/configure b/bacula/configure index b7817aac83..8be86793c6 100755 --- a/bacula/configure +++ b/bacula/configure @@ -13530,6 +13530,7 @@ QWT_INC= QWT_LDFLAGS= QWT_LIB= QWT= +no_qwt=no if test x$support_bat = xyes; then { echo "$as_me:$LINENO: checking for qwt support" >&5 echo $ECHO_N "checking for qwt support... $ECHO_C" >&6; } @@ -13539,6 +13540,7 @@ if test "${with_qwt+set}" = set; then withval=$with_qwt; case "$with_qwt" in no) + no_qwt=yes ;; yes|*) if test -f ${with_qwt}/include/qwt.h; then @@ -13556,7 +13558,8 @@ fi # # Search in standard places, or --with-qwt not specified # - if test x$QWT_INC = x; then + if test $no_qwt = no; then + if test x$QWT_INC = x; then for root in /usr /usr/local; do for ver in qwt qwt5 qwt-qt4; do if test -f ${root}/include/${ver}/qwt.h; then @@ -13573,6 +13576,7 @@ fi fi done done + fi fi if test x$QWT_INC = x; then { echo "$as_me:$LINENO: result: no" >&5 diff --git a/bacula/src/qt-console/clients/clients.cpp b/bacula/src/qt-console/clients/clients.cpp index 66c4f2c2c1..e38e7e4c39 100644 --- a/bacula/src/qt-console/clients/clients.cpp +++ b/bacula/src/qt-console/clients/clients.cpp @@ -96,7 +96,7 @@ void Clients::populateTable() " FROM Client" " WHERE "; query += " Name='" + clientName + "'"; - query += " ORDER BY Name"; + query += " ORDER BY ClientId LIMIT 1"; QStringList results; /* This could be a log item */ @@ -105,24 +105,23 @@ void Clients::populateTable() } if (m_console->sql_cmd(query, results)) { int resultCount = results.count(); - if (resultCount == 1){ + if (resultCount){ QString resultline; QString field; QStringList fieldlist; - /* there will only be one of these */ - foreach (resultline, results) { - fieldlist = resultline.split("\t"); - int column = 0; - /* Iterate through fields in the record */ - foreach (field, fieldlist) { - field = field.trimmed(); /* strip leading & trailing spaces */ - tableItem = new QTableWidgetItem(field, 1); - tableItem->setFlags(Qt::ItemIsSelectable); - tableItem->setForeground(blackBrush); - tableItem->setData(Qt::UserRole, 1); - tableWidget->setItem(row, column, tableItem); - column++; - } + resultline = results[resultCount - 1]; + fieldlist = resultline.split("\t"); + + int column = 0; + /* Iterate through fields in the record */ + foreach (field, fieldlist) { + field = field.trimmed(); /* strip leading & trailing spaces */ + tableItem = new QTableWidgetItem(field, 1); + tableItem->setFlags(Qt::ItemIsSelectable); + tableItem->setForeground(blackBrush); + tableItem->setData(Qt::UserRole, 1); + tableWidget->setItem(row, column, tableItem); + column++; } } } diff --git a/bacula/src/qt-console/restore/restore.ui b/bacula/src/qt-console/restore/restore.ui index 4e38e20e78..6fa9748cd0 100644 --- a/bacula/src/qt-console/restore/restore.ui +++ b/bacula/src/qt-console/restore/restore.ui @@ -13,316 +13,184 @@ Form - - 9 - - - 6 - - - - - 0 + + + + Qt::Horizontal - - 6 + + QSizePolicy::Preferred - - - - - 0 - 0 - 0 - 0 - - - - Current Dir: - - - lineEdit - - - - - - - - 100 - 0 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 30 - 32 - - - - - - - - OK - - - - - - - Cancel - - - - + + + 50 + 30 + + + - - - - 0 + + + + <h2>Directories</h2> - - 6 + + + + + + Qt::Horizontal - - - - - 0 - 0 - 0 - 0 - - - - Status: - - - - - - - - 0 - 0 - 0 - 0 - - - - - - - - + + QSizePolicy::Expanding + + + + 16 + 30 + + + - - - - 0 + + + + + 16777215 + 41 + - - 6 + + <h3>Restore Select</h3> - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 50 - 30 - - - - - - - - <h2>Directories</h2> - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 16 - 30 - - - - - - - - - 16777215 - 41 - - - - <h3>Restore Select</h3> - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 16 - 20 - - - - - - - - - 0 - 0 - 0 - 0 - - - - - 35 - 0 - - - - Up - - - :/images/up.png - - - - - - - - 0 - 0 - 0 - 0 - - - - - 35 - 0 - - - - Mark - - - :/images/check.png - - - - - - - - 0 - 0 - 0 - 0 - - - - - 50 - 0 - - - - Unmark - - - :/images/unchecked.png - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 61 - 20 - - - - - - - - <h2>Files</h2> - - - - - - - Qt::Horizontal - - - - 100 - 30 - - - - - + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 16 + 20 + + + + + + + + + 0 + 0 + + + + + 35 + 0 + + + + Up + + + :/images/up.png + + + + + + + + 0 + 0 + + + + + 35 + 0 + + + + Mark + + + :/images/check.png + + + + + + + + 0 + 0 + + + + + 50 + 0 + + + + Unmark + + + :/images/unchecked.png + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 61 + 20 + + + + + + + + <h2>Files</h2> + + + + + + + Qt::Horizontal + + + + 100 + 30 + + + - + Qt::Horizontal - - 0 - 0 + 1 1 @@ -365,9 +233,7 @@ - - 0 - 0 + 144 1 @@ -437,6 +303,126 @@ + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Current Dir: + + + lineEdit + + + + + + + + 100 + 0 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 30 + 32 + + + + + + + + OK + + + + + + + Cancel + + + + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Status: + + + + + + + + 0 + 0 + + + + + + + + +