From 42a16bb0910c771f4d5b8cd5207fac155912fbec Mon Sep 17 00:00:00 2001 From: dmacvicar Date: Fri, 7 Dec 2007 16:26:43 +0000 Subject: [PATCH] YQPkgConflictDialog git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@42822 e0cc52ee-31ee-0310-8b87-e83c4596d67c --- src/pkg/YQPkgConflictDialog.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/pkg/YQPkgConflictDialog.cc b/src/pkg/YQPkgConflictDialog.cc index 0775224..48ec35d 100644 --- a/src/pkg/YQPkgConflictDialog.cc +++ b/src/pkg/YQPkgConflictDialog.cc @@ -18,8 +18,6 @@ /-*/ -#define QT3_SUPPORT 1 - #define y2log_component "qt-pkg" #include @@ -73,7 +71,7 @@ YQPkgConflictDialog::YQPkgConflictDialog( QWidget * parent ) // or may not be visible, depending on whether or not there is a window // manager running (and configured to show any dialog titles). - setCaption( _( "Warning" ) ); + setWindowTitle( _( "Warning" ) ); // Enable dialog resizing even without window manager setSizeGripEnabled( true ); @@ -81,7 +79,10 @@ YQPkgConflictDialog::YQPkgConflictDialog( QWidget * parent ) // Layout for the dialog (can't simply insert a QVbox) - QVBoxLayout * layout = new QVBoxLayout( this, MARGIN, SPACING ); + QVBoxLayout * layout = new QVBoxLayout( this ); + layout->setMargin(MARGIN); + layout->setSpacing(SPACING); + Q_CHECK_PTR( layout ); // Conflict list @@ -129,9 +130,9 @@ YQPkgConflictDialog::YQPkgConflictDialog( QWidget * parent ) _expertMenu = new QMenu( button ); Q_CHECK_PTR( _expertMenu ); - button->setPopup( _expertMenu ); + button->setMenu( _expertMenu ); - _expertMenu->insertItem( _( "&Save This List to a File..." ), + _expertMenu->addAction( _( "&Save This List to a File..." ), _conflictList, SLOT( askSaveToFile() ) ); @@ -154,7 +155,7 @@ YQPkgConflictDialog::YQPkgConflictDialog( QWidget * parent ) ); Q_CHECK_PTR( _busyPopup ); - _busyPopup->setCaption( "" ); + _busyPopup->setWindowTitle( "" ); _busyPopup->resize( _busyPopup->sizeHint() ); YQDialog::center( _busyPopup, parent ); @@ -183,7 +184,7 @@ YQPkgConflictDialog::YQPkgConflictDialog( QWidget * parent ) QPixmap pixmap( 3 * size.width(), 3 * size.height() ); // Clear the pixmap with the widget's normal background color. - pixmap.fill( _busyPopup->paletteBackgroundColor() ); + //FIXME pixmap.fill( _busyPopup->paletteBackgroundColor() ); // Render the text - aligned top and left because otherwise it will of // course be centered inside the pixmap which is usually much larger than @@ -192,7 +193,7 @@ YQPkgConflictDialog::YQPkgConflictDialog( QWidget * parent ) painter.drawText( pixmap.rect(), Qt::AlignLeft | Qt::AlignTop, _busyPopup->text() ); painter.end(); - _busyPopup->setPaletteBackgroundPixmap( pixmap ); + //FIXME _busyPopup->setPaletteBackgroundPixmap( pixmap ); // If the application manages to render the true contents of the label we // just misused so badly, the real label will interfere with the background @@ -376,7 +377,7 @@ YQPkgConflictDialog::askCreateSolverTestCase() return; y2milestone( "Generating solver test case START" ); - bool success = zypp::getZYpp()->resolver()->createSolverTestcase( testCaseDir.ascii() ); + bool success = zypp::getZYpp()->resolver()->createSolverTestcase( qPrintable(testCaseDir) ); y2milestone( "Generating solver test case END" ); if ( success ) -- 2.39.2