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();
|
QString t = selectedText();
|
||||||
if (!t.isEmpty() && m_echoMode == QLineEdit::Normal) {
|
if (!t.isEmpty() && m_echoMode == QLineEdit::Normal) {
|
||||||
disconnect(QApplication::clipboard(), SIGNAL(selectionChanged()), this, 0);
|
|
||||||
QApplication::clipboard()->setText(t, mode);
|
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();
|
emitCursorPositionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWidgetLineControl::_q_clipboardChanged()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void QWidgetLineControl::_q_deleteSelected()
|
void QWidgetLineControl::_q_deleteSelected()
|
||||||
{
|
{
|
||||||
if (!hasSelectedText())
|
if (!hasSelectedText())
|
||||||
|
@ -535,7 +535,6 @@ protected:
|
|||||||
virtual void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
|
virtual void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void _q_clipboardChanged();
|
|
||||||
void _q_deleteSelected();
|
void _q_deleteSelected();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user