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 @@ ...@@ -9,6 +9,9 @@
// Qt // Qt
#include <QMouseEvent> #include <QMouseEvent>
#include <QMenu>
#include <QMenuBar>
#include <QStatusBar>
// KDE // KDE
#include <KAcceleratorManager> #include <KAcceleratorManager>
...@@ -18,8 +21,7 @@ ...@@ -18,8 +21,7 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <KWindowEffects> #include <KWindowEffects>
#include <QMenu>
#include <QMenuBar>
#include <KMessageBox> #include <KMessageBox>
#include <KStandardAction> #include <KStandardAction>
#include <KStandardGuiItem> #include <KStandardGuiItem>
...@@ -129,6 +131,12 @@ MainWindow::MainWindow() : ...@@ -129,6 +131,12 @@ MainWindow::MainWindow() :
applyKonsoleSettings(); applyKonsoleSettings();
connect(KonsoleSettings::self(), &Konsole::KonsoleSettings::configChanged, this, connect(KonsoleSettings::self(), &Konsole::KonsoleSettings::configChanged, this,
&Konsole::MainWindow::applyKonsoleSettings); &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() void MainWindow::updateUseTransparency()
...@@ -918,7 +926,13 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) ...@@ -918,7 +926,13 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
default: ; 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); 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