mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Bugfix: inexact font loading using font name, warning about font substitution
This commit is contained in:
@ -59,6 +59,21 @@ public:
|
||||
return m_object;
|
||||
}
|
||||
|
||||
/// Returns the cached object. If object is dirty, then cached object is refreshed.
|
||||
/// \param holder Holder object, which owns the cached item
|
||||
/// \param function Refresh function
|
||||
template<typename H>
|
||||
inline const T& get(H* holder, T(H::* function)(void))
|
||||
{
|
||||
if (m_dirty)
|
||||
{
|
||||
m_object = (holder->*function)();
|
||||
m_dirty = false;
|
||||
}
|
||||
|
||||
return m_object;
|
||||
}
|
||||
|
||||
/// Invalidates the cached item, so it must be refreshed from the cache next time,
|
||||
/// if it is accessed.
|
||||
inline void dirty()
|
||||
|
Reference in New Issue
Block a user