From: Robin Burchell Date: Sat, 21 Jan 2012 17:37:39 +0000 (+0200) Subject: Merge overloads of QInputDialog::getText() and QInputDialog::getItem() X-Git-Tag: qt-v5.0.0-alpha1~1677 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10a034f0271b712a4eadcea9b17db407e032d860;p=profile%2Fivi%2Fqtbase.git Merge overloads of QInputDialog::getText() and QInputDialog::getItem() Change-Id: Ifaefaa5c3faa698c8570da4ef00e130c211b2609 Reviewed-by: Richard J. Moore --- diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp index dc7e303..903d50e 100644 --- a/src/widgets/dialogs/qinputdialog.cpp +++ b/src/widgets/dialogs/qinputdialog.cpp @@ -1173,17 +1173,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 Static convenience function to get an integer input from the user. @@ -1342,17 +1331,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 Use getInt() instead. diff --git a/src/widgets/dialogs/qinputdialog.h b/src/widgets/dialogs/qinputdialog.h index 164e0d1..31ba6a3 100644 --- a/src/widgets/dialogs/qinputdialog.h +++ b/src/widgets/dialogs/qinputdialog.h @@ -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);