From f7b59d9b31766517bd45cdc54454b68ddf85c448 Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 09 May 2005 20:12:20 +0000 Subject: Inline Pictures and Resources: I hate how the 'compability' inline methods produce nothing but problems... Do not expose the bool in the header file, this should help alwin... Most of the time the method is not inlined anyway so not having this bool accessible outside libqpe is good enough... --- (limited to 'library') diff --git a/library/library.pro b/library/library.pro index 95c18a2..7143454 100644 --- a/library/library.pro +++ b/library/library.pro @@ -123,6 +123,8 @@ SOURCES = calendar.cpp \ # Qt 3 compatibility HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp + +DEFINES += OPIE_INTERNAL_LIBRARY_BUILD INCLUDEPATH += $(OPIEDIR)/include backend LIBS += -ldl -lcrypt -lm INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui diff --git a/library/resource.h b/library/resource.h index 4a3502a..9e4cb54 100644 --- a/library/resource.h +++ b/library/resource.h @@ -42,15 +42,22 @@ public: static QStringList allSounds(); }; +#ifdef OPIE_INTERNAL_LIBRARY_BUILD extern bool qpe_fast_findPixmap; +#endif + + // Inline for compatibility with SHARP ROMs inline QIconSet Resource::loadIconSet( const QString &pix ) { + +#ifdef OPIE_INTERNAL_LIBRARY_BUILD /* * disable the slow load */ bool oldMode = qpe_fast_findPixmap; qpe_fast_findPixmap = true; +#endif QPixmap dpm = loadPixmap( pix + "_disabled" ); QPixmap pm = loadPixmap( pix ); @@ -58,7 +65,10 @@ inline QIconSet Resource::loadIconSet( const QString &pix ) if ( !dpm.isNull() ) is.setPixmap( dpm, pm.width() <= 22 ? QIconSet::Small : QIconSet::Large, QIconSet::Disabled ); +#ifdef OPIE_INTERNAL_LIBRARY_BUILD qpe_fast_findPixmap = oldMode; +#endif + return is; } -- cgit v0.9.0.2