Remove dead code from QColorDialog
Detected by GCC 6. Change-Id: I24a735698d3c4a719fc9ffff1425f193511406f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
parent
186d391f25
commit
56b5706ce0
@ -168,8 +168,6 @@ private:
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
struct QWellArrayData;
|
|
||||||
|
|
||||||
class QWellArray : public QWidget
|
class QWellArray : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -189,8 +187,6 @@ public:
|
|||||||
|
|
||||||
QSize sizeHint() const Q_DECL_OVERRIDE;
|
QSize sizeHint() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
virtual void setCellBrush(int row, int col, const QBrush &);
|
|
||||||
|
|
||||||
inline int cellWidth() const
|
inline int cellWidth() const
|
||||||
{ return cellw; }
|
{ return cellw; }
|
||||||
|
|
||||||
@ -257,7 +253,6 @@ private:
|
|||||||
int curCol;
|
int curCol;
|
||||||
int selRow;
|
int selRow;
|
||||||
int selCol;
|
int selCol;
|
||||||
QWellArrayData *d;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void QWellArray::paintEvent(QPaintEvent *e)
|
void QWellArray::paintEvent(QPaintEvent *e)
|
||||||
@ -307,15 +302,10 @@ void QWellArray::paintEvent(QPaintEvent *e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct QWellArrayData {
|
|
||||||
QBrush *brush;
|
|
||||||
};
|
|
||||||
|
|
||||||
QWellArray::QWellArray(int rows, int cols, QWidget *parent)
|
QWellArray::QWellArray(int rows, int cols, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
,nrows(rows), ncols(cols)
|
,nrows(rows), ncols(cols)
|
||||||
{
|
{
|
||||||
d = 0;
|
|
||||||
setFocusPolicy(Qt::StrongFocus);
|
setFocusPolicy(Qt::StrongFocus);
|
||||||
cellw = 28;
|
cellw = 28;
|
||||||
cellh = 24;
|
cellh = 24;
|
||||||
@ -364,14 +354,12 @@ void QWellArray::paintCell(QPainter* p, int row, int col, const QRect &rect)
|
|||||||
*/
|
*/
|
||||||
void QWellArray::paintCellContents(QPainter *p, int row, int col, const QRect &r)
|
void QWellArray::paintCellContents(QPainter *p, int row, int col, const QRect &r)
|
||||||
{
|
{
|
||||||
if (d) {
|
Q_UNUSED(row);
|
||||||
p->fillRect(r, d->brush[row*numCols()+col]);
|
Q_UNUSED(col);
|
||||||
} else {
|
p->fillRect(r, Qt::white);
|
||||||
p->fillRect(r, Qt::white);
|
p->setPen(Qt::black);
|
||||||
p->setPen(Qt::black);
|
p->drawLine(r.topLeft(), r.bottomRight());
|
||||||
p->drawLine(r.topLeft(), r.bottomRight());
|
p->drawLine(r.topRight(), r.bottomLeft());
|
||||||
p->drawLine(r.topRight(), r.bottomLeft());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWellArray::mousePressEvent(QMouseEvent *e)
|
void QWellArray::mousePressEvent(QMouseEvent *e)
|
||||||
@ -447,17 +435,6 @@ void QWellArray::focusInEvent(QFocusEvent*)
|
|||||||
emit currentChanged(curRow, curCol);
|
emit currentChanged(curRow, curCol);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWellArray::setCellBrush(int row, int col, const QBrush &b)
|
|
||||||
{
|
|
||||||
if (!d) {
|
|
||||||
d = new QWellArrayData;
|
|
||||||
int i = numRows()*numCols();
|
|
||||||
d->brush = new QBrush[i];
|
|
||||||
}
|
|
||||||
if (row >= 0 && row < numRows() && col >= 0 && col < numCols())
|
|
||||||
d->brush[row*numCols()+col] = b;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!\reimp
|
/*!\reimp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user