QColorDialog: move all helper classes into the unnamed namespace

Effects on Linux GCC 4.9 stripped release builds:
  text   -984B
  data    +-0B
  relocs  +-0

Change-Id: Iff914e745939f183ba51b4e625ff795d6b44023a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Marc Mutz 2015-02-27 21:11:29 +01:00
parent 381fbbf748
commit 4300f6e9cc

View File

@ -67,11 +67,13 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace {
class QColorLuminancePicker; class QColorLuminancePicker;
class QColorPicker; class QColorPicker;
class QColorShower; class QColorShower;
class QWellArray; class QWellArray;
class QColorPickingEventFilter; class QColorPickingEventFilter;
} // unnamed namespace
class QColorDialogPrivate : public QDialogPrivate class QColorDialogPrivate : public QDialogPrivate
{ {
@ -181,6 +183,8 @@ private:
//////////// QWellArray BEGIN //////////// QWellArray BEGIN
namespace {
struct QWellArrayData; struct QWellArrayData;
class QWellArray : public QWidget class QWellArray : public QWidget
@ -562,6 +566,8 @@ private:
QColorDialogPrivate *m_dp; QColorDialogPrivate *m_dp;
}; };
} // unnamed namespace
/*! /*!
Returns the number of custom colors supported by QColorDialog. All Returns the number of custom colors supported by QColorDialog. All
color dialogs share the same custom colors. color dialogs share the same custom colors.
@ -622,6 +628,8 @@ static inline void rgb2hsv(QRgb rgb, int &h, int &s, int &v)
c.getHsv(&h, &s, &v); c.getHsv(&h, &s, &v);
} }
namespace {
class QColorWell : public QWellArray class QColorWell : public QWellArray
{ {
public: public:
@ -1091,8 +1099,8 @@ private:
QColorDialog *colorDialog; QColorDialog *colorDialog;
QGridLayout *gl; QGridLayout *gl;
friend class QColorDialog; friend class QT_PREPEND_NAMESPACE(QColorDialog);
friend class QColorDialogPrivate; friend class QT_PREPEND_NAMESPACE(QColorDialogPrivate);
}; };
class QColorShowLabel : public QFrame class QColorShowLabel : public QFrame
@ -1381,6 +1389,8 @@ QColorShower::QColorShower(QColorDialog *parent)
retranslateStrings(); retranslateStrings();
} }
} // unnamed namespace
inline QRgb QColorDialogPrivate::currentColor() const { return cs->currentColor(); } inline QRgb QColorDialogPrivate::currentColor() const { return cs->currentColor(); }
inline int QColorDialogPrivate::currentAlpha() const { return cs->currentAlpha(); } inline int QColorDialogPrivate::currentAlpha() const { return cs->currentAlpha(); }
inline void QColorDialogPrivate::setCurrentAlpha(int a) { cs->setCurrentAlpha(a); } inline void QColorDialogPrivate::setCurrentAlpha(int a) { cs->setCurrentAlpha(a); }