From 6fecd84d4fa892d7464e710a9d97a590d4d14859 Mon Sep 17 00:00:00 2001 From: dmacvicar Date: Sat, 8 Dec 2007 01:02:44 +0000 Subject: [PATCH] YQPkgDescriptionDialog QT3_SUPPORT git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@42839 e0cc52ee-31ee-0310-8b87-e83c4596d67c --- src/pkg/YQPkgDescriptionDialog.cc | 44 +++++++++++++------------------ 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/src/pkg/YQPkgDescriptionDialog.cc b/src/pkg/YQPkgDescriptionDialog.cc index 708f372..780c201 100644 --- a/src/pkg/YQPkgDescriptionDialog.cc +++ b/src/pkg/YQPkgDescriptionDialog.cc @@ -18,22 +18,18 @@ /-*/ -#define QT3_SUPPORT 1 - #define y2log_component "qt-pkg" #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//Added by qt3to4: -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "YQPkgDescriptionDialog.h" #include "YQPkgDescriptionView.h" @@ -51,14 +47,16 @@ YQPkgDescriptionDialog::YQPkgDescriptionDialog( QWidget * parent, const QString : QDialog( parent ) { // Dialog title - setCaption( _( "Package Description" ) ); + setWindowTitle( _( "Package Description" ) ); // Enable dialog resizing even without window manager setSizeGripEnabled( true ); // Layout for the dialog (can't simply insert a QVBox) - Q3VBoxLayout * layout = new Q3VBoxLayout( this, MARGIN, SPACING ); + QVBoxLayout * layout = new QVBoxLayout( this ); + layout->setMargin(MARGIN); + layout->setSpacing(SPACING); Q_CHECK_PTR( layout ); @@ -67,8 +65,6 @@ YQPkgDescriptionDialog::YQPkgDescriptionDialog( QWidget * parent, const QString QSplitter * splitter = new QSplitter( Qt::Vertical, this ); Q_CHECK_PTR( splitter ); layout->addWidget( splitter ); - splitter->setMargin( MARGIN ); - // Pkg list @@ -89,25 +85,23 @@ YQPkgDescriptionDialog::YQPkgDescriptionDialog( QWidget * parent, const QString // Button box (to center the single button) - Q3HBox * hbox = new Q3HBox( this ); + QHBoxLayout * hbox = new QHBoxLayout( this ); Q_CHECK_PTR( hbox ); hbox->setSpacing( SPACING ); hbox->setMargin ( MARGIN ); - layout->addWidget( hbox ); - - addHStretch( hbox ); - + layout->addLayout( hbox ); // "OK" button - QPushButton * button = new QPushButton( _( "&OK" ), hbox ); + QPushButton * button = new QPushButton( _( "&OK" ), this ); Q_CHECK_PTR( button ); + hbox->addWidget(button); button->setDefault( true ); connect( button, SIGNAL( clicked() ), this, SLOT ( accept() ) ); - addHStretch( hbox ); + hbox->addStretch(); filter( pkgName ); @@ -117,7 +111,7 @@ YQPkgDescriptionDialog::YQPkgDescriptionDialog( QWidget * parent, const QString void YQPkgDescriptionDialog::filter( const QString & qPkgName ) { - std::string pkgName( (const char *) qPkgName ); + std::string pkgName( qPrintable(qPkgName) ); YQUI::ui()->busyCursor(); _pkgList->clear(); -- 2.39.2