summaryrefslogtreecommitdiff
authorsandman <sandman>2002-11-24 18:30:51 (UTC)
committer sandman <sandman>2002-11-24 18:30:51 (UTC)
commit1b2c3ce0d94f033e8ffe1aa8575b210cdfb3c1ec (patch) (unidiff)
treed816c0e06c067403b6e75515a27dde632ebb88a8
parentd6b3ed253bf86b63bb7a805cfea93b8d489135d1 (diff)
downloadopie-1b2c3ce0d94f033e8ffe1aa8575b210cdfb3c1ec.zip
opie-1b2c3ce0d94f033e8ffe1aa8575b210cdfb3c1ec.tar.gz
opie-1b2c3ce0d94f033e8ffe1aa8575b210cdfb3c1ec.tar.bz2
Valgrind complaint
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index c8f8d20..daac22c 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -135,96 +135,97 @@ bool TransMenuHandler::eventFilter(QObject *obj, QEvent *ev)
135 p->setBackgroundPixmap(*pix); 135 p->setBackgroundPixmap(*pix);
136 136
137 QObjectList *ol = p-> queryList("QWidget"); 137 QObjectList *ol = p-> queryList("QWidget");
138 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { 138 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
139 QWidget *wid = (QWidget *) it.current ( ); 139 QWidget *wid = (QWidget *) it.current ( );
140 140
141 wid-> setBackgroundPixmap(*pix); 141 wid-> setBackgroundPixmap(*pix);
142 wid-> setBackgroundOrigin(QWidget::ParentOrigin); 142 wid-> setBackgroundOrigin(QWidget::ParentOrigin);
143 } 143 }
144 delete ol; 144 delete ol;
145 } 145 }
146 } 146 }
147 else if(ev->type() == QEvent::Hide){ 147 else if(ev->type() == QEvent::Hide){
148 if(type == TransStippleBg || type == TransStippleBtn || 148 if(type == TransStippleBg || type == TransStippleBtn ||
149 type == Custom){ 149 type == Custom){
150// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width()); 150// qWarning("Deleting menu pixmap, width %d", pixDict.find(p->winId())->width());
151 151
152 pixDict.remove(p->winId()); 152 pixDict.remove(p->winId());
153 if ( !p->inherits("QPopupMenu")) 153 if ( !p->inherits("QPopupMenu"))
154 p->setBackgroundMode(QWidget::PaletteBackground); 154 p->setBackgroundMode(QWidget::PaletteBackground);
155 155
156 QObjectList *ol = p-> queryList("QWidget"); 156 QObjectList *ol = p-> queryList("QWidget");
157 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) { 157 for ( QObjectListIt it( *ol ); it. current ( ); ++it ) {
158 QWidget *wid = (QWidget *) it.current ( ); 158 QWidget *wid = (QWidget *) it.current ( );
159 159
160 wid-> setBackgroundMode( QWidget::PaletteBackground ); 160 wid-> setBackgroundMode( QWidget::PaletteBackground );
161 } 161 }
162 delete ol; 162 delete ol;
163 } 163 }
164 } 164 }
165 return(false); 165 return(false);
166} 166}
167 167
168 168
169static int qt_version ( ) 169static int qt_version ( )
170{ 170{
171 const char *qver = qVersion ( ); 171 const char *qver = qVersion ( );
172 return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' ); 172 return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' );
173} 173}
174 174
175 175
176LiquidStyle::LiquidStyle() 176LiquidStyle::LiquidStyle()
177 :QWindowsStyle() 177 :QWindowsStyle()
178{ 178{
179 setName ( "LiquidStyle" ); 179 setName ( "LiquidStyle" );
180 180
181 oldqte = ( qt_version ( ) < 234 ); 181 oldqte = ( qt_version ( ) < 234 );
182 flatTBButtons = false; 182 flatTBButtons = false;
183 currentHeader = 0;
183 184
184 btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true); 185 btnMaskBmp = QBitmap(37, 26, buttonmask_bits, true);
185 btnMaskBmp.setMask(btnMaskBmp); 186 btnMaskBmp.setMask(btnMaskBmp);
186 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true); 187 htmlBtnMaskBmp = QBitmap(37, 26, htmlbuttonmask_bits, true);
187 htmlBtnMaskBmp.setMask(htmlBtnMaskBmp); 188 htmlBtnMaskBmp.setMask(htmlBtnMaskBmp);
188 headerHoverID = -1; 189 headerHoverID = -1;
189 highlightWidget = NULL; 190 highlightWidget = NULL;
190 setButtonDefaultIndicatorWidth(0); 191 setButtonDefaultIndicatorWidth(0);
191 btnDict.setAutoDelete(true); 192 btnDict.setAutoDelete(true);
192 bevelFillDict.setAutoDelete(true); 193 bevelFillDict.setAutoDelete(true);
193 smallBevelFillDict.setAutoDelete(true); 194 smallBevelFillDict.setAutoDelete(true);
194 195
195 rMatrix.rotate(270.0); 196 rMatrix.rotate(270.0);
196 btnBorderPix = new QPixmap; 197 btnBorderPix = new QPixmap;
197 btnBorderPix->convertFromImage(qembed_findImage("buttonfill")); 198 btnBorderPix->convertFromImage(qembed_findImage("buttonfill"));
198 btnBlendPix = new QPixmap; 199 btnBlendPix = new QPixmap;
199 btnBlendPix->convertFromImage(qembed_findImage("buttonborder")); 200 btnBlendPix->convertFromImage(qembed_findImage("buttonborder"));
200 bevelFillPix = new QPixmap; 201 bevelFillPix = new QPixmap;
201 bevelFillPix->convertFromImage(qembed_findImage("clear_fill_large")); 202 bevelFillPix->convertFromImage(qembed_findImage("clear_fill_large"));
202 smallBevelFillPix = new QPixmap; 203 smallBevelFillPix = new QPixmap;
203 smallBevelFillPix->convertFromImage(qembed_findImage("clear_fill_small")); 204 smallBevelFillPix->convertFromImage(qembed_findImage("clear_fill_small"));
204 // new stuff 205 // new stuff
205 vsbSliderFillPix = menuPix = NULL; 206 vsbSliderFillPix = menuPix = NULL;
206 menuHandler = new TransMenuHandler(this); 207 menuHandler = new TransMenuHandler(this);
207 setScrollBarExtent(15, 15); 208 setScrollBarExtent(15, 15);
208 int i; 209 int i;
209 for(i=0; i < BITMAP_ITEMS; ++i){ 210 for(i=0; i < BITMAP_ITEMS; ++i){
210 pixmaps[i] = NULL; 211 pixmaps[i] = NULL;
211 } 212 }
212 oldSliderThickness = sliderThickness(); 213 oldSliderThickness = sliderThickness();
213 setSliderThickness(11); 214 setSliderThickness(11);
214} 215}
215 216
216LiquidStyle::~LiquidStyle() 217LiquidStyle::~LiquidStyle()
217{ 218{
218 if(btnBorderPix) 219 if(btnBorderPix)
219 delete btnBorderPix; 220 delete btnBorderPix;
220 if(btnBlendPix) 221 if(btnBlendPix)
221 delete btnBlendPix; 222 delete btnBlendPix;
222 if(bevelFillPix) 223 if(bevelFillPix)
223 delete bevelFillPix; 224 delete bevelFillPix;
224 if(smallBevelFillPix) 225 if(smallBevelFillPix)
225 delete smallBevelFillPix; 226 delete smallBevelFillPix;
226 if(vsbSliderFillPix) 227 if(vsbSliderFillPix)
227 delete vsbSliderFillPix; 228 delete vsbSliderFillPix;
228 if(menuPix) 229 if(menuPix)
229 delete menuPix; 230 delete menuPix;
230 231