diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-02-27 21:11:29 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-03-13 11:37:22 +0000 |
commit | 4300f6e9ccf37c16ebde53e1c73cd8e8cfd2cd35 (patch) | |
tree | 2b84034c001e00d2db896898960f245f7279150c /src/widgets/dialogs/qcolordialog.cpp | |
parent | 381fbbf748fd32d1bc210acefff07116f140f5e4 (diff) |
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>
Diffstat (limited to 'src/widgets/dialogs/qcolordialog.cpp')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 0a159117b3..914ee8ec9c 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -67,11 +67,13 @@ QT_BEGIN_NAMESPACE +namespace { class QColorLuminancePicker; class QColorPicker; class QColorShower; class QWellArray; class QColorPickingEventFilter; +} // unnamed namespace class QColorDialogPrivate : public QDialogPrivate { @@ -181,6 +183,8 @@ private: //////////// QWellArray BEGIN +namespace { + struct QWellArrayData; class QWellArray : public QWidget @@ -562,6 +566,8 @@ private: QColorDialogPrivate *m_dp; }; +} // unnamed namespace + /*! Returns the number of custom colors supported by QColorDialog. All 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); } +namespace { + class QColorWell : public QWellArray { public: @@ -1091,8 +1099,8 @@ private: QColorDialog *colorDialog; QGridLayout *gl; - friend class QColorDialog; - friend class QColorDialogPrivate; + friend class QT_PREPEND_NAMESPACE(QColorDialog); + friend class QT_PREPEND_NAMESPACE(QColorDialogPrivate); }; class QColorShowLabel : public QFrame @@ -1381,6 +1389,8 @@ QColorShower::QColorShower(QColorDialog *parent) retranslateStrings(); } +} // unnamed namespace + inline QRgb QColorDialogPrivate::currentColor() const { return cs->currentColor(); } inline int QColorDialogPrivate::currentAlpha() const { return cs->currentAlpha(); } inline void QColorDialogPrivate::setCurrentAlpha(int a) { cs->setCurrentAlpha(a); } |