author | zecke <zecke> | 2005-05-09 20:12:20 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-05-09 20:12:20 (UTC) |
commit | f7b59d9b31766517bd45cdc54454b68ddf85c448 (patch) (unidiff) | |
tree | 82cc0f88c4bbd1899511e09879f03376ff9de42b | |
parent | b98d495f723dc4bbbaaa4e60c3af97b4d7c852a6 (diff) | |
download | opie-f7b59d9b31766517bd45cdc54454b68ddf85c448.zip opie-f7b59d9b31766517bd45cdc54454b68ddf85c448.tar.gz opie-f7b59d9b31766517bd45cdc54454b68ddf85c448.tar.bz2 |
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...
-rw-r--r-- | library/library.pro | 2 | ||||
-rw-r--r-- | library/resource.h | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/library/library.pro b/library/library.pro index 95c18a2..7143454 100644 --- a/library/library.pro +++ b/library/library.pro | |||
@@ -114,24 +114,26 @@ SOURCES = calendar.cpp \ | |||
114 | backend/vcc_yacc.cpp \ | 114 | backend/vcc_yacc.cpp \ |
115 | backend/vobject.cpp \ | 115 | backend/vobject.cpp \ |
116 | findwidget_p.cpp \ | 116 | findwidget_p.cpp \ |
117 | finddialog.cpp \ | 117 | finddialog.cpp \ |
118 | lnkproperties.cpp \ | 118 | lnkproperties.cpp \ |
119 | widget_showing.cpp | 119 | widget_showing.cpp |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | # Qt 3 compatibility | 123 | # Qt 3 compatibility |
124 | HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h | 124 | HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h |
125 | SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp | 125 | SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp |
126 | |||
127 | DEFINES += OPIE_INTERNAL_LIBRARY_BUILD | ||
126 | INCLUDEPATH += $(OPIEDIR)/include backend | 128 | INCLUDEPATH += $(OPIEDIR)/include backend |
127 | LIBS += -ldl -lcrypt -lm | 129 | LIBS += -ldl -lcrypt -lm |
128 | INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui | 130 | INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui |
129 | TARGET = qpe | 131 | TARGET = qpe |
130 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) | 132 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) |
131 | VERSION = 1.5.0.1 | 133 | VERSION = 1.5.0.1 |
132 | 134 | ||
133 | include( $(OPIEDIR)/include.pro ) | 135 | include( $(OPIEDIR)/include.pro ) |
134 | 136 | ||
135 | contains( CONFIG, LIBQPE_WITHROHFEEDBACK ){ | 137 | contains( CONFIG, LIBQPE_WITHROHFEEDBACK ){ |
136 | DEFINES += OPIE_WITHROHFEEDBACK | 138 | DEFINES += OPIE_WITHROHFEEDBACK |
137 | SOURCES += backend/rohfeedback.cpp | 139 | SOURCES += backend/rohfeedback.cpp |
diff --git a/library/resource.h b/library/resource.h index 4a3502a..9e4cb54 100644 --- a/library/resource.h +++ b/library/resource.h | |||
@@ -33,34 +33,44 @@ public: | |||
33 | static QImage loadImage( const QString &name); | 33 | static QImage loadImage( const QString &name); |
34 | 34 | ||
35 | static QPixmap loadPixmap( const QString &name ); | 35 | static QPixmap loadPixmap( const QString &name ); |
36 | static QBitmap loadBitmap( const QString &name ); | 36 | static QBitmap loadBitmap( const QString &name ); |
37 | static QString findPixmap( const QString &name ); | 37 | static QString findPixmap( const QString &name ); |
38 | 38 | ||
39 | static QIconSet loadIconSet( const QString &name ); | 39 | static QIconSet loadIconSet( const QString &name ); |
40 | 40 | ||
41 | static QString findSound( const QString &name ); | 41 | static QString findSound( const QString &name ); |
42 | static QStringList allSounds(); | 42 | static QStringList allSounds(); |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #ifdef OPIE_INTERNAL_LIBRARY_BUILD | ||
45 | extern bool qpe_fast_findPixmap; | 46 | extern bool qpe_fast_findPixmap; |
47 | #endif | ||
48 | |||
49 | |||
46 | // Inline for compatibility with SHARP ROMs | 50 | // Inline for compatibility with SHARP ROMs |
47 | inline QIconSet Resource::loadIconSet( const QString &pix ) | 51 | inline QIconSet Resource::loadIconSet( const QString &pix ) |
48 | { | 52 | { |
53 | |||
54 | #ifdef OPIE_INTERNAL_LIBRARY_BUILD | ||
49 | /* | 55 | /* |
50 | * disable the slow load | 56 | * disable the slow load |
51 | */ | 57 | */ |
52 | bool oldMode = qpe_fast_findPixmap; | 58 | bool oldMode = qpe_fast_findPixmap; |
53 | qpe_fast_findPixmap = true; | 59 | qpe_fast_findPixmap = true; |
60 | #endif | ||
54 | 61 | ||
55 | QPixmap dpm = loadPixmap( pix + "_disabled" ); | 62 | QPixmap dpm = loadPixmap( pix + "_disabled" ); |
56 | QPixmap pm = loadPixmap( pix ); | 63 | QPixmap pm = loadPixmap( pix ); |
57 | QIconSet is( pm ); | 64 | QIconSet is( pm ); |
58 | if ( !dpm.isNull() ) | 65 | if ( !dpm.isNull() ) |
59 | is.setPixmap( dpm, pm.width() <= 22 ? QIconSet::Small : QIconSet::Large, QIconSet::Disabled ); | 66 | is.setPixmap( dpm, pm.width() <= 22 ? QIconSet::Small : QIconSet::Large, QIconSet::Disabled ); |
60 | 67 | ||
68 | #ifdef OPIE_INTERNAL_LIBRARY_BUILD | ||
61 | qpe_fast_findPixmap = oldMode; | 69 | qpe_fast_findPixmap = oldMode; |
70 | #endif | ||
71 | |||
62 | return is; | 72 | return is; |
63 | } | 73 | } |
64 | 74 | ||
65 | 75 | ||
66 | #endif | 76 | #endif |