Commit db897f81 authored by Eike Ziller's avatar Eike Ziller

Fix build on Windows

For some reason it doesn't like signals with QFutures. Going back to
pointers, but copying the future from there when it's used.

Change-Id: I8dea0817b4e59ede6874ab8be01f22a92e7402a0
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 0f9827e4
......@@ -549,8 +549,8 @@ void CPPEditorWidget::ctor()
this, SLOT(onDocumentUpdated()));
connect(editorSupport, SIGNAL(semanticInfoUpdated(CppTools::SemanticInfo)),
this, SLOT(updateSemanticInfo(CppTools::SemanticInfo)));
connect(editorSupport, SIGNAL(highlighterStarted(QFuture<TextEditor::HighlightingResult>,uint)),
this, SLOT(highlighterStarted(QFuture<TextEditor::HighlightingResult>,uint)));
connect(editorSupport, SIGNAL(highlighterStarted(QFuture<TextEditor::HighlightingResult>*,uint)),
this, SLOT(highlighterStarted(QFuture<TextEditor::HighlightingResult>*,uint)));
}
m_highlightRevision = 0;
......@@ -1608,7 +1608,7 @@ void CPPEditorWidget::semanticRehighlight(bool force)
m_modelManager->cppEditorSupport(editor())->recalculateSemanticInfoDetached(force);
}
void CPPEditorWidget::highlighterStarted(QFuture<TextEditor::HighlightingResult> highlighter,
void CPPEditorWidget::highlighterStarted(QFuture<TextEditor::HighlightingResult> *highlighter,
unsigned revision)
{
m_highlightRevision = revision;
......@@ -1619,7 +1619,7 @@ void CPPEditorWidget::highlighterStarted(QFuture<TextEditor::HighlightingResult>
connect(m_highlightWatcher.data(), SIGNAL(finished()),
SLOT(finishHighlightSymbolUsages()));
m_highlightWatcher->setFuture(highlighter);
m_highlightWatcher->setFuture(QFuture<TextEditor::HighlightingResult>(*highlighter));
}
void CPPEditorWidget::updateSemanticInfo(const SemanticInfo &semanticInfo)
......
......@@ -156,7 +156,7 @@ public slots:
void showPreProcessorWidget();
void renameUsagesNow(const QString &replacement = QString());
void semanticRehighlight(bool force = false);
void highlighterStarted(QFuture<TextEditor::HighlightingResult> highlighter,
void highlighterStarted(QFuture<TextEditor::HighlightingResult> *highlighter,
unsigned revision);
protected:
......
......@@ -390,7 +390,7 @@ void CppEditorSupport::startHighlighting()
m_highlighter = m_highlightingSupport->highlightingFuture(doc, snapshot);
m_lastHighlightRevision = revision;
emit highlighterStarted(m_highlighter, m_lastHighlightRevision);
emit highlighterStarted(&m_highlighter, m_lastHighlightRevision);
} else {
const unsigned revision = currentSource(false).revision;
if (m_lastHighlightRevision == revision)
......@@ -400,7 +400,7 @@ void CppEditorSupport::startHighlighting()
static const Document::Ptr dummyDoc;
static const Snapshot dummySnapshot;
m_highlighter = m_highlightingSupport->highlightingFuture(dummyDoc, dummySnapshot);
emit highlighterStarted(m_highlighter, m_lastHighlightRevision);
emit highlighterStarted(&m_highlighter, m_lastHighlightRevision);
}
}
......
......@@ -132,7 +132,7 @@ signals:
void documentUpdated();
void diagnosticsChanged();
void semanticInfoUpdated(CppTools::SemanticInfo);
void highlighterStarted(QFuture<TextEditor::HighlightingResult>, unsigned revision);
void highlighterStarted(QFuture<TextEditor::HighlightingResult> *, unsigned revision);
private slots:
void onMimeTypeChanged();
......
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