Commit 7114a1e0 authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

Filter out the statusBar shoe event

KXmlGui uses by default a statusbar and we do not want that
parent ec4a6f43
......@@ -9,6 +9,9 @@
// Qt
#include <QMouseEvent>
#include <QMenu>
#include <QMenuBar>
#include <QStatusBar>
// KDE
#include <KAcceleratorManager>
......@@ -18,8 +21,7 @@
#include <KLocalizedString>
#include <KWindowEffects>
#include <QMenu>
#include <QMenuBar>
#include <KMessageBox>
#include <KStandardAction>
#include <KStandardGuiItem>
......@@ -129,6 +131,12 @@ MainWindow::MainWindow() :
applyKonsoleSettings();
connect(KonsoleSettings::self(), &Konsole::KonsoleSettings::configChanged, this,
&Konsole::MainWindow::applyKonsoleSettings);
// KXMLGui is making the status bar always visible, we need to fix in a proper way.
if (statusBar()) {
statusBar()->installEventFilter(this);
}
}
void MainWindow::updateUseTransparency()
......@@ -918,7 +926,13 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
default: ;
}
}
if (qobject_cast<QStatusBar*>(obj)) {
switch(event->type()) {
case QEvent::Show: statusBar()->hide(); break;
default: return true;
}
return true;
}
return KXmlGuiWindow::eventFilter(obj, event);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment