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

Method findByName

generators/dvi/fontEncodingPool.cpp:24–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24fontEncoding *fontEncodingPool::findByName(const QString &name)
25{
26 fontEncoding *ptr = dictionary.value(name);
27
28 if (ptr == nullptr) {
29 ptr = new fontEncoding(name);
30 if (ptr->isValid()) {
31 dictionary.insert(name, ptr);
32 } else {
33 delete ptr;
34 ptr = nullptr;
35 }
36 }
37
38 return ptr;
39}
40
41#endif // HAVE_FREETYPE

Callers 1

fontNameReceiverMethod · 0.80

Calls 2

valueMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected