forked from qt-creator/qt-creator
FancyLineEdit: Don't save empty item in history on destruction
This would save an empty item in the history at shutdown, even if the user didn't do anything at all. Task-number: QTCREATORBUG-24762 Change-Id: I963e47e0d6e0ed17687ce8f887e3e240afb9e45f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -213,7 +213,8 @@ FancyLineEdit::~FancyLineEdit()
|
|||||||
// the QueuedConnection don't have enough time to call slot callback
|
// the QueuedConnection don't have enough time to call slot callback
|
||||||
// because edit widget and all of its connections are destroyed before
|
// because edit widget and all of its connections are destroyed before
|
||||||
// QCoreApplicationPrivate::sendPostedEvents dispatch our queued signal.
|
// QCoreApplicationPrivate::sendPostedEvents dispatch our queued signal.
|
||||||
d->m_historyCompleter->addEntry(text());
|
if (!text().isEmpty())
|
||||||
|
d->m_historyCompleter->addEntry(text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user