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:
parent
bee2ad068e
commit
f37ea6c5c6
@ -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())
|
||||
|
@ -535,7 +535,6 @@ protected:
|
||||
virtual void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
|
||||
|
||||
private Q_SLOTS:
|
||||
void _q_clipboardChanged();
|
||||
void _q_deleteSelected();
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user