Fix dis/connects in the panelview

When porting to the new syntax I saw that the slot was also missing, I
made it trigger the unhide timer.

REVIEW: 116613
This commit is contained in:
Aleix Pol 2014-03-05 14:26:35 +01:00
parent b388a0d76b
commit 017387a0b2
2 changed files with 8 additions and 2 deletions

View File

@ -328,9 +328,9 @@ void PanelView::setVisibilityMode(PanelView::VisibilityMode mode)
//life is vastly simpler if we ensure we're visible now //life is vastly simpler if we ensure we're visible now
show(); show();
disconnect(containment(), SIGNAL(activate()), this, SLOT(unhide())); disconnect(containment(), &Plasma::Applet::activated, this, &PanelView::unhide);
if (!(mode == NormalPanel || mode == WindowsGoBelow)) { if (!(mode == NormalPanel || mode == WindowsGoBelow)) {
connect(containment(), SIGNAL(activate()), this, SLOT(unhide())); connect(containment(), &Plasma::Applet::activated, this, &PanelView::unhide);
} }
config().writeEntry("panelVisibility", (int)mode); config().writeEntry("panelVisibility", (int)mode);
@ -630,6 +630,11 @@ bool PanelView::event(QEvent *e)
return View::event(e); return View::event(e);
} }
void PanelView::unhide()
{
m_unhideTimer.start();
}
void PanelView::updateStruts() void PanelView::updateStruts()
{ {
if (!containment() || !screen()) { if (!containment() || !screen()) {

View File

@ -110,6 +110,7 @@ private Q_SLOTS:
void positionPanel(); void positionPanel();
void restore(); void restore();
void updateUnhideTrigger(); void updateUnhideTrigger();
void unhide();
private: private: