summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2009-10-28 21:32:41 +0100
committermegabigbug <megabigbug@arrakis.(none)>2009-10-28 21:32:41 +0100
commit79d1c486ff67ddb0ce648cca3520cad1f19f81dd (patch)
tree6b9e75f3ae1f5d0013029b5e92c79cad588c9a5c /src
parentrekonq 0.2.90 (diff)
downloadrekonq-79d1c486ff67ddb0ce648cca3520cad1f19f81dd.tar.xz
a small delay before hide popup
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp8
-rw-r--r--src/mainwindow.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f079c8b9..ff33140b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -101,6 +101,7 @@ MainWindow::MainWindow()
, m_mainBar( new KToolBar( QString("MainToolBar"), this, Qt::TopToolBarArea, true, false, false) )
, m_bmBar( new KToolBar( QString("BookmarkToolBar"), this, Qt::TopToolBarArea, true, false, false) )
, m_popup( new KPassivePopup(this) )
+ , m_hidePopup( new QTimer(this) )
, m_ac( new KActionCollection(this) )
{
// enable window size "auto-save"
@@ -146,6 +147,7 @@ MainWindow::MainWindow()
connect(Application::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)), m_popup, SLOT(hide()));
m_popup->setFrameShape(QFrame::NoFrame);
m_popup->setLineWidth(0);
+ connect(m_hidePopup, SIGNAL(timeout()), m_popup, SLOT(hide()));
QTimer::singleShot(0, this, SLOT(postLaunch()));
}
@@ -951,12 +953,12 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
// deleting popus if empty msgs
if(msg.isEmpty())
{
- m_popup->hide();
+ m_hidePopup->start(250);
return;
}
- QPixmap px;
- QString pixPath;
+ m_hidePopup->stop();
+
switch(status)
{
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 64e2067c..50c3e7dc 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -168,6 +168,7 @@ private:
QString m_lastSearch;
KPassivePopup *m_popup;
+ QTimer *m_hidePopup;
KActionCollection *m_ac;