mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
do not inherit QObject from QFontEngine
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
04df82a5b2
commit
f6bec01cb2
3 changed files with 8 additions and 17 deletions
|
@ -1329,11 +1329,13 @@ void QFontCache::clear()
|
|||
EngineCache::ConstIterator it = engineCache.constBegin(),
|
||||
end = engineCache.constEnd();
|
||||
while (it != end) {
|
||||
if (!it.value()->ref.deref())
|
||||
delete it.value();
|
||||
else
|
||||
QFontEngine* engine = it.value();
|
||||
if (!engine->ref.deref()) {
|
||||
delete engine;
|
||||
} else {
|
||||
FC_DEBUG("QFontCache::~QFontCache: engineData %p still has refcount %d",
|
||||
it.value(), int(it.value()->ref));
|
||||
engine, int(engine->ref));
|
||||
}
|
||||
++it;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,16 +36,11 @@ QT_BEGIN_NAMESPACE
|
|||
// QFontEngine
|
||||
|
||||
QFontEngine::QFontEngine()
|
||||
: QObject(),
|
||||
ref(1)
|
||||
: ref(1)
|
||||
{
|
||||
fsType = 0;
|
||||
}
|
||||
|
||||
QFontEngine::~QFontEngine()
|
||||
{
|
||||
}
|
||||
|
||||
QFixed QFontEngine::lineThickness() const
|
||||
{
|
||||
// ad hoc algorithm
|
||||
|
@ -304,10 +299,6 @@ QFontEngineBox::QFontEngineBox(int size)
|
|||
{
|
||||
}
|
||||
|
||||
QFontEngineBox::~QFontEngineBox()
|
||||
{
|
||||
}
|
||||
|
||||
bool QFontEngineBox::stringToCMap(const QChar *, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags) const
|
||||
{
|
||||
if (*nglyphs < len) {
|
||||
|
|
|
@ -57,7 +57,7 @@ struct QGlyphLayout;
|
|||
)
|
||||
|
||||
|
||||
class Q_GUI_EXPORT QFontEngine : public QObject
|
||||
class Q_GUI_EXPORT QFontEngine
|
||||
{
|
||||
public:
|
||||
enum Type {
|
||||
|
@ -66,7 +66,6 @@ public:
|
|||
};
|
||||
|
||||
QFontEngine();
|
||||
virtual ~QFontEngine();
|
||||
|
||||
// all of these are in unscaled metrics if the engine supports uncsaled metrics,
|
||||
// otherwise in design metrics
|
||||
|
@ -175,7 +174,6 @@ class QFontEngineBox : public QFontEngine
|
|||
{
|
||||
public:
|
||||
QFontEngineBox(int size);
|
||||
~QFontEngineBox();
|
||||
|
||||
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, QTextEngine::ShaperFlags flags) const;
|
||||
virtual void recalcAdvances(QGlyphLayout *) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue