Merge overloads of QInputDialog::getText() and QInputDialog::getItem()

Change-Id: Ifaefaa5c3faa698c8570da4ef00e130c211b2609
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Robin Burchell 2012-01-21 19:37:39 +02:00 committed by Qt by Nokia
parent 75292d0442
commit 10a034f027
2 changed files with 1 additions and 39 deletions

View File

@ -1172,17 +1172,6 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
}
}
/*!
\internal
*/
// ### Qt 5: Use only the version above.
QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode mode, const QString &text, bool *ok,
Qt::WindowFlags flags)
{
return getText(parent, title, label, mode, text, ok, flags, Qt::ImhNone);
}
/*!
\since 4.5
@ -1341,17 +1330,6 @@ QString QInputDialog::getItem(QWidget *parent, const QString &title, const QStri
}
}
/*!
\internal
*/
// ### Qt 5: Use only the version above.
QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label,
const QStringList &items, int current, bool editable, bool *ok,
Qt::WindowFlags flags)
{
return getItem(parent, title, label, items, current, editable, ok, flags, Qt::ImhNone);
}
/*!
\obsolete

View File

@ -167,7 +167,6 @@ public:
void setVisible(bool visible);
#ifdef Q_QDOC
static QString getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode echo = QLineEdit::Normal,
const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0,
@ -176,22 +175,7 @@ public:
const QStringList &items, int current = 0, bool editable = true,
bool *ok = 0, Qt::WindowFlags flags = 0,
Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
#else
static QString getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode echo = QLineEdit::Normal,
const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0);
static QString getItem(QWidget *parent, const QString &title, const QString &label,
const QStringList &items, int current = 0, bool editable = true,
bool *ok = 0, Qt::WindowFlags flags = 0);
static QString getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode echo,
const QString &text, bool *ok, Qt::WindowFlags flags,
Qt::InputMethodHints inputMethodHints);
static QString getItem(QWidget *parent, const QString &title, const QString &label,
const QStringList &items, int current, bool editable,
bool *ok, Qt::WindowFlags flags,
Qt::InputMethodHints inputMethodHints);
#endif
static int getInt(QWidget *parent, const QString &title, const QString &label, int value = 0,
int minValue = -2147483647, int maxValue = 2147483647,
int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0);