summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Rules.make3
-rw-r--r--config.in4
-rw-r--r--library/library.pro6
-rw-r--r--library/qpeapplication.cpp6
-rw-r--r--library/qt_override.cpp10
5 files changed, 27 insertions, 2 deletions
diff --git a/Rules.make b/Rules.make
index 4833b11..a1e6f09 100644
--- a/Rules.make
+++ b/Rules.make
@@ -20,24 +20,27 @@ else
20endif 20endif
21ifeq ($(CONFIG_QUICK_LAUNCH),) 21ifeq ($(CONFIG_QUICK_LAUNCH),)
22 echo contains\( CONFIG, quick-app \) \{ >> $@ 22 echo contains\( CONFIG, quick-app \) \{ >> $@
23 echo CONFIG -= quick-app >> $@ 23 echo CONFIG -= quick-app >> $@
24 echo CONFIG += quick-app-lib >> $@ 24 echo CONFIG += quick-app-lib >> $@
25 echo \} >> $@ 25 echo \} >> $@
26else 26else
27 echo contains\( CONFIG, quick-app \) \{ >> $@ 27 echo contains\( CONFIG, quick-app \) \{ >> $@
28 echo CONFIG -= quick-app >> $@ 28 echo CONFIG -= quick-app >> $@
29 echo CONFIG += quick-app-bin >> $@ 29 echo CONFIG += quick-app-bin >> $@
30 echo \} >> $@ 30 echo \} >> $@
31 endif 31 endif
32ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y)
33 echo CONFIG += no-override >> $@
34endif
32 35
33$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages 36$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
34 @echo Generating dependency information... 37 @echo Generating dependency information...
35# add to subdir-y, and add descend rules 38# add to subdir-y, and add descend rules
36 @cat $(TOPDIR)/packages | grep -v '^#' | \ 39 @cat $(TOPDIR)/packages | grep -v '^#' | \
37 awk '{print \ 40 awk '{print \
38 ".PHONY : " $$2 "\n" \ 41 ".PHONY : " $$2 "\n" \
39 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ 42 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \
40 print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends 43 print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends
41 cat $(TOPDIR)/packages | grep -v '^#' | \ 44 cat $(TOPDIR)/packages | grep -v '^#' | \
42 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ 45 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \
43 >> $(TOPDIR)/.depends 46 >> $(TOPDIR)/.depends
diff --git a/config.in b/config.in
index dac9024..ddbc93b 100644
--- a/config.in
+++ b/config.in
@@ -33,24 +33,28 @@ config OPTIMIZE
33config DEBUG 33config DEBUG
34 boolean "Enable debug builds" 34 boolean "Enable debug builds"
35 default n 35 default n
36config RELEASE 36config RELEASE
37 bool 37 bool
38 default y 38 default y
39 depends !DEBUG 39 depends !DEBUG
40 40
41config QUICK_LAUNCH 41config QUICK_LAUNCH
42 boolean "Enable Quick Launch" 42 boolean "Enable Quick Launch"
43 default n 43 default n
44 44
45config OPIE_NO_OVERRIDE_QT
46 boolean "Build Opie against an unpatched version of Qt"
47 default n
48
45config SPECFILE 49config SPECFILE
46 string 50 string
47 default "qws/linux-generic-g++" if TARGET_X86 && (! X11) 51 default "qws/linux-generic-g++" if TARGET_X86 && (! X11)
48 default "linux-g++" if TARGET_X86 && X11 52 default "linux-g++" if TARGET_X86 && X11
49 default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) 53 default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11)
50 default "linux-g++" if TARGET_SHARP && X11 54 default "linux-g++" if TARGET_SHARP && X11
51 default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) 55 default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11)
52 default "linux-g++" if TARGET_IPAQ && X11 56 default "linux-g++" if TARGET_IPAQ && X11
53 default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11) 57 default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11)
54 default "linux-g++" if TARGET_RAMSES && X11 58 default "linux-g++" if TARGET_RAMSES && X11
55 default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11) 59 default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11)
56 default "linux-g++" if TARGET_SIMPAD && X11 60 default "linux-g++" if TARGET_SIMPAD && X11
diff --git a/library/library.pro b/library/library.pro
index 80a0f62..ab1f451 100644
--- a/library/library.pro
+++ b/library/library.pro
@@ -109,24 +109,26 @@ SOURCES = calendar.cpp \
109 categorymenu.cpp \ 109 categorymenu.cpp \
110 categoryedit_p.cpp \ 110 categoryedit_p.cpp \
111 categoryselect.cpp \ 111 categoryselect.cpp \
112 categorywidget.cpp \ 112 categorywidget.cpp \
113 ir.cpp \ 113 ir.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 qt_override.cpp 119 qt_override.cpp
120 120
121
122
121# Qt 3 compatibility 123# Qt 3 compatibility
122HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h 124HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h
123SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp 125SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp
124INCLUDEPATH += $(OPIEDIR)/include backend 126INCLUDEPATH += $(OPIEDIR)/include backend
125 LIBS += -ldl -lcrypt -lm 127 LIBS += -ldl -lcrypt -lm
126INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui 128INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui
127 TARGET = qpe 129 TARGET = qpe
128 DESTDIR = $(OPIEDIR)/lib$(PROJMAK) 130 DESTDIR = $(OPIEDIR)/lib$(PROJMAK)
129 VERSION = 1.5.0.1 131 VERSION = 1.5.0.1
130 132
131TRANSLATIONS = ../i18n/de/libqpe.ts \ 133TRANSLATIONS = ../i18n/de/libqpe.ts \
132 ../i18n/nl/libqpe.ts \ 134 ../i18n/nl/libqpe.ts \
@@ -140,12 +142,16 @@ TRANSLATIONS = ../i18n/de/libqpe.ts \
140 ../i18n/no/libqpe.ts \ 142 ../i18n/no/libqpe.ts \
141 ../i18n/pl/libqpe.ts \ 143 ../i18n/pl/libqpe.ts \
142 ../i18n/pt/libqpe.ts \ 144 ../i18n/pt/libqpe.ts \
143 ../i18n/pt_BR/libqpe.ts \ 145 ../i18n/pt_BR/libqpe.ts \
144 ../i18n/sl/libqpe.ts \ 146 ../i18n/sl/libqpe.ts \
145 ../i18n/zh_CN/libqpe.ts \ 147 ../i18n/zh_CN/libqpe.ts \
146 ../i18n/it/libqpe.ts \ 148 ../i18n/it/libqpe.ts \
147 ../i18n/zh_TW/libqpe.ts \ 149 ../i18n/zh_TW/libqpe.ts \
148 ../i18n/da/libqpe.ts 150 ../i18n/da/libqpe.ts
149 151
150 152
151include ( $(OPIEDIR)/include.pro ) 153include ( $(OPIEDIR)/include.pro )
154
155contains( CONFIG, no-override ){
156 DEFINES += OPIE_NO_OVERRIDE_QT
157}
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 28fb13a..feba8b6 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1116,37 +1116,41 @@ void QPEApplication::reset() {
1116 applyStyle(); 1116 applyStyle();
1117} 1117}
1118 1118
1119/*! 1119/*!
1120 \internal 1120 \internal
1121*/ 1121*/
1122void QPEApplication::applyStyle() 1122void 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
1149 internalSetStyle ( style ); 1153 internalSetStyle ( style );
1150 1154
1151 // Colors - from /etc/colors/Liquid.scheme 1155 // Colors - from /etc/colors/Liquid.scheme
1152 QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) ); 1156 QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) );
@@ -1185,28 +1189,30 @@ void QPEApplication::applyStyle()
1185 // Font 1189 // Font
1186 QString ff = config.readEntry( "FontFamily", font().family() ); 1190 QString ff = config.readEntry( "FontFamily", font().family() );
1187 int fs = config.readNumEntry( "FontSize", font().pointSize() ); 1191 int fs = config.readNumEntry( "FontSize", font().pointSize() );
1188 1192
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
1203void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data ) 1209void 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();
1209 } 1215 }
1210 else if ( msg == "toggleApplicationMenu()" ) { 1216 else if ( msg == "toggleApplicationMenu()" ) {
1211 QWidget *active = activeWindow ( ); 1217 QWidget *active = activeWindow ( );
1212 1218
diff --git a/library/qt_override.cpp b/library/qt_override.cpp
index edda874..df5a419 100644
--- a/library/qt_override.cpp
+++ b/library/qt_override.cpp
@@ -13,25 +13,25 @@
13#include "qt_override_p.h" 13#include "qt_override_p.h"
14 14
15#if QT_VERSION > 233 15#if QT_VERSION > 233
16 16
17struct color_fix_t { 17struct color_fix_t {
18 char *m_app; 18 char *m_app;
19 char *m_class; 19 char *m_class;
20 char *m_name; 20 char *m_name;
21 QColorGroup::ColorRole m_set; 21 QColorGroup::ColorRole m_set;
22 QColorGroup::ColorRole m_get; 22 QColorGroup::ColorRole m_get;
23}; 23};
24 24
25 25#ifndef OPIE_NO_OVERRIDE_QT
26 26
27static const color_fix_t apps_that_need_special_colors [] = { 27static const color_fix_t apps_that_need_special_colors [] = {
28 { "HancomMobileWord", "HTextEdit", 0, QColorGroup::Background, QColorGroup::Base }, 28 { "HancomMobileWord", "HTextEdit", 0, QColorGroup::Background, QColorGroup::Base },
29 { "neocal", "Display", 0, QColorGroup::Background, QColorGroup::Base }, 29 { "neocal", "Display", 0, QColorGroup::Background, QColorGroup::Base },
30 30
31 { 0, 0, 0, QColorGroup::Base, QColorGroup::Base } 31 { 0, 0, 0, QColorGroup::Base, QColorGroup::Base }
32}; 32};
33 33
34static const char * const apps_that_need_pointsizes_times_10 [] = { 34static const char * const apps_that_need_pointsizes_times_10 [] = {
35 "HancomMobileWord", 35 "HancomMobileWord",
36 "hancomsheet", 36 "hancomsheet",
37 "HancomPresenterViewer", 37 "HancomPresenterViewer",
@@ -64,60 +64,66 @@ const char *Opie::binaryName ( )
64 if ( l <= 0 ) 64 if ( l <= 0 )
65 l = 0; 65 l = 0;
66 66
67 dst [l] = 0; 67 dst [l] = 0;
68 const char *b = ::strrchr ( dst, '/' ); 68 const char *b = ::strrchr ( dst, '/' );
69 appname = ::strdup ( b ? b + 1 : dst ); 69 appname = ::strdup ( b ? b + 1 : dst );
70 70
71 ::atexit ( binaryNameFree ); 71 ::atexit ( binaryNameFree );
72 } 72 }
73 return appname; 73 return appname;
74} 74}
75 75
76#else
77int Opie::force_appearance = 0;
78#endif
76 79
77// Fix for a toolchain incompatibility (binaries compiled with 80// Fix for a toolchain incompatibility (binaries compiled with
78// old tcs using shared libs compiled with newer tcs) 81// old tcs using shared libs compiled with newer tcs)
79 82
80extern "C" { 83extern "C" {
81 84
82extern void __gmon_start__ ( ) __attribute__(( weak )); 85extern void __gmon_start__ ( ) __attribute__(( weak ));
83 86
84extern void __gmon_start__ ( ) 87extern void __gmon_start__ ( )
85{ 88{
86} 89}
87 90
88} 91}
89 92
90 93
91// Fix for apps, that use QPainter::eraseRect() which doesn't work with styles 94// Fix for apps, that use QPainter::eraseRect() which doesn't work with styles
92// that set a background pixmap (it would be easier to fix eraseRect(), but 95// that set a background pixmap (it would be easier to fix eraseRect(), but
93// TT made it an inline ...) 96// TT made it an inline ...)
94 97
95void QPEApplication::polish ( QWidget *w ) 98void QPEApplication::polish ( QWidget *w )
96{ 99{
100#ifndef OPIE_NO_OVERRIDE_QT
97 //qDebug ( "QPEApplication::polish()" ); 101 //qDebug ( "QPEApplication::polish()" );
98 102
99 for ( const color_fix_t *ptr = apps_that_need_special_colors; ptr-> m_app; ptr++ ) { 103 for ( const color_fix_t *ptr = apps_that_need_special_colors; ptr-> m_app; ptr++ ) {
100 if (( ::strcmp ( Opie::binaryName ( ), ptr-> m_app ) == 0 ) && 104 if (( ::strcmp ( Opie::binaryName ( ), ptr-> m_app ) == 0 ) &&
101 ( ptr-> m_class ? w-> inherits ( ptr-> m_class ) : true ) && 105 ( ptr-> m_class ? w-> inherits ( ptr-> m_class ) : true ) &&
102 ( ptr-> m_name ? ( ::strcmp ( w-> name ( ), ptr-> m_name ) == 0 ) : true )) { 106 ( ptr-> m_name ? ( ::strcmp ( w-> name ( ), ptr-> m_name ) == 0 ) : true )) {
103 QPalette pal = w-> palette ( ); 107 QPalette pal = w-> palette ( );
104 pal. setColor ( ptr-> m_set, pal. color ( QPalette::Active, ptr-> m_get )); 108 pal. setColor ( ptr-> m_set, pal. color ( QPalette::Active, ptr-> m_get ));
105 w-> setPalette ( pal ); 109 w-> setPalette ( pal );
106 } 110 }
107 } 111 }
112#endif
108 QApplication::polish ( w ); 113 QApplication::polish ( w );
109} 114}
110 115
111 116
117#ifndef OPIE_NO_OVERRIDE_QT
112// Fix for the binary incompatibility that TT introduced in Qt/E 2.3.4 -- point sizes 118// Fix for the binary incompatibility that TT introduced in Qt/E 2.3.4 -- point sizes
113// were multiplied by 10 (which was incorrect) 119// were multiplied by 10 (which was incorrect)
114 120
115QValueList <int> QFontDatabase::pointSizes ( QString const &family, QString const &style, QString const &charset ) 121QValueList <int> QFontDatabase::pointSizes ( QString const &family, QString const &style, QString const &charset )
116{ 122{
117 //qDebug ( "QFontDatabase::pointSizes()" ); 123 //qDebug ( "QFontDatabase::pointSizes()" );
118 124
119 QValueList <int> sl = pointSizes_NonWeak ( family, style, charset ); 125 QValueList <int> sl = pointSizes_NonWeak ( family, style, charset );
120 126
121 for ( const char * const *ptr = apps_that_need_pointsizes_times_10; *ptr; ptr++ ) { 127 for ( const char * const *ptr = apps_that_need_pointsizes_times_10; *ptr; ptr++ ) {
122 if ( ::strcmp ( Opie::binaryName ( ), *ptr ) == 0 ) { 128 if ( ::strcmp ( Opie::binaryName ( ), *ptr ) == 0 ) {
123 for ( QValueList <int>::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) 129 for ( QValueList <int>::Iterator it = sl. begin ( ); it != sl. end ( ); ++it )
@@ -158,14 +164,14 @@ void QApplication::setFont ( const QFont &fnt, bool informWidgets, const char *c
158} 164}
159 165
160 166
161void QApplication::qwsSetDecoration ( QWSDecoration *deco ) 167void QApplication::qwsSetDecoration ( QWSDecoration *deco )
162{ 168{
163 //qDebug ( "QApplication::qwsSetDecoration()" ); 169 //qDebug ( "QApplication::qwsSetDecoration()" );
164 170
165 if ( Opie::force_appearance & Opie::Force_Decoration ) 171 if ( Opie::force_appearance & Opie::Force_Decoration )
166 delete deco; 172 delete deco;
167 else 173 else
168 QApplication::qwsSetDecoration_NonWeak ( deco ); 174 QApplication::qwsSetDecoration_NonWeak ( deco );
169} 175}
170 176#endif
171#endif \ No newline at end of file 177#endif \ No newline at end of file