MCPcopy Create free account
hub / github.com/KDE/okular / clearAndWaitForRequests

Method clearAndWaitForRequests

core/document.cpp:2170–2200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2168}
2169
2170void DocumentPrivate::clearAndWaitForRequests()
2171{
2172 m_pixmapRequestsMutex.lock();
2173 qDeleteAll(m_pixmapRequestsStack);
2174 m_pixmapRequestsStack.clear();
2175 m_pixmapRequestsMutex.unlock();
2176
2177 QEventLoop loop;
2178 bool startEventLoop = false;
2179 do {
2180 m_pixmapRequestsMutex.lock();
2181 startEventLoop = !m_executingPixmapRequests.empty();
2182
2183 if (m_generator->hasFeature(Generator::SupportsCancelling)) {
2184 for (PixmapRequest *executingRequest : std::as_const(m_executingPixmapRequests)) {
2185 executingRequest->d->mShouldAbortRender = 1;
2186 }
2187
2188 if (m_generator->d_ptr->mTextPageGenerationThread) {
2189 m_generator->d_ptr->mTextPageGenerationThread->abortExtraction();
2190 }
2191 }
2192
2193 m_pixmapRequestsMutex.unlock();
2194 if (startEventLoop) {
2195 m_closingLoop = &loop;
2196 loop.exec();
2197 m_closingLoop = nullptr;
2198 }
2199 } while (startEventLoop);
2200}
2201
2202int DocumentPrivate::findFieldPageNumber(Okular::FormField *field)
2203{

Callers 2

closeDocumentMethod · 0.80
swapBackingFileMethod · 0.80

Calls 4

hasFeatureMethod · 0.80
abortExtractionMethod · 0.80
execMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected