summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libqtaux/qcolordialog.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libqtaux/qcolordialog.cpp b/libqtaux/qcolordialog.cpp
index ccef0ad..830fef6 100644
--- a/libqtaux/qcolordialog.cpp
+++ b/libqtaux/qcolordialog.cpp
@@ -531,40 +531,40 @@ int QColorDialog::customCount()
return 2*8;
}
/*!
Returns custom color number \a i as a QRgb.
*/
QRgb QColorDialog::customColor( int i )
{
initRGB();
if ( i < 0 || i >= customCount() ) {
#ifdef CHECK_RANGE
qWarning( "QColorDialog::customColor() index %d out of range", i );
-#endif
+#endif
i = 0;
}
return cusrgb[i];
}
/*!
Sets custom color number \a i to the QRgb value \a c.
*/
void QColorDialog::setCustomColor( int i, QRgb c )
{
initRGB();
if ( i < 0 || i >= customCount() ) {
#ifdef CHECK_RANGE
qWarning( "QColorDialog::customColor() index %d out of range", i );
-#endif
+#endif
return;
}
cusrgb[i] = c;
}
static inline void rgb2hsv( QRgb rgb, int&h, int&s, int&v )
{
QColor c;
c.setRgb( rgb );
c.getHsv(h,s,v);
}
@@ -1094,24 +1094,26 @@ void QColorShowLabel::mouseMoveEvent( QMouseEvent *e )
return;
if ( ( pressPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() ) {
QColorDrag *drg = new QColorDrag( col, this );
QPixmap pix( 30, 20 );
pix.fill( col );
QPainter p( &pix );
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
mousePressed = FALSE;
drg->dragCopy();
}
+#else
+ Q_UNUSED( e )
#endif
}
#ifndef QT_NO_DRAGANDDROP
void QColorShowLabel::dragEnterEvent( QDragEnterEvent *e )
{
if ( QColorDrag::canDecode( e ) )
e->accept();
else
e->ignore();
}
@@ -1620,13 +1622,13 @@ void QColorDialog::setSelectedAlpha( int a )
/*!
Returns the value selected for the alpha channel.
*/
int QColorDialog::selectedAlpha() const
{
return d->currentAlpha();
}
-#include "qcolordialog.moc" \ No newline at end of file
+#include "qcolordialog.moc"