diff options
author | Robin Burchell <robin.burchell@collabora.com> | 2011-12-06 11:41:02 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-08 17:59:55 +0100 |
commit | ee18d6ea1f3c2f5388abea58bbe3f1f1ff2b2d5c (patch) | |
tree | 4b7eb7e05a92465ca29c486617086bd45ea094d0 /src/widgets | |
parent | ca1af75fb2ca0671bc715e4f7ec3b45939073eb4 (diff) |
Merge QColorDialog::getColor() overloads.
Symbian-specific code was removed as a side effect of the merge.
Change-Id: I01d28b2aa2fef16ce3988382c2b2a0436c46227c
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 34 | ||||
-rw-r--r-- | src/widgets/dialogs/qcolordialog.h | 6 |
2 files changed, 3 insertions, 37 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 1eaaf79bf5..1803cba01d 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1966,12 +1966,6 @@ void QColorDialog::open(QObject *receiver, const char *member) \sa QDialog::open() */ -/* - For Symbian color dialogs -*/ -#ifdef Q_WS_S60 -extern QColor qtSymbianGetColor(const QColor &initial); -#endif /*! \since 4.5 @@ -1981,19 +1975,10 @@ extern QColor qtSymbianGetColor(const QColor &initial); QColor::isValid()) color if the user cancels the dialog. The \a options argument allows you to customize the dialog. - - On Symbian, this static function will use the native color dialog and not a QColorDialog. - On Symbian the parameters \a title and \a parent has no relevance and the - \a options parameter is only used to define if the native color dialog is - used or not. */ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QString &title, ColorDialogOptions options) { -#ifdef Q_WS_S60 - if (!(options & DontUseNativeDialog)) - return qtSymbianGetColor(initial); -#endif QColorDialog dlg(parent); if (!title.isEmpty()) dlg.setWindowTitle(title); @@ -2004,25 +1989,6 @@ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QStr } /*! - Pops up a modal color dialog, lets the user choose a color, and - returns that color. The color is initially set to \a initial. The - dialog is a child of \a parent. It returns an invalid (see - QColor::isValid()) color if the user cancels the dialog. - - On Symbian, this static function will use the native - color dialog and not a QColorDialog. -*/ - -QColor QColorDialog::getColor(const QColor &initial, QWidget *parent) -{ -#ifdef Q_WS_S60 - return qtSymbianGetColor(initial); -#endif - return getColor(initial, parent, QString(), ColorDialogOptions(0)); -} - - -/*! \obsolete Pops up a modal color dialog to allow the user to choose a color diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index fa217c76bf..1d21c06f99 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -95,10 +95,10 @@ public: void setVisible(bool visible); - // ### Qt 5: merge overloads with title = QString() - static QColor getColor(const QColor &initial, QWidget *parent, const QString &title, + static QColor getColor(const QColor &initial = Qt::white, + QWidget *parent = 0, + const QString &title = QString(), ColorDialogOptions options = 0); - static QColor getColor(const QColor &initial = Qt::white, QWidget *parent = 0); // obsolete static QRgb getRgba(QRgb rgba = 0xffffffff, bool *ok = 0, QWidget *parent = 0); |