mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fixes for mingw and vc.
This commit is contained in:
@@ -446,6 +446,9 @@ FontTrueType& FontTrueType::operator=( const FontTrueType& right ) {
|
||||
void FontTrueType::cleanup() {
|
||||
sendEvent( Event::Unload );
|
||||
|
||||
mCallbacks.clear();
|
||||
mNumCallBacks = 0;
|
||||
|
||||
// Check if we must destroy the FreeType pointers
|
||||
if ( mRefCount ) {
|
||||
// Decrease the reference counter
|
||||
|
||||
@@ -105,8 +105,9 @@ void SortingProxyModel::resort( unsigned flags ) {
|
||||
return;
|
||||
}
|
||||
std::sort( mRowMappings.begin(), mRowMappings.end(), [&]( auto row1, auto row2 ) -> bool {
|
||||
Variant data1 = target().data( target().index( row1, mKeyColumn ), mSortRole );
|
||||
Variant data2 = target().data( target().index( row2, mKeyColumn ), mSortRole );
|
||||
Model& target = this->target();
|
||||
Variant data1 = target.data( target.index( row1, mKeyColumn ), mSortRole );
|
||||
Variant data2 = target.data( target.index( row2, mKeyColumn ), mSortRole );
|
||||
if ( data1 == data2 )
|
||||
return 0;
|
||||
bool isLessThan;
|
||||
|
||||
@@ -53,10 +53,18 @@ Drawable* UIGlyphIcon::getSize( const int& size ) const {
|
||||
UIGlyphIcon::UIGlyphIcon( const std::string& name, FontTrueType* font, const Uint32& codePoint ) :
|
||||
UIIcon( name ), mFont( font ), mCodePoint( codePoint ) {
|
||||
eeASSERT( mFont );
|
||||
mFont->pushFontEventCallback( [&]( Uint32, Font::Event event, Font* ) {
|
||||
mCloseCb = mFont->pushFontEventCallback( [&]( Uint32, Font::Event event, Font* ) {
|
||||
if ( event == Font::Event::Unload )
|
||||
mFont = nullptr;
|
||||
} );
|
||||
}
|
||||
|
||||
UIGlyphIcon::~UIGlyphIcon() {
|
||||
if ( mFont && mCloseCb != 0 ) {
|
||||
mFont->popFontEventCallback( mCloseCb );
|
||||
mFont = nullptr;
|
||||
mCloseCb = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace EE::UI
|
||||
|
||||
Reference in New Issue
Block a user