Qt: Restore the filename in the status bar.

Change isNull checks to isEmpty. This keeps us from pushing an empty
field status and clobbering the file name in the status bar. Make sure
we do the same for other statuses.

Change-Id: I68ea669bdafc6e1177c1b8aaa07781464371de96
Reviewed-on: https://code.wireshark.org/review/13175
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2016-01-10 12:24:35 -08:00 committed by Gerald Combs
parent 20f1100312
commit 8ee0be1513
1 changed files with 12 additions and 4 deletions

View File

@ -294,7 +294,7 @@ void MainStatusBar::popFileStatus() {
}
void MainStatusBar::pushFieldStatus(const QString &message) {
if (message.isNull()) {
if (message.isEmpty()) {
popFieldStatus();
} else {
info_status_.pushText(message, STATUS_CTX_FIELD);
@ -307,7 +307,7 @@ void MainStatusBar::popFieldStatus() {
void MainStatusBar::pushByteStatus(const QString &message)
{
if (message.isNull()) {
if (message.isEmpty()) {
popByteStatus();
} else {
info_status_.pushText(message, STATUS_CTX_BYTE);
@ -320,7 +320,11 @@ void MainStatusBar::popByteStatus()
}
void MainStatusBar::pushFilterStatus(const QString &message) {
info_status_.pushText(message, STATUS_CTX_FILTER);
if (message.isEmpty()) {
popFilterStatus();
} else {
info_status_.pushText(message, STATUS_CTX_FILTER);
}
expertUpdate();
}
@ -329,7 +333,11 @@ void MainStatusBar::popFilterStatus() {
}
void MainStatusBar::pushPacketStatus(const QString &message) {
packet_status_.pushText(message, STATUS_CTX_MAIN);
if (message.isEmpty()) {
popPacketStatus();
} else {
packet_status_.pushText(message, STATUS_CTX_MAIN);
}
}
void MainStatusBar::popPacketStatus() {