summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-09-27 14:48:51 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-28 03:18:16 +0200
commita85d343a39577cdf953d0759e356c59a77ae743f (patch)
treefdbd9229902d5efc0ca637dc79d6aa7cc5645635 /src/widgets/widgets/qlineedit.cpp
parent3b6bb13e6a197bb4ba85b397ae9d2b8c659d6b26 (diff)
Widgets: Remove QT3_SUPPPORT.
Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ie884f0cc9b3970b01c3c0c26600b1bcd92548077 Reviewed-on: http://codereview.qt-project.org/5629 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/widgets/qlineedit.cpp')
-rw-r--r--src/widgets/widgets/qlineedit.cpp139
1 files changed, 0 insertions, 139 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 30f90cd5db..55b5cd81eb 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -291,67 +291,6 @@ QLineEdit::QLineEdit(const QString& contents, QWidget* parent)
}
-#ifdef QT3_SUPPORT
-/*!
- Constructs a line edit with no text.
-
- The maximum text length is set to 32767 characters.
-
- The \a parent and \a name arguments are sent to the QWidget constructor.
-
- \sa setText(), setMaxLength()
-*/
-QLineEdit::QLineEdit(QWidget* parent, const char* name)
- : QWidget(*new QLineEditPrivate, parent,0)
-{
- Q_D(QLineEdit);
- setObjectName(QString::fromAscii(name));
- d->init(QString());
-}
-
-/*!
- Constructs a line edit containing the text \a contents.
-
- The cursor position is set to the end of the line and the maximum
- text length to 32767 characters.
-
- The \a parent and \a name arguments are sent to the QWidget
- constructor.
-
- \sa text(), setMaxLength()
-*/
-
-QLineEdit::QLineEdit(const QString& contents, QWidget* parent, const char* name)
- : QWidget(*new QLineEditPrivate, parent, 0)
-{
- Q_D(QLineEdit);
- setObjectName(QString::fromAscii(name));
- d->init(contents);
-}
-
-/*!
- Constructs a line edit with an input \a inputMask and the text \a
- contents.
-
- The cursor position is set to the end of the line and the maximum
- text length is set to the length of the mask (the number of mask
- characters and separators).
-
- The \a parent and \a name arguments are sent to the QWidget
- constructor.
-
- \sa setMask() text()
-*/
-QLineEdit::QLineEdit(const QString& contents, const QString &inputMask, QWidget* parent, const char* name)
- : QWidget(*new QLineEditPrivate, parent, 0)
-{
- Q_D(QLineEdit);
- setObjectName(QString::fromAscii(name));
- d->init(contents);
- d->control->setInputMask(inputMask);
- d->control->moveCursor(d->control->nextMaskBlank(contents.length()));
-}
-#endif
/*!
Destroys the line edit.
@@ -730,33 +669,6 @@ int QLineEdit::cursorPositionAt(const QPoint &pos)
}
-#ifdef QT3_SUPPORT
-/*! \obsolete
-
- Use setText(), setCursorPosition() and setSelection() instead.
-*/
-bool QLineEdit::validateAndSet(const QString &newText, int newPos,
- int newMarkAnchor, int newMarkDrag)
-{
- // The suggested functions above in the docs don't seem to validate,
- // below code tries to mimic previous behaviour.
- QString oldText = text();
- setText(newText);
- if(!hasAcceptableInput()){
- setText(oldText);
- return false;
- }
- int selstart = qMin(newMarkAnchor, newMarkDrag);
- int sellength = qAbs(newMarkAnchor - newMarkDrag);
- if (selstart == newPos) {
- selstart = qMax(newMarkAnchor, newMarkDrag);
- sellength = -sellength;
- }
- //setSelection also set the position
- setSelection(selstart, sellength);
- return true;
-}
-#endif //QT3_SUPPORT
/*!
\property QLineEdit::alignment
@@ -986,54 +898,6 @@ int QLineEdit::selectionStart() const
}
-#ifdef QT3_SUPPORT
-
-/*!
- \fn void QLineEdit::lostFocus()
-
- This signal is emitted when the line edit has lost focus.
-
- Use editingFinished() instead
- \sa editingFinished(), returnPressed()
-*/
-
-/*!
- Use isModified() instead.
-*/
-bool QLineEdit::edited() const { return isModified(); }
-/*!
- Use setModified() or setText().
-*/
-void QLineEdit::setEdited(bool on) { setModified(on); }
-
-/*!
- There exists no equivalent functionality in Qt 4.
-*/
-int QLineEdit::characterAt(int xpos, QChar *chr) const
-{
- Q_D(const QLineEdit);
- int pos = d->xToPos(xpos + contentsRect().x() - d->hscroll + d->horizontalMargin);
- QString txt = d->control->text();
- if (chr && pos < (int) txt.length())
- *chr = txt.at(pos);
- return pos;
-
-}
-
-/*!
- Use selectedText() and selectionStart() instead.
-*/
-bool QLineEdit::getSelection(int *start, int *end)
-{
- Q_D(QLineEdit);
- if (d->control->hasSelectedText() && start && end) {
- *start = selectionStart();
- *end = *start + selectedText().length();
- return true;
- }
- return false;
-}
-#endif
/*!
@@ -1857,9 +1721,6 @@ void QLineEdit::focusOutEvent(QFocusEvent *e)
|| !(QApplication::activePopupWidget() && QApplication::activePopupWidget()->parentWidget() == this)) {
if (hasAcceptableInput() || d->control->fixup())
emit editingFinished();
-#ifdef QT3_SUPPORT
- emit lostFocus();
-#endif
}
#ifdef Q_WS_MAC
if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho)