rev 4434 - in trunk/packages/kdelibs/debian: . patches

Christopher Martin chrsmrtn at costa.debian.org
Sun Aug 27 16:28:43 UTC 2006


Author: chrsmrtn
Date: 2006-08-27 16:28:42 +0000 (Sun, 27 Aug 2006)
New Revision: 4434

Modified:
   trunk/packages/kdelibs/debian/changelog
   trunk/packages/kdelibs/debian/patches/17_kdelibs_rubberband.diff
Log:
Since no patch has been forthcoming, drop the crashy kjanuswidget
stuff before Etch.


Modified: trunk/packages/kdelibs/debian/changelog
===================================================================
--- trunk/packages/kdelibs/debian/changelog	2006-08-27 14:45:30 UTC (rev 4433)
+++ trunk/packages/kdelibs/debian/changelog	2006-08-27 16:28:42 UTC (rev 4434)
@@ -6,8 +6,11 @@
     + Fixes crashes in kate when creating doxygen comments.
       (Closes: #381578)
 
- -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sun,  6 Aug 2006 12:49:55 -0400
+  * Drop the kjanuswidget highlight-on-mouseover patch. Though a very nice
+    touch, it caused crashes in applications such as adept.
 
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sun, 27 Aug 2006 12:27:45 -0400
+
 kdelibs (4:3.5.4-3) unstable; urgency=low
 
   +++ Changes by Christopher Martin:

Modified: trunk/packages/kdelibs/debian/patches/17_kdelibs_rubberband.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/17_kdelibs_rubberband.diff	2006-08-27 14:45:30 UTC (rev 4433)
+++ trunk/packages/kdelibs/debian/patches/17_kdelibs_rubberband.diff	2006-08-27 16:28:42 UTC (rev 4434)
@@ -101,271 +101,3 @@
          p->setPen( QPen( cg.highlightedText() ) );
      } else {
          if ( iconView()->itemTextBackground() != NoBrush )
---- kde.orig/kdeui/kjanuswidget.cpp
-+++ kde.patched/kdeui/kjanuswidget.cpp
-@@ -49,16 +49,19 @@
- {
-   public:
-     IconListItem( QListBox *listbox, const QPixmap &pixmap,
--		   const QString &text );
-+                  const QString &text );
-     virtual int height( const QListBox *lb ) const;
-     virtual int width( const QListBox *lb ) const;
-     int expandMinimumWidth( int width );
-+    void highlight( bool erase );        
- 
-   protected:
-     const QPixmap &defaultPixmap();
-     void paint( QPainter *painter );
--
-+    
-   private:
-+    void paintContents( QPainter *painter );  
-+  
-     QPixmap mPixmap;
-     int mMinimumWidth;
- };
-@@ -141,6 +144,8 @@
- 
-       mIconList->verticalScrollBar()->installEventFilter( this );
-       connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage()));
-+      connect( mIconList, SIGNAL(onItem(QListBoxItem *)), SLOT(slotOnItem(QListBoxItem *)));
-+
-       hbox->addSpacing( KDialog::marginHint() );
-       page = new QFrame( this );
-       hbox->addWidget( page, 10 );
-@@ -259,7 +264,7 @@
- }
- 
- QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
--			       const QPixmap &pixmap )
-+          const QPixmap &pixmap )
- {
-   QStringList items;
-   items << itemName;
-@@ -269,8 +274,8 @@
- 
- 
- QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
--				  const QString &header,
--				  const QPixmap &pixmap )
-+          const QString &header,
-+          const QPixmap &pixmap )
- {
-   if( !mValid )
-   {
-@@ -721,6 +726,12 @@
-     it->setOpen(!it->isOpen());
- }
- 
-+// hack because qt does not support Q_OBJECT in nested classes
-+void KJanusWidget::slotOnItem(QListBoxItem *qitem)
-+{
-+  mIconList->slotOnItem( qitem );
-+}  
-+
- void KJanusWidget::setFocus()
- {
-   if( !mValid ) { return; }
-@@ -929,11 +940,11 @@
- KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
- 					WFlags f )
-   :KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
--   mWidthValid(false)
-+   mWidthValid(false),
-+   mOldItem(0) 
- {
- }
- 
--
- void KJanusWidget::IconListBox::updateMinimumHeight()
- {
-   if( mShowAll && !mHeightValid )
-@@ -995,6 +1006,45 @@
- }
- 
- 
-+void KJanusWidget::IconListBox::leaveEvent( QEvent *ev )
-+{
-+  KListBox::leaveEvent( ev ); 
-+
-+  if ( mOldItem && !mOldItem->isSelected() )
-+  {
-+    ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
-+    mOldItem = 0;
-+  }
-+} 
-+
-+// hack because qt does not support Q_OBJECT in nested classes
-+void KJanusWidget::IconListBox::slotOnItem(QListBoxItem *qitem)
-+{
-+  KListBox::slotOnItem( qitem );
-+
-+  if ( qitem == mOldItem )
-+  {
-+    return;
-+  }
-+ 
-+  if ( mOldItem && !mOldItem->isSelected() )
-+  {
-+    ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
-+  }
-+
-+  KJanusWidget::IconListItem *item = dynamic_cast< KJanusWidget::IconListItem * >( qitem );
-+  if ( item && !item->isSelected() )
-+  {      
-+    item->highlight( false );
-+    mOldItem = item;
-+  }
-+  else
-+  {
-+    mOldItem = 0;
-+  }
-+}  
-+
-+
- 
- KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap,
-                                           const QString &text )
-@@ -1006,6 +1056,7 @@
-     mPixmap = defaultPixmap();
-   }
-   setText( text );
-+  setCustomHighlighting( true );
-   mMinimumWidth = 0;
- }
- 
-@@ -1017,6 +1068,36 @@
- }
- 
- 
-+void KJanusWidget::IconListItem::highlight( bool erase )
-+{   
-+   QRect r = listBox()->itemRect( this );
-+   r.addCoords( 1, 1, -1, -1 );  
-+   
-+   QPainter p( listBox()->viewport() );
-+   p.setClipRegion( r );
-+   
-+   const QColorGroup &cg = listBox()->colorGroup();
-+   if ( erase )
-+   {
-+      p.setPen( cg.base() );
-+      p.setBrush( cg.base() );
-+      p.drawRect( r );
-+   }
-+   else
-+   {
-+      p.setBrush( cg.highlight().light( 120 ) );
-+      p.drawRect( r );
-+
-+      p.setPen( cg.highlight().dark( 140 ) );
-+      p.drawRect( r ); 
-+   }
-+      
-+   p.setPen( cg.foreground() );
-+   p.translate( r.x() - 1, r.y() - 1 );
-+   paintContents( &p );
-+}
-+
-+
- const QPixmap &KJanusWidget::IconListItem::defaultPixmap()
- {
-   static QPixmap *pix=0;
-@@ -1044,15 +1125,34 @@
- 
- void KJanusWidget::IconListItem::paint( QPainter *painter )
- {
-+  QRect itemPaintRegion( listBox()->itemRect( this ) );
-+  QRect r( 1, 1, itemPaintRegion.width() - 2, itemPaintRegion.height() - 2);
-+
-+  if ( isSelected() )
-+  {
-+    painter->eraseRect( r );
-+
-+    painter->save();
-+    painter->setPen( listBox()->colorGroup().highlight().dark( 160 ) );
-+    painter->drawRect( r );
-+    painter->restore();
-+  }
-+
-+  paintContents( painter );
-+}
-+
-+
-+void KJanusWidget::IconListItem::paintContents( QPainter *painter )
-+{
-   QFontMetrics fm = painter->fontMetrics();
-   int ht = fm.boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height();
-   int wp = mPixmap.width();
-   int hp = mPixmap.height();
-+  painter->drawPixmap( (mMinimumWidth - wp) / 2, 5, mPixmap );
- 
--  painter->drawPixmap( (mMinimumWidth-wp)/2, 5, mPixmap );
-   if( !text().isEmpty() )
-   {
--    painter->drawText( 0, hp+7, mMinimumWidth, ht, Qt::AlignCenter, text() );
-+    painter->drawText( 1, hp + 7, mMinimumWidth - 2, ht, Qt::AlignCenter, text() );
-   }
- }
- 
-@@ -1082,6 +1182,7 @@
- void KJanusWidget::virtual_hook( int, void* )
- { /*BASE::virtual_hook( id, data );*/ }
- 
-+
- // TODO: In TreeList, if the last child of a node is removed, and there is no corrsponding widget for that node, allow the caller to
- // delete the node.
- void KJanusWidget::removePage( QWidget *page )
-@@ -1129,6 +1230,7 @@
-   }
- }
- 
-+
- QString KJanusWidget::pageTitle(int index) const
- {
-   if (!d || !d->mIntToTitle.contains(index))
-@@ -1137,6 +1239,7 @@
-     return d->mIntToTitle[index];
- }
- 
-+
- QWidget *KJanusWidget::pageWidget(int index) const
- {
-   if (!d || !d->mIntToPage.contains(index))
---- kde.orig/kdeui/kjanuswidget.h
-+++ kde.patched/kdeui/kjanuswidget.h
-@@ -71,6 +71,8 @@
-   private:
-     class IconListBox : public KListBox
-     {
-+      friend class KJanusWidget;
-+
-       public:
-         IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 );
- 	void updateMinimumHeight();
-@@ -79,10 +81,15 @@
- 	void invalidateWidth();
- 	void setShowAll( bool showAll );
- 
-+      protected:
-+    	void slotOnItem( QListBoxItem *item );
-+	virtual void leaveEvent( QEvent * );
-+    
-       private:
- 	bool mShowAll;
- 	bool mHeightValid;
- 	bool mWidthValid;
-+	QListBoxItem *mOldItem;	
-     };
- 
-   public:
-@@ -558,6 +565,8 @@
-   private slots:
-     bool slotShowPage();
-     void slotFontChanged();
-+
-+    void slotOnItem(QListBoxItem *item);
-     void slotItemClicked(QListViewItem *it);
-     void pageGone(QObject *obj); // signal from the added page's "destroyed" signal
-     void slotReopen(QListViewItem *item);




More information about the pkg-kde-commits mailing list