From dbd0d569ebe3db22ea38b7315a473b883fa88fa1 Mon Sep 17 00:00:00 2001 From: coolo Date: Sun, 9 Dec 2007 17:05:20 +0000 Subject: [PATCH] fix porting error git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@42867 e0cc52ee-31ee-0310-8b87-e83c4596d67c --- src/QY2ListView.cc | 24 ++++++++++++------------ src/YQMultiSelectionBox.cc | 5 ++--- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/QY2ListView.cc b/src/QY2ListView.cc index 9e90a16..e09184d 100644 --- a/src/QY2ListView.cc +++ b/src/QY2ListView.cc @@ -75,7 +75,7 @@ QY2ListView::selectSomething() item->setSelected(true); // emits signal, too return; } - + ++it; } } @@ -100,7 +100,7 @@ QY2ListView::updateItemStates() if ( item ) item->updateStatus(); - + ++it; } } @@ -117,7 +117,7 @@ QY2ListView::updateItemData() if ( item ) item->updateData(); - + ++it; } } @@ -215,7 +215,7 @@ QY2ListView::contentsMouseReleaseEvent( QMouseEvent * ev ) { // FIXME // int col = header()->sectionAt( ev->pos().x() ); -// +// // if ( item == _mousePressedItem && // col == _mousePressedCol && // ev->button() == _mousePressedButton ) @@ -246,13 +246,13 @@ QY2ListView::contentsMouseDoubleClickEvent( QMouseEvent * ev ) int col = header()->logicalIndexAt( ev->pos().x() ); emit( columnDoubleClicked( ev->button(), (QY2ListViewItem *) item, col, ev->globalPos() ) ); } - + // invalidate last click data - + _mousePressedItem = 0; _mousePressedCol = -1; _mousePressedButton = Qt::NoButton; - + // // Call base class method // QTreeWidget::contentsMouseDoubleClickEvent( ev ); } @@ -377,7 +377,7 @@ QY2ListViewItem::compare( QTreeWidgetItem * otherListViewItem, if ( parentListView ) sortByInsertionSequence = parentListView->sortByInsertionSequence(); - + if ( sortByInsertionSequence ) { QY2ListViewItem * other = dynamic_cast (otherListViewItem); @@ -415,10 +415,10 @@ QY2ListViewItem::compare( QTreeWidgetItem * otherListViewItem, // int alignment ) // { // QColorGroup cg = colorGroup; -// +// // if ( _textColor.isValid() ) cg.setColor( QColorGroup::Text, _textColor ); // if ( _backgroundColor.isValid() ) cg.setColor( QColorGroup::Base, _backgroundColor ); -// +// // QTreeWidgetItem::paintCell( painter, cg, column, width, alignment ); // } @@ -431,7 +431,7 @@ QY2CheckListItem::QY2CheckListItem( QY2ListView * parentListView, const QString & text ) : QTreeWidgetItem( parentListView, QStringList(text)) { - setFlags(Qt::ItemIsUserCheckable); + setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled); setCheckState(0, Qt::Unchecked); _serial = parentListView->nextSerial(); } @@ -471,7 +471,7 @@ QY2CheckListItem::compare( QTreeWidgetItem * otherListViewItem, if ( parentListView ) sortByInsertionSequence = parentListView->sortByInsertionSequence(); - + if ( sortByInsertionSequence ) { QY2CheckListItem * other = dynamic_cast (otherListViewItem); diff --git a/src/YQMultiSelectionBox.cc b/src/YQMultiSelectionBox.cc index 787ad50..1a1129c 100644 --- a/src/YQMultiSelectionBox.cc +++ b/src/YQMultiSelectionBox.cc @@ -326,15 +326,14 @@ int YQMultiSelectionBoxItem::_item_count = 0; YQMultiSelectionBoxItem::YQMultiSelectionBoxItem( YQMultiSelectionBox * parent, QTreeWidget * listView, YItem * yItem ) - : QTreeWidgetItem( listView) + : QTreeWidgetItem( listView ) , _yItem( yItem ) , _multiSelectionBox( parent ) { YUI_CHECK_PTR( yItem ); - setFlags( Qt::ItemIsUserCheckable ); + setFlags( Qt::ItemIsUserCheckable | Qt::ItemIsEnabled ); setCheckState( 0, Qt::Unchecked ); setText(0, fromUTF8( yItem->label() )); - setFlags(Qt::ItemIsUserCheckable); _serial = _item_count++; } -- 2.39.2