Author: dmacvicar
Date: Sat Dec 8 02:02:44 2007
New Revision: 42839
URL: http://svn.opensuse.org/viewcvs/yast?rev=42839&view=rev
Log:
YQPkgDescriptionDialog QT3_SUPPORT
Modified:
trunk/qt4/src/pkg/YQPkgDescriptionDialog.cc
Modified: trunk/qt4/src/pkg/YQPkgDescriptionDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt4/src/pkg/YQPkgDescriptionDialog.cc?rev=42839&r1=42838&r2=42839&view=diff
==============================================================================
--- trunk/qt4/src/pkg/YQPkgDescriptionDialog.cc (original)
+++ trunk/qt4/src/pkg/YQPkgDescriptionDialog.cc Sat Dec 8 02:02:44 2007
@@ -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 <QApplication>
+#include <QDesktopWidget>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QSplitter>
+#include <QStyle>
+#include <QList>
+#include <QBoxLayout>
#include "YQPkgDescriptionDialog.h"
#include "YQPkgDescriptionView.h"
@@ -51,14 +47,16 @@
: 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 @@
QSplitter * splitter = new QSplitter( Qt::Vertical, this );
Q_CHECK_PTR( splitter );
layout->addWidget( splitter );
- splitter->setMargin( MARGIN );
-
// Pkg list
@@ -89,25 +85,23 @@
// 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 @@
void
YQPkgDescriptionDialog::filter( const QString & qPkgName )
{
- std::string pkgName( (const char *) qPkgName );
+ std::string pkgName( qPrintable(qPkgName) );
YQUI::ui()->busyCursor();
_pkgList->clear();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org