diff options
Diffstat (limited to 'kde2')
-rw-r--r-- | kde2/klipsi/toplevel.cpp | 1 | ||||
-rw-r--r-- | kde2/kpsion/wizards.cpp | 1 | ||||
-rw-r--r-- | kde2/plugins/pie3dwidget.cpp | 44 |
3 files changed, 22 insertions, 24 deletions
diff --git a/kde2/klipsi/toplevel.cpp b/kde2/klipsi/toplevel.cpp index ff6f65d..1a7d4dd 100644 --- a/kde2/klipsi/toplevel.cpp +++ b/kde2/klipsi/toplevel.cpp @@ -529,7 +529,6 @@ checkConnection() { if (rf && rc) return true; - Enum<rfsv::errs> res; if (!rfsvSocket) { rfsvSocket = new ppsocket(); if (!rfsvSocket->connect(NULL, sockNum)) { diff --git a/kde2/kpsion/wizards.cpp b/kde2/kpsion/wizards.cpp index 8603c8b..4c28780 100644 --- a/kde2/kpsion/wizards.cpp +++ b/kde2/kpsion/wizards.cpp @@ -527,7 +527,6 @@ next() { bool NewPsionWizard:: checkPsionName(QString &name) { - KConfig *config = kapp->config(); if (name.isEmpty()) { KMessageBox::sorry(this, i18n("The name cannot be empty.")); return false; diff --git a/kde2/plugins/pie3dwidget.cpp b/kde2/plugins/pie3dwidget.cpp index 72a4578..a3553fc 100644 --- a/kde2/plugins/pie3dwidget.cpp +++ b/kde2/plugins/pie3dwidget.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Pie3DWidget was inspired by Christian Poulter's KDiskFree - * + * ****************************************************************************/ #include <qpainter.h> @@ -38,9 +38,9 @@ void Pie3DWidget::addPiece(int size, const QColor& color) _totalsize += size; _piecelist.append(new Pie3DPiece(size, color)); - + repaint(); -} +} int Pie3DWidget::heightForWidth(int w) const @@ -57,14 +57,14 @@ QSize Pie3DWidget::minimumSizeHint() const QSize Pie3DWidget::sizeHint() const { - return QSize(width(), width()*0.6); + return QSize(width(), (int)(width()*0.6)); } /* * Protected methods ********************/ - + void Pie3DWidget::paintEvent(QPaintEvent *ev) { QPainter p; @@ -77,44 +77,44 @@ void Pie3DWidget::paintEvent(QPaintEvent *ev) int fullrot = 360*16; int bowpos = 0; int i, bowlen, bowcut; - + if (_piecelist.isEmpty()) return; - + p.begin(this); p.setClipRegion(ev->region()); - + for (Pie3DPiece *piece = _piecelist.first(); piece; piece = _piecelist.next()) { QPalette piecepal(piece->color(), widgetbg); bowlen = (int) (((double) piece->size())/_totalsize*fullrot); - + p.setPen((_piecelist.count() > 1) ? black : _piecelist.first()->color()); p.setBrush(piecepal.normal().button()); p.drawPie(0, 0, w, h-pieh, bowpos, bowlen); - + if (bowpos+bowlen >= halfrot) // Part of the footer is visible { bowcut = (bowpos < halfrot) ? halfrot-bowpos : 0; bowpos += bowcut; bowlen -= bowcut; - + p.setPen(piecepal.normal().mid()); - + for (i = 0; i < pieh; i++) p.drawArc(0, i, w, h-pieh, bowpos, bowlen); } - + bowpos += bowlen; } - - p.setPen(black); - - p.drawArc(0, 0, w, h-pieh, 0, fullrot); - p.drawArc(0, pieh-1, w, h-pieh, 0, -halfrot); - - p.drawLine(0, (h-pieh)/2, 0, (h+pieh)/2-1); - p.drawLine(w-1, (h-pieh)/2, w-1, (h+pieh)/2-1); - + + p.setPen(black); + + p.drawArc(0, 0, w, h-pieh, 0, fullrot); + p.drawArc(0, pieh-1, w, h-pieh, 0, -halfrot); + + p.drawLine(0, (h-pieh)/2, 0, (h+pieh)/2-1); + p.drawLine(w-1, (h-pieh)/2, w-1, (h+pieh)/2-1); + p.end(); } |