Commit 75709964 authored by con's avatar con

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

parent 2508fa03
......@@ -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);
}
......@@ -58,8 +58,6 @@ protected:
private slots:
void markFilesAsOutOfDate();
signals:
void invokeRefresh();
private:
ProjectExplorerPlugin *m_projectExplorer;
bool m_filesUpToDate;
......
......@@ -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);
}
......@@ -63,9 +63,6 @@ private slots:
void currentProjectChanged(ProjectExplorer::Project *project);
void markFilesAsOutOfDate();
signals:
void invokeRefresh();
private:
ProjectExplorerPlugin *m_projectExplorer;
......
......@@ -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
......
......@@ -59,8 +59,7 @@ public:
public slots:
void refreshInternally();
signals:
void invokeRefresh();
private:
Core::EditorManager *m_editorManager;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment