Author: dmacvicar
Date: Fri Dec 14 18:16:59 2007
New Revision: 43093
URL: http://svn.opensuse.org/viewcvs/yast?rev=43093&view=rev
Log:
- Don't crash on warnings (where is that NDEBUG defined?)
- Fix iterating the hash on ComboTabWidget
Now sw_single starts!
Modified:
trunk/qt/src/QY2ComboTabWidget.cc
trunk/qt/src/QY2ComboTabWidget.h
trunk/qt/src/YQUI_core.cc
trunk/qt/src/pkg/YQPkgConflictList.cc
trunk/qt/src/pkg/YQPkgVersionsView.cc
Modified: trunk/qt/src/QY2ComboTabWidget.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/QY2ComboTabWidget.cc?rev=43093&r1=43092&r2=43093&view=diff
==============================================================================
--- trunk/qt/src/QY2ComboTabWidget.cc (original)
+++ trunk/qt/src/QY2ComboTabWidget.cc Fri Dec 14 18:16:59 2007
@@ -68,7 +68,7 @@
combo_label->setBuddy( combo_box );
combo_box->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); // hor/vert
connect( combo_box, SIGNAL( activated( int ) ),
- this, SLOT ( showPage ( int ) ) );
+ this, SLOT ( showPageIndex ( int ) ) );
widget_stack = new QStackedWidget( this );
Q_CHECK_PTR( widget_stack );
@@ -96,12 +96,11 @@
void
-QY2ComboTabWidget::showPage( int index )
+QY2ComboTabWidget::showPageIndex( int index )
{
- QWidget * page = pages[ index ];
-
- if ( page )
+ if ( pages.contains(index) )
{
+ QWidget * page = pages[ index ];
widget_stack->setCurrentWidget( page );
// y2debug( "Changing current page" );
emit currentChanged( page );
@@ -121,12 +120,11 @@
if ( page == pages[ combo_box->currentIndex() ] )
{
- // Shortcut: If the requested page is the one that belongs to the item
- // currently selected in the combo box, don't bother searching the
- // correct combo box item.
- return;
+ // Shortcut: If the requested page is the one that belongs to the item
+ // currently selected in the combo box, don't bother searching the
+ // correct combo box item.
+ return;
}
-
// Search the dict for this page
@@ -134,13 +132,12 @@
while ( it.hasNext() )
{
+ it.next();
if ( page == it.value() )
{
combo_box->setCurrentIndex( it.key() );
return;
}
-
- it.next();
}
// If we come this far, that page isn't present in the dict.
Modified: trunk/qt/src/QY2ComboTabWidget.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/QY2ComboTabWidget.h?rev=43093&r1=43092&r2=43093&view=diff
==============================================================================
--- trunk/qt/src/QY2ComboTabWidget.h (original)
+++ trunk/qt/src/QY2ComboTabWidget.h Fri Dec 14 18:16:59 2007
@@ -87,7 +87,7 @@
* Show a page identified by its index. Does NOT update the combo box
* contents.
**/
- void showPage( int index );
+ void showPageIndex( int index );
protected:
Modified: trunk/qt/src/YQUI_core.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI_core.cc?rev=43093&r1=43092&r2=43093&view=diff
==============================================================================
--- trunk/qt/src/YQUI_core.cc (original)
+++ trunk/qt/src/YQUI_core.cc Fri Dec 14 18:16:59 2007
@@ -581,13 +581,13 @@
case QtWarningMsg:
y2warning ("qt-warning: %s\n", msg);
#ifndef NDEBUG
- abort();
+ //abort();
#endif
break;
case QtCriticalMsg:
y2warning ("qt-critical: %s\n", msg);
#ifndef NDEBUG
- abort();
+ //abort();
#endif
break;
case QtFatalMsg:
Modified: trunk/qt/src/pkg/YQPkgConflictList.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/pkg/YQPkgConflictList.cc?rev=43093&r1=43092&r2=43093&view=diff
==============================================================================
--- trunk/qt/src/pkg/YQPkgConflictList.cc (original)
+++ trunk/qt/src/pkg/YQPkgConflictList.cc Fri Dec 14 18:16:59 2007
@@ -341,9 +341,8 @@
// how to resolve this conflict
_( "Conflict Resolution:" ) );
Q_CHECK_PTR( _resolutionsHeader );
-#if FIXME
+
_resolutionsHeader->setExpanded( true );
-#endif
_resolutionsHeader->setBackgroundColor( LIGHT_GREY );
zypp::ProblemSolutionList solutions = problem()->solutions();
@@ -377,15 +376,14 @@
zypp::ProblemSolution_Ptr
YQPkgConflict::userSelectedResolution()
{
- int count = 0;
QTreeWidgetItem * item;
+ QTreeWidgetItemIterator it(_resolutionsHeader);
-#if FIXME
- while ( item = _resolutionsHeader->topLevelItem(count) )
+ while ( (item = *it) )
{
YQPkgConflictResolution * res = dynamic_cast