[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdebase/kwin/clients/keramik
From: Dirk Mueller <mueller () kde ! org>
Date: 2005-11-23 15:02:14
Message-ID: 1132758134.844323.30601.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 482591 by mueller:
avoid QPixmap/QBitmap related crashes/alising
M +18 -15 keramik.cpp
M +0 -1 keramik.h
--- branches/KDE/3.5/kdebase/kwin/clients/keramik/keramik.cpp #482590:482591
@@ -41,7 +41,19 @@
// -------------------------------------------------------------------------------------------
+static void flip( QPixmap *&pix )
+{
+ QPixmap *tmp = new QPixmap( pix->xForm( QWMatrix(-1,0,0,1,pix->width(),0) ) );
+ delete pix;
+ pix = tmp;
+}
+static void flip( QBitmap *&pix )
+{
+ QBitmap *tmp = new QBitmap( pix->xForm( QWMatrix(-1,0,0,1,pix->width(),0) ) );
+ delete pix;
+ pix = tmp;
+}
namespace Keramik
{
@@ -195,11 +207,11 @@
// Flip the bitmaps horizontally in right-to-left mode
if ( QApplication::reverseLayout() ) {
- for ( int i = 0; i < Help; i++ )
- flip( reinterpret_cast<QPixmap**>(buttonDecos)[i] );
+ for ( int i = 0; i < Help; ++i )
+ ::flip( buttonDecos[i] );
- for ( int i = Help + 1; i < NumButtonDecos; i++ )
- flip( reinterpret_cast<QPixmap**>(buttonDecos)[i] );
+ for ( int i = Help + 1; i < NumButtonDecos; ++i )
+ ::flip( buttonDecos[i] );
}
readConfig();
@@ -393,8 +405,8 @@
flip( activeTiles[GrabBarLeft], activeTiles[GrabBarRight] );
flip( inactiveTiles[GrabBarLeft], inactiveTiles[GrabBarRight] );
- flip( titleButtonRound );
- flip( titleButtonSquare );
+ ::flip( titleButtonRound );
+ ::flip( titleButtonSquare );
}
// Pretile the center & border tiles for optimal performance
@@ -528,15 +540,6 @@
}
-void KeramikHandler::flip( QPixmap *&pix )
-{
- // Flip the pixmap horizontally
- QPixmap *tmp = new QPixmap( pix->xForm( QWMatrix(-1,0,0,1,pix->width(),0) ) );
- delete pix;
- pix = tmp;
-}
-
-
void KeramikHandler::pretile( QPixmap *&pix, int size, Qt::Orientation dir )
{
QPixmap *newpix;
--- branches/KDE/3.5/kdebase/kwin/clients/keramik/keramik.h #482590:482591
@@ -92,7 +92,6 @@
void addWidth (int width, QPixmap *&pix, bool left, QPixmap *bottomPix);
void addHeight (int height, QPixmap *&pix);
void flip( QPixmap *&, QPixmap *& );
- void flip( QPixmap *& );
void pretile( QPixmap *&, int, Qt::Orientation );
QPixmap *composite( QImage *, QImage * );
QImage *loadImage( const QString &, const QColor & );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic