Skip to content

Instantly share code, notes, and snippets.

@torarnv
Created February 17, 2014 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torarnv/9053205 to your computer and use it in GitHub Desktop.
Save torarnv/9053205 to your computer and use it in GitHub Desktop.
diff --git i/src/gui/text/qfontengine.cpp w/src/gui/text/qfontengine.cpp
index 0725ca4..83e64a5 100644
--- i/src/gui/text/qfontengine.cpp
+++ w/src/gui/text/qfontengine.cpp
@@ -1355,6 +1355,28 @@ QFixed QFontEngine::lastRightBearing(const QGlyphLayout &glyphs, bool round)
return 0;
}
+
+QFontEngine::GlyphCacheEntry::GlyphCacheEntry()
+ : context(0)
+{
+}
+
+QFontEngine::GlyphCacheEntry::GlyphCacheEntry(const GlyphCacheEntry &o)
+ : context(o.context), cache(o.cache)
+{
+}
+
+QFontEngine::GlyphCacheEntry::~GlyphCacheEntry()
+{
+}
+
+QFontEngine::GlyphCacheEntry &QFontEngine::GlyphCacheEntry::operator=(const GlyphCacheEntry &o)
+{
+ context = o.context;
+ cache = o.cache;
+ return *this;
+}
+
// ------------------------------------------------------------------
// The box font engine
// ------------------------------------------------------------------
diff --git i/src/gui/text/qfontengine_p.h w/src/gui/text/qfontengine_p.h
index ab279fb..0bfb9e7 100644
--- i/src/gui/text/qfontengine_p.h
+++ w/src/gui/text/qfontengine_p.h
@@ -312,6 +312,12 @@ protected:
private:
struct GlyphCacheEntry {
+ GlyphCacheEntry();
+ GlyphCacheEntry(const GlyphCacheEntry &);
+ ~GlyphCacheEntry();
+
+ GlyphCacheEntry &operator=(const GlyphCacheEntry &);
+
const void *context;
QExplicitlySharedDataPointer<QFontEngineGlyphCache> cache;
bool operator==(const GlyphCacheEntry &other) const { return context == other.context && cache == other.cache; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment