author | zecke <zecke> | 2003-10-04 08:59:51 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-10-04 08:59:51 (UTC) |
commit | dc9510f788212a6be063349461540e4bea690f51 (patch) (unidiff) | |
tree | b8728fdc12c1580287f16f3828180beac5d55c13 /library/qpeapplication.cpp | |
parent | 23f729eb7487ad189591c3b0c9af9d3afecd3b91 (diff) | |
download | opie-dc9510f788212a6be063349461540e4bea690f51.zip opie-dc9510f788212a6be063349461540e4bea690f51.tar.gz opie-dc9510f788212a6be063349461540e4bea690f51.tar.bz2 |
Allow Opie beeing build with a Plain version of Qt without weak symbols
-rw-r--r-- | library/qpeapplication.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 28fb13a..feba8b6 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -1119,30 +1119,34 @@ void QPEApplication::reset() { | |||
1119 | /*! | 1119 | /*! |
1120 | \internal | 1120 | \internal |
1121 | */ | 1121 | */ |
1122 | void QPEApplication::applyStyle() | 1122 | void QPEApplication::applyStyle() |
1123 | { | 1123 | { |
1124 | Config config( "qpe" ); | 1124 | Config config( "qpe" ); |
1125 | config.setGroup( "Appearance" ); | 1125 | config.setGroup( "Appearance" ); |
1126 | 1126 | ||
1127 | #if QT_VERSION > 233 | 1127 | #if QT_VERSION > 233 |
1128 | #if !defined(OPIE_NO_OVERRIDE_QT) | ||
1128 | // don't block ourselves ... | 1129 | // don't block ourselves ... |
1129 | Opie::force_appearance = 0; | 1130 | Opie::force_appearance = 0; |
1130 | 1131 | ||
1131 | static QString appname = Opie::binaryName ( ); | 1132 | static QString appname = Opie::binaryName ( ); |
1132 | 1133 | ||
1133 | QStringList ex = config. readListEntry ( "NoStyle", ';' ); | 1134 | QStringList ex = config. readListEntry ( "NoStyle", ';' ); |
1134 | int nostyle = 0; | 1135 | int nostyle = 0; |
1135 | for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) { | 1136 | for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) { |
1136 | if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) { | 1137 | if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) { |
1137 | nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 ); | 1138 | nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 ); |
1138 | break; | 1139 | break; |
1139 | } | 1140 | } |
1140 | } | 1141 | } |
1142 | #else | ||
1143 | int nostyle = 0; | ||
1144 | #endif | ||
1141 | 1145 | ||
1142 | // Widget style | 1146 | // Widget style |
1143 | QString style = config.readEntry( "Style", "FlatStyle" ); | 1147 | QString style = config.readEntry( "Style", "FlatStyle" ); |
1144 | 1148 | ||
1145 | // don't set a custom style | 1149 | // don't set a custom style |
1146 | if ( nostyle & Opie::Force_Style ) | 1150 | if ( nostyle & Opie::Force_Style ) |
1147 | style = "FlatStyle"; | 1151 | style = "FlatStyle"; |
1148 | 1152 | ||
@@ -1189,20 +1193,22 @@ void QPEApplication::applyStyle() | |||
1189 | // don't set a custom font | 1193 | // don't set a custom font |
1190 | if ( nostyle & Opie::Force_Font ) { | 1194 | if ( nostyle & Opie::Force_Font ) { |
1191 | ff = "Vera"; | 1195 | ff = "Vera"; |
1192 | fs = 10; | 1196 | fs = 10; |
1193 | } | 1197 | } |
1194 | 1198 | ||
1195 | setFont ( QFont ( ff, fs ), true ); | 1199 | setFont ( QFont ( ff, fs ), true ); |
1196 | 1200 | ||
1201 | #if !defined(OPIE_NO_OVERRIDE_QT) | ||
1197 | // revert to global blocking policy ... | 1202 | // revert to global blocking policy ... |
1198 | Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None; | 1203 | Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None; |
1199 | Opie::force_appearance &= ~nostyle; | 1204 | Opie::force_appearance &= ~nostyle; |
1200 | #endif | 1205 | #endif |
1206 | #endif | ||
1201 | } | 1207 | } |
1202 | 1208 | ||
1203 | void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) | 1209 | void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) |
1204 | { | 1210 | { |
1205 | #ifdef Q_WS_QWS | 1211 | #ifdef Q_WS_QWS |
1206 | QDataStream stream( data, IO_ReadOnly ); | 1212 | QDataStream stream( data, IO_ReadOnly ); |
1207 | if ( msg == "applyStyle()" ) { | 1213 | if ( msg == "applyStyle()" ) { |
1208 | applyStyle(); | 1214 | applyStyle(); |