Use QMetaObject::invokeMethod instead of signal-slot hack.

This commit is contained in:
con
2009-06-19 13:49:52 +02:00
parent 2508fa03a0
commit 75709964ab
6 changed files with 4 additions and 19 deletions

View File

@@ -71,8 +71,5 @@ void AllProjectsFilter::updateFiles()
void AllProjectsFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future);
// invokeAsyncronouslyOnGuiThread
connect(this, SIGNAL(invokeRefresh()), this, SLOT(markFilesAsOutOfDate()));
emit invokeRefresh();
disconnect(this, SIGNAL(invokeRefresh()), this, SLOT(markFilesAsOutOfDate()));
QMetaObject::invokeMethod(this, "markFilesAsOutOfDate", Qt::BlockingQueuedConnection);
}

View File

@@ -58,8 +58,6 @@ protected:
private slots:
void markFilesAsOutOfDate();
signals:
void invokeRefresh();
private:
ProjectExplorerPlugin *m_projectExplorer;
bool m_filesUpToDate;

View File

@@ -88,8 +88,5 @@ void CurrentProjectFilter::currentProjectChanged(ProjectExplorer::Project *proje
void CurrentProjectFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future);
// invokeAsyncronouslyOnGuiThread
connect(this, SIGNAL(invokeRefresh()), this, SLOT(markFilesAsOutOfDate()));
emit invokeRefresh();
disconnect(this, SIGNAL(invokeRefresh()), this, SLOT(markFilesAsOutOfDate()));
QMetaObject::invokeMethod(this, "markFilesAsOutOfDate", Qt::BlockingQueuedConnection);
}

View File

@@ -63,9 +63,6 @@ private slots:
void currentProjectChanged(ProjectExplorer::Project *project);
void markFilesAsOutOfDate();
signals:
void invokeRefresh();
private:
ProjectExplorerPlugin *m_projectExplorer;

View File

@@ -83,10 +83,7 @@ void OpenDocumentsFilter::refreshInternally()
void OpenDocumentsFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future);
// invokeAsyncronouslyOnGuiThread
connect(this, SIGNAL(invokeRefresh()), this, SLOT(refreshInternally()));
emit invokeRefresh();
disconnect(this, SIGNAL(invokeRefresh()), this, SLOT(refreshInternally()));
QMetaObject::invokeMethod(this, "refreshInternally", Qt::BlockingQueuedConnection);
}
void OpenDocumentsFilter::accept(FilterEntry selection) const

View File

@@ -59,8 +59,7 @@ public:
public slots:
void refreshInternally();
signals:
void invokeRefresh();
private:
Core::EditorManager *m_editorManager;