Skip to content
Snippets Groups Projects
Commit 75709964 authored by con's avatar con
Browse files

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

parent 2508fa03
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment