mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
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:
parent
52648c9634
commit
5e27ba1de2
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue