summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-11 18:25:17 (UTC)
committer simon <simon>2002-12-11 18:25:17 (UTC)
commitf3d21af83a2846d1c20fc845cf88329ff1f2b1a9 (patch) (unidiff)
tree2187152e0aa3c121c833d15060ab1aedcfae0a36
parentd9a6575f931b288086da701c3094b475c73d2efc (diff)
downloadopie-f3d21af83a2846d1c20fc845cf88329ff1f2b1a9.zip
opie-f3d21af83a2846d1c20fc845cf88329ff1f2b1a9.tar.gz
opie-f3d21af83a2846d1c20fc845cf88329ff1f2b1a9.tar.bz2
QBusyBar::~QBusyBar ( )
{ + delete [] m_fadecols;
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/qbusybar.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/qbusybar.cpp b/noncore/unsupported/qpdf/qbusybar.cpp
index f5c62fa..ce7ab8e 100644
--- a/noncore/unsupported/qpdf/qbusybar.cpp
+++ b/noncore/unsupported/qpdf/qbusybar.cpp
@@ -32,48 +32,49 @@ void QBusyBar::setParameters ( int d, int s, int v )
32 m_div = d; 32 m_div = d;
33 m_speed = v; 33 m_speed = v;
34 34
35 delete [] m_fadecols; 35 delete [] m_fadecols;
36 m_fade = s; 36 m_fade = s;
37 m_fadecols = new QColor [m_fade]; 37 m_fadecols = new QColor [m_fade];
38 38
39 int rt, gt, bt; 39 int rt, gt, bt;
40 int rf, gf, bf; 40 int rf, gf, bf;
41 41
42 colorGroup ( ). color ( QColorGroup::Highlight ). rgb ( &rf, &gf, &bf ); 42 colorGroup ( ). color ( QColorGroup::Highlight ). rgb ( &rf, &gf, &bf );
43 colorGroup ( ). color ( QColorGroup::Background ). rgb ( &rt, &gt, &bt ); 43 colorGroup ( ). color ( QColorGroup::Background ). rgb ( &rt, &gt, &bt );
44 44
45 for ( int i = 0; i < s; i++ ) 45 for ( int i = 0; i < s; i++ )
46 m_fadecols [i]. setRgb ( rf + ( rt - rf ) * i / s, gf + ( gt - gf ) * i / s, bf + ( bt - bf ) * i / s ); 46 m_fadecols [i]. setRgb ( rf + ( rt - rf ) * i / s, gf + ( gt - gf ) * i / s, bf + ( bt - bf ) * i / s );
47 47
48 if ( running ) { 48 if ( running ) {
49 m_pos = 0; 49 m_pos = 0;
50 m_timer-> start ( m_speed ); 50 m_timer-> start ( m_speed );
51 } 51 }
52} 52}
53 53
54QBusyBar::~QBusyBar ( ) 54QBusyBar::~QBusyBar ( )
55{ 55{
56 delete [] m_fadecols;
56} 57}
57 58
58bool QBusyBar::isBusy ( ) const 59bool QBusyBar::isBusy ( ) const
59{ 60{
60 return m_busy; 61 return m_busy;
61} 62}
62 63
63void QBusyBar::beginBusy ( ) 64void QBusyBar::beginBusy ( )
64{ 65{
65 setBusy ( true ); 66 setBusy ( true );
66} 67}
67 68
68void QBusyBar::endBusy ( ) 69void QBusyBar::endBusy ( )
69{ 70{
70 setBusy ( false ); 71 setBusy ( false );
71} 72}
72 73
73void QBusyBar::setBusy ( bool b ) 74void QBusyBar::setBusy ( bool b )
74{ 75{
75 int busy = m_busy + ( b ? 1 : -1 ); 76 int busy = m_busy + ( b ? 1 : -1 );
76 77
77 if ( busy < 0 ) 78 if ( busy < 0 )
78 busy = 0; 79 busy = 0;
79 80