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>
This commit is contained in:
Robin Burchell 2011-12-06 11:41:02 +01:00 committed by Qt by Nokia
parent ca1af75fb2
commit ee18d6ea1f
2 changed files with 3 additions and 37 deletions

View File

@ -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

View File

@ -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);