as David pointed out: Qt4 has a nicer approach for asynchronous events than using QTimer

svn path=/trunk/KDE/kdebase/apps/; revision=706669
This commit is contained in:
Peter Penz 2007-08-31 05:16:04 +00:00
parent 52648c9634
commit 5e27ba1de2
3 changed files with 3 additions and 4 deletions

View file

@ -144,7 +144,7 @@ const QString& DolphinStatusBar::defaultText() const
void DolphinStatusBar::resizeEvent(QResizeEvent* event)
{
QWidget::resizeEvent(event);
QTimer::singleShot(0, this, SLOT(showSpaceInfo()));
QMetaObject::invokeMethod(this, "showSpaceInfo", Qt::QueuedConnection);
}
void DolphinStatusBar::updateProgressInfo()

View file

@ -99,7 +99,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
text = i18nc("@info:status", "Getting size...");
} else {
text = QString();
QTimer::singleShot(0, this, SLOT(hide()));
QMetaObject::invokeMethod(this, "hide", Qt::QueuedConnection);
}
}

View file

@ -35,7 +35,6 @@
#include <QTreeView>
#include <QBoxLayout>
#include <QModelIndex>
#include <QTimer>
TreeViewSidebarPage::TreeViewSidebarPage(QWidget* parent) :
SidebarPage(parent),
@ -194,7 +193,7 @@ void TreeViewSidebarPage::triggerExpanding(const QModelIndex& index)
Q_UNUSED(index);
// the expanding of the folders may not be done in the context
// of this slot
QTimer::singleShot(0, this, SLOT(expandToLeafDir()));
QMetaObject::invokeMethod(this, "expandToLeafDir", Qt::QueuedConnection);
}
void TreeViewSidebarPage::expandToLeafDir()