mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
Ref T591, avoid duplicated text message lines
* also consider Qt::Key_Enter (NUMPAD) * signal returnPressedUnemptyLine * use signal returnPressedUnemptyLine instead of returnPressed which avoids empty lines
This commit is contained in:
committed by
Mat Sutcliffe
parent
3bb5efcb29
commit
dc6e18b5a2
@@ -19,6 +19,7 @@ namespace BlackGui
|
||||
{
|
||||
/*!
|
||||
* Line edit with history
|
||||
* \details lines are trimmed and empty lines are ignored
|
||||
*/
|
||||
class BLACKGUI_EXPORT CLineEditHistory : public QLineEdit
|
||||
{
|
||||
@@ -37,6 +38,11 @@ namespace BlackGui
|
||||
//! Clear the history
|
||||
void clearHistory();
|
||||
|
||||
signals:
|
||||
//! Return has been pressed, line is NOT empty (spaces are trimmed)
|
||||
//! \details returnPressed alsofires on empty lines, but those are not in the history
|
||||
void returnPressedUnemptyLine();
|
||||
|
||||
protected:
|
||||
//! \copydoc QLineEdit::keyPressEvent
|
||||
virtual void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
Reference in New Issue
Block a user