fix porting error
authorcoolo <coolo@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Sun, 9 Dec 2007 17:05:20 +0000 (17:05 +0000)
committercoolo <coolo@e0cc52ee-31ee-0310-8b87-e83c4596d67c>
Sun, 9 Dec 2007 17:05:20 +0000 (17:05 +0000)
git-svn-id: http://svn.opensuse.org/svn/yast/trunk/qt4@42867 e0cc52ee-31ee-0310-8b87-e83c4596d67c

src/QY2ListView.cc
src/YQMultiSelectionBox.cc

index 9e90a16..e09184d 100644 (file)
@@ -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<QY2ListViewItem *> (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<QY2CheckListItem *> (otherListViewItem);
index 787ad50..1a1129c 100644 (file)
@@ -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++;
 }