If layoutmethod was set to InternalLibrary, then
KGraphViewerPart::openFile() called the async loading method
DotGraphView::loadLibrary(), which defers loading to a LoadAGraphThread.
This one is guarded with a QSemaphore, which is acquired on starting
the thread and only released via the connected-by-event-queue
finished signal of the thread.
So calling KGraphViewerPart::openFile() again while the thread is
still running or the finished signal not yet delivered will result
in a deadlock.
Also does KParts expect reimplementations of ReadOnlyPart::openFile()
to do the loading synchronously and to report the success of completed
loading via the return value, which was not fulfilled by
KGraphViewerPart::openFile().
This patch solves this in a first step by a new method
DotGraphView::loadLibrarySync() and KGraphViewerPart::openFile() using
this one instead. The deadlock issue is only noted with a FIXME,
needs some bigger refactoring possibly.