From ee18d6ea1f3c2f5388abea58bbe3f1f1ff2b2d5c Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 6 Dec 2011 11:41:02 +0100 Subject: Merge QColorDialog::getColor() overloads. Symbian-specific code was removed as a side effect of the merge. Change-Id: I01d28b2aa2fef16ce3988382c2b2a0436c46227c Reviewed-by: John Brooks Reviewed-by: Frederik Gladhorn --- src/widgets/dialogs/qcolordialog.cpp | 34 ---------------------------------- src/widgets/dialogs/qcolordialog.h | 6 +++--- 2 files changed, 3 insertions(+), 37 deletions(-) (limited to 'src/widgets') 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); @@ -2003,25 +1988,6 @@ QColor QColorDialog::getColor(const QColor &initial, QWidget *parent, const QStr return dlg.selectedColor(); } -/*! - 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 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); -- cgit v1.2.3