Remove dead code from QWidgetLineControl

The code for _q_clipboardChanged comes from some ancient time
(Qt 3's QLineEdit::clipboardChanged, subsequently refactored in Qt 4
and Qt 5). The best part: it has always been a slot doing absolutely
nothing. Get rid of it.

Change-Id: Icc2c71920377d069529bb7ed7c40c15f46fbb455
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Giuseppe D'Angelo 2015-12-08 19:19:21 +01:00
parent bee2ad068e
commit f37ea6c5c6
2 changed files with 0 additions and 8 deletions

View File

@ -147,10 +147,7 @@ void QWidgetLineControl::copy(QClipboard::Mode mode) const
{
QString t = selectedText();
if (!t.isEmpty() && m_echoMode == QLineEdit::Normal) {
disconnect(QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0);
QApplication::clipboard()->setText(t, mode);
connect(QApplication::clipboard(), SIGNAL(selectionChanged()),
this, SLOT(_q_clipboardChanged()));
}
}
@ -339,10 +336,6 @@ void QWidgetLineControl::setSelection(int start, int length)
emitCursorPositionChanged();
}
void QWidgetLineControl::_q_clipboardChanged()
{
}
void QWidgetLineControl::_q_deleteSelected()
{
if (!hasSelectedText())

View File

@ -535,7 +535,6 @@ protected:
virtual void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
private Q_SLOTS:
void _q_clipboardChanged();
void _q_deleteSelected();
private: