author | zecke <zecke> | 2002-11-03 11:08:07 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-03 11:08:07 (UTC) |
commit | 2ddf0a555fc848930de8b0f7b237bbd7f2a028ca (patch) (unidiff) | |
tree | ae30e333c5c1ee830e46f7f868c5e56876f7e93c /core | |
parent | 207f7430db6c90e88825ea2bedc9ae1bf68e3d99 (diff) | |
download | opie-2ddf0a555fc848930de8b0f7b237bbd7f2a028ca.zip opie-2ddf0a555fc848930de8b0f7b237bbd7f2a028ca.tar.gz opie-2ddf0a555fc848930de8b0f7b237bbd7f2a028ca.tar.bz2 |
Nice to see more kde dudes here!
A patch from jowenn to make Opie compile with gcc3 again
No default arguments!
Some namespace issues
-rw-r--r-- | core/launcher/launcherview.cpp | 5 | ||||
-rw-r--r-- | core/launcher/transferserver.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 2a051a6..95a1d4a 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -30,32 +30,33 @@ | |||
30 | #include <qpe/resource.h> | 30 | #include <qpe/resource.h> |
31 | #include <qpe/qpetoolbar.h> | 31 | #include <qpe/qpetoolbar.h> |
32 | //#include <qtopia/private/palmtoprecord.h> | 32 | //#include <qtopia/private/palmtoprecord.h> |
33 | 33 | ||
34 | #include <qtimer.h> | 34 | #include <qtimer.h> |
35 | #include <qtextstream.h> | 35 | #include <qtextstream.h> |
36 | #include <qdict.h> | 36 | #include <qdict.h> |
37 | #include <qfile.h> | 37 | #include <qfile.h> |
38 | #include <qfileinfo.h> | 38 | #include <qfileinfo.h> |
39 | #include <qhbox.h> | 39 | #include <qhbox.h> |
40 | #include <qiconview.h> | 40 | #include <qiconview.h> |
41 | #include <qpainter.h> | 41 | #include <qpainter.h> |
42 | #include <qregexp.h> | 42 | #include <qregexp.h> |
43 | #include <qtoolbutton.h> | 43 | #include <qtoolbutton.h> |
44 | #include <qimage.h> | 44 | #include <qimage.h> |
45 | 45 | ||
46 | #include <cstdlib> | ||
46 | 47 | ||
47 | class BgPixmap | 48 | class BgPixmap |
48 | { | 49 | { |
49 | public: | 50 | public: |
50 | BgPixmap( const QPixmap &p ) : pm(p), ref(1) {} | 51 | BgPixmap( const QPixmap &p ) : pm(p), ref(1) {} |
51 | QPixmap pm; | 52 | QPixmap pm; |
52 | int ref; | 53 | int ref; |
53 | }; | 54 | }; |
54 | 55 | ||
55 | enum BusyIndicatorType { | 56 | enum BusyIndicatorType { |
56 | BIT_Normal = 0, | 57 | BIT_Normal = 0, |
57 | BIT_Blinking | 58 | BIT_Blinking |
58 | }; | 59 | }; |
59 | 60 | ||
60 | static QMap<QString,BgPixmap*> *bgCache = 0; | 61 | static QMap<QString,BgPixmap*> *bgCache = 0; |
61 | 62 | ||
@@ -77,33 +78,33 @@ public: | |||
77 | } | 78 | } |
78 | 79 | ||
79 | ~LauncherIconView() | 80 | ~LauncherIconView() |
80 | { | 81 | { |
81 | #if 0 // debuggery | 82 | #if 0 // debuggery |
82 | QListIterator<AppLnk> it(hidden); | 83 | QListIterator<AppLnk> it(hidden); |
83 | AppLnk* l; | 84 | AppLnk* l; |
84 | while ((l=it.current())) { | 85 | while ((l=it.current())) { |
85 | ++it; | 86 | ++it; |
86 | //qDebug("%p: hidden (should remove)",l); | 87 | //qDebug("%p: hidden (should remove)",l); |
87 | } | 88 | } |
88 | #endif | 89 | #endif |
89 | } | 90 | } |
90 | 91 | ||
91 | void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } | 92 | void setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } |
92 | 93 | ||
93 | QPixmap* busyPixmap() const { return (QPixmap*)&bpm[::abs(busystate)]; } | 94 | QPixmap* busyPixmap() const { return (QPixmap*)&bpm[abs(busystate)]; } |
94 | QIconViewItem* busyItem() const { return bsy; } | 95 | QIconViewItem* busyItem() const { return bsy; } |
95 | void setBigIcons( bool bi ) { bigIcns = bi; } | 96 | void setBigIcons( bool bi ) { bigIcns = bi; } |
96 | 97 | ||
97 | void updateCategoriesAndMimeTypes(); | 98 | void updateCategoriesAndMimeTypes(); |
98 | 99 | ||
99 | void doAutoScroll() | 100 | void doAutoScroll() |
100 | { | 101 | { |
101 | // We don't want rubberbanding (yet) | 102 | // We don't want rubberbanding (yet) |
102 | } | 103 | } |
103 | 104 | ||
104 | void setBusy(bool on) | 105 | void setBusy(bool on) |
105 | { | 106 | { |
106 | QIconViewItem *c = on ? currentItem() : 0; | 107 | QIconViewItem *c = on ? currentItem() : 0; |
107 | 108 | ||
108 | if ( bsy != c ) { | 109 | if ( bsy != c ) { |
109 | QIconViewItem *oldbsy = bsy; | 110 | QIconViewItem *oldbsy = bsy; |
@@ -118,33 +119,33 @@ public: | |||
118 | } | 119 | } |
119 | 120 | ||
120 | if ( bsy ) { | 121 | if ( bsy ) { |
121 | QPixmap *src = bsy-> QIconViewItem::pixmap(); | 122 | QPixmap *src = bsy-> QIconViewItem::pixmap(); |
122 | for ( int i = 0; i <= 5; i++ ) { | 123 | for ( int i = 0; i <= 5; i++ ) { |
123 | QImage img = src->convertToImage(); | 124 | QImage img = src->convertToImage(); |
124 | QRgb* rgb; | 125 | QRgb* rgb; |
125 | int count; | 126 | int count; |
126 | if ( img.depth() == 32 ) { | 127 | if ( img.depth() == 32 ) { |
127 | rgb = (QRgb*)img.bits(); | 128 | rgb = (QRgb*)img.bits(); |
128 | count = img.bytesPerLine()/sizeof(QRgb)*img.height(); | 129 | count = img.bytesPerLine()/sizeof(QRgb)*img.height(); |
129 | } else { | 130 | } else { |
130 | rgb = img.colorTable(); | 131 | rgb = img.colorTable(); |
131 | count = img.numColors(); | 132 | count = img.numColors(); |
132 | } | 133 | } |
133 | int rc, gc, bc; | 134 | int rc, gc, bc; |
134 | int bs = ::abs ( i * 10 ) + 25; | 135 | int bs = abs ( i * 10 ) + 25; |
135 | colorGroup().highlight().rgb( &rc, &gc, &bc ); | 136 | colorGroup().highlight().rgb( &rc, &gc, &bc ); |
136 | rc = rc * bs / 100; | 137 | rc = rc * bs / 100; |
137 | gc = gc * bs / 100; | 138 | gc = gc * bs / 100; |
138 | bc = bc * bs / 100; | 139 | bc = bc * bs / 100; |
139 | 140 | ||
140 | for ( int r = 0; r < count; r++, rgb++ ) { | 141 | for ( int r = 0; r < count; r++, rgb++ ) { |
141 | int ri = rc + qRed ( *rgb ) * ( 100 - bs ) / 100; | 142 | int ri = rc + qRed ( *rgb ) * ( 100 - bs ) / 100; |
142 | int gi = gc + qGreen ( *rgb ) * ( 100 - bs ) / 100; | 143 | int gi = gc + qGreen ( *rgb ) * ( 100 - bs ) / 100; |
143 | int bi = bc + qBlue ( *rgb ) * ( 100 - bs ) / 100; | 144 | int bi = bc + qBlue ( *rgb ) * ( 100 - bs ) / 100; |
144 | int ai = qAlpha ( *rgb ); | 145 | int ai = qAlpha ( *rgb ); |
145 | *rgb = qRgba ( ri, gi, bi, ai ); | 146 | *rgb = qRgba ( ri, gi, bi, ai ); |
146 | } | 147 | } |
147 | 148 | ||
148 | bpm [i].convertFromImage( img ); | 149 | bpm [i].convertFromImage( img ); |
149 | } | 150 | } |
150 | 151 | ||
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index aaa4425..cbda247 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -981,33 +981,33 @@ QString ServerPI::absFilePath( const QString& file ) | |||
981 | if ( file.isEmpty() ) return file; | 981 | if ( file.isEmpty() ) return file; |
982 | 982 | ||
983 | QString filepath( file ); | 983 | QString filepath( file ); |
984 | if ( file[0] != "/" ) | 984 | if ( file[0] != "/" ) |
985 | filepath = directory.path() + "/" + file; | 985 | filepath = directory.path() + "/" + file; |
986 | 986 | ||
987 | return filepath; | 987 | return filepath; |
988 | } | 988 | } |
989 | 989 | ||
990 | 990 | ||
991 | void ServerPI::timerEvent( QTimerEvent * ) | 991 | void ServerPI::timerEvent( QTimerEvent * ) |
992 | { | 992 | { |
993 | connectionClosed(); | 993 | connectionClosed(); |
994 | } | 994 | } |
995 | 995 | ||
996 | 996 | ||
997 | ServerDTP::ServerDTP( QObject *parent = 0, const char* name = 0) | 997 | ServerDTP::ServerDTP( QObject *parent, const char* name) |
998 | : QSocket( parent, name ), mode( Idle ), createTargzProc( 0 ), | 998 | : QSocket( parent, name ), mode( Idle ), createTargzProc( 0 ), |
999 | retrieveTargzProc( 0 ), gzipProc( 0 ) | 999 | retrieveTargzProc( 0 ), gzipProc( 0 ) |
1000 | { | 1000 | { |
1001 | 1001 | ||
1002 | connect( this, SIGNAL( connected() ), SLOT( connected() ) ); | 1002 | connect( this, SIGNAL( connected() ), SLOT( connected() ) ); |
1003 | connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) ); | 1003 | connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) ); |
1004 | connect( this, SIGNAL( bytesWritten( int ) ), SLOT( bytesWritten( int ) ) ); | 1004 | connect( this, SIGNAL( bytesWritten( int ) ), SLOT( bytesWritten( int ) ) ); |
1005 | connect( this, SIGNAL( readyRead() ), SLOT( readyRead() ) ); | 1005 | connect( this, SIGNAL( readyRead() ), SLOT( readyRead() ) ); |
1006 | 1006 | ||
1007 | gzipProc = new QProcess( this, "gzipProc" ); | 1007 | gzipProc = new QProcess( this, "gzipProc" ); |
1008 | gzipProc->setCommunication( QProcess::Stdin | QProcess::Stdout ); | 1008 | gzipProc->setCommunication( QProcess::Stdin | QProcess::Stdout ); |
1009 | 1009 | ||
1010 | createTargzProc = new QProcess( QString("tar"), this, "createTargzProc"); | 1010 | createTargzProc = new QProcess( QString("tar"), this, "createTargzProc"); |
1011 | createTargzProc->setCommunication( QProcess::Stdout ); | 1011 | createTargzProc->setCommunication( QProcess::Stdout ); |
1012 | createTargzProc->setWorkingDirectory( QDir::rootDirPath() ); | 1012 | createTargzProc->setWorkingDirectory( QDir::rootDirPath() ); |
1013 | connect( createTargzProc, SIGNAL( processExited() ), SLOT( targzDone() ) ); | 1013 | connect( createTargzProc, SIGNAL( processExited() ), SLOT( targzDone() ) ); |