summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesper K. Pedersen <jesper.pedersen@kdab.com>2013-04-25 13:32:14 +0200
committerJesper K. Pedersen <jesper.pedersen@kdab.com>2013-04-25 14:20:05 +0200
commit3d28db2eb6b6e33ab4ae0f7e976c576a19108dc4 (patch)
tree2de81d25c63745dd79ec3b6c5301e2324859538f
parentff615fc81ac67b52812dde6e08028018e233373c (diff)
There are no signal to wait for when the document is already open
Change-Id: Ie564778558577beb8fe55755550a5b9340fd79e5 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
-rw-r--r--objects/cppeditor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/objects/cppeditor.cpp b/objects/cppeditor.cpp
index 0226ca7..37ef50c 100644
--- a/objects/cppeditor.cpp
+++ b/objects/cppeditor.cpp
@@ -35,6 +35,10 @@ CppFunction* CppEditor::functionAt(int line, int column) const
*/
void CppEditor::waitForInitialized()
{
+ CPlusPlus::Snapshot snapshot = CPlusPlus::CppModelManagerInterface::instance()->snapshot();
+ if (!snapshot.isEmpty())
+ return;
+
SignalWaiter waiter;
const bool received = waiter.wait(CPlusPlus::CppModelManagerInterface::instance(), SIGNAL(sourceFilesRefreshed(QStringList)), 1000);
if ( !received )