Added "renamed" signal to KEditListBox.

This does not break the existing API, it only adds one new signal.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/145/head
Mavridis Philippe 3 years ago
parent 2b3ea27bdf
commit 0b36532ead
Signed by: blu.256
GPG Key ID: F8D2D7E2F989A494

@ -174,10 +174,12 @@ void KEditListBox::typedSomething(const TQString& text)
// of currentItem() ... like changing it or emitting signals ...
// but TT disagree with me on this one (it's been that way since ages ... grrr)
bool block = m_listBox->signalsBlocked();
const TQString& oldText = currentText();
m_listBox->blockSignals( true );
m_listBox->changeItem(text, currentItem());
m_listBox->blockSignals( block );
emit changed();
emit renamed(oldText, text);
}
}

@ -212,6 +212,12 @@ public:
*/
void removed( const TQString & text );
/**
* This signal is emitted when the user renames a list item.
* @since R14.1.0
*/
void renamed( const TQString &from, const TQString &to );
protected slots:
//the names should be self-explaining
void moveItemUp();

Loading…
Cancel
Save