author | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
commit | d34dc773591a2d467c68875a68a671d6a809f861 (patch) (side-by-side diff) | |
tree | b57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe | |
parent | ce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff) | |
download | opie-d34dc773591a2d467c68875a68a671d6a809f861.zip opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2 |
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms
should work.
Please see $OPIEDIR/development/macosx for details
85 files changed, 2262 insertions, 144 deletions
@@ -1,100 +1,103 @@ ifndef QTDIR $(error QTDIR not set) endif prefix=/opt/QtPalmtop ifeq ($(OPIEDIR),) export OPIEDIR:=$(TOPDIR) endif ifeq ($(IPK_DIR),) export IPK_DIR:=$(OPIEDIR) endif ifneq ($(wildcard $(TOPDIR)/.config),) include $(TOPDIR)/.config endif ifdef CONFIG_TARGET_X86 PLATFORM=x86-linux endif ifdef CONFIG_TARGET_SHARP PLATFORM=sharp-linux endif ifdef CONFIG_TARGET_IPAQ PLATFORM=ipaq-linux endif ifdef CONFIG_TARGET_RAMSES PLATFORM=ramses-linux endif ifdef CONFIG_TARGET_SIMPAD PLATFORM=simpad-linux endif ifdef CONFIG_TARGET_YOPY PLATFORM=yopy-linux endif +ifdef CONFIG_TARGET_MACOSX + PLATFORM=macx-darwin +endif export QMAKE:=$(OPIEDIR)/qmake/qmake export QMAKESPECSDIR=$(OPIEDIR)/mkspecs ifeq ($(QPE_VERSION),) VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h)) QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT) ifeq ($(QPE_VERSION),..) QPE_VERSION=0.9.3 endif endif export QPE_VERSION SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) ifeq ($(VERSION_CVS),) VERSION_CVS:=$(shell date +%Y%m%d) endif ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),) SUB_VERSION:=$(VERSION_CVS) endif export SUB_VERSION ifneq ($(strip $(SUB_VERSION)),) EXTRAVERSION=-$(SUB_VERSION) endif ifeq ($(QTE_REVISION),) QTE_REVISION=5 endif export QTE_REVISION export DEB_VERSION=2.0 ifeq ($(QTE_BASEVERSION),) ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;') else QTE_BASEVERSION=2.3.5 endif endif export QTE_BASEVERSION ifeq ($(QTE_VERSION),) ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;') else QTE_VERSION=2.3.5 endif endif export QTE_VERSION export PATH:=$(OPIEDIR)/scripts:$(PATH) export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) ifdef CONFIG_OPTIMIZATIONS export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) endif ifeq ($(STRIP),) ifneq ($(CONFIG_TARGET_X86),) @@ -1,128 +1,132 @@ mainmenu "Opie Configuration" menu "Build Parameters" choice prompt "Target Machine" default TARGET_X86 help Please select the architecture of the machine you will be building the OpenZaurus buildroot for. config TARGET_X86 boolean "Intel X86" + config TARGET_MACOSX + boolean "Mac OS X (DARWIN)" + config TARGET_SHARP boolean "Sharp Zaurus" config TARGET_IPAQ boolean "iPAQ" config TARGET_RAMSES boolean "Ramses" config TARGET_SIMPAD boolean "SIMpad" config TARGET_YOPY boolean "Yopy 3500/3700" endchoice config OPTIMIZE boolean "Use optimizations" default "y" if ! TARGET_X86 config DEBUG boolean "Enable debug builds" default n config RELEASE bool default y depends !DEBUG config QUICK_LAUNCH boolean "Enable Quick Launch" default n config OPIE_NO_OVERRIDE_QT boolean "Build Opie against an unpatched version of Qt" default n config SPECFILE string default "qws/linux-generic-g++" if TARGET_X86 && (! X11) default "linux-g++" if TARGET_X86 && X11 default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) default "linux-g++" if TARGET_SHARP && X11 default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) default "linux-g++" if TARGET_IPAQ && X11 default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11) default "linux-g++" if TARGET_RAMSES && X11 default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11) default "linux-g++" if TARGET_SIMPAD && X11 default "qws/linux-yopy-g++" if TARGET_YOPY && (! X11) + default "qws/macx-generic-g++" if TARGET_MACOSX && (! X11) config CUSTOMFILE string default "custom-ipaq.h" if TARGET_IPAQ default "custom-sharp.h" if TARGET_SHARP default "custom-ramses.h" if TARGET_RAMSES default "custom-ipaq.h" if TARGET_SIMPAD default "custom-yopy.h" if TARGET_YOPY config OPTIMIZATIONS string "Optimization flags" depends OPTIMIZE default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD config EXPERIMENTAL bool "Prompt for development and/or incomplete items" default y endmenu menu "Base" choice prompt "Qpe Library Selection" default LIBQPE source library/config.in source x11/config.in endchoice source libopie/config.in source core/opie-login/config.in source core/opiealarm/config.in source core/launcher/config.in source core/qws/config.in endmenu comment "" menu "Applets" source core/applets/config.in source noncore/applets/config.in endmenu menu "Apps" source core/apps/config.in source noncore/apps/config.in endmenu menu "Communications and Networking" source noncore/comm/config.in source noncore/mail/config.in source noncore/net/config.in endmenu menu "Games" source noncore/games/config.in endmenu menu "Graphics and Multimedia" source freetype/config.in source noncore/graphics/config.in source core/multimedia/config.in diff --git a/core/applets/batteryapplet/batteryapplet.pro b/core/applets/batteryapplet/batteryapplet.pro index c68ceb7..1bc208b 100644 --- a/core/applets/batteryapplet/batteryapplet.pro +++ b/core/applets/batteryapplet/batteryapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = battery.h batterystatus.h batteryappletimpl.h SOURCES = battery.cpp batterystatus.cpp batteryappletimpl.cpp TARGET = batteryapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include .. LIBS += -lqpe -lopie VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libbatteryapplet.ts \ ../../../i18n/nl/libbatteryapplet.ts \ ../../../i18n/da/libbatteryapplet.ts \ ../../../i18n/xx/libbatteryapplet.ts \ ../../../i18n/en/libbatteryapplet.ts \ ../../../i18n/es/libbatteryapplet.ts \ ../../../i18n/fr/libbatteryapplet.ts \ ../../../i18n/hu/libbatteryapplet.ts \ ../../../i18n/ja/libbatteryapplet.ts \ ../../../i18n/ko/libbatteryapplet.ts \ ../../../i18n/no/libbatteryapplet.ts \ ../../../i18n/pl/libbatteryapplet.ts \ ../../../i18n/pt/libbatteryapplet.ts \ ../../../i18n/pt_BR/libbatteryapplet.ts \ ../../../i18n/sl/libbatteryapplet.ts \ ../../../i18n/zh_CN/libbatteryapplet.ts \ ../../../i18n/zh_TW/libbatteryapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/cardmon/cardmon.pro b/core/applets/cardmon/cardmon.pro index 3907aa4..75facde 100644 --- a/core/applets/cardmon/cardmon.pro +++ b/core/applets/cardmon/cardmon.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = cardmon.h cardmonimpl.h SOURCES = cardmon.cpp cardmonimpl.cpp TARGET = cardmonapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include ../launcher LIBS += -lqpe -lopie VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libcardmonapplet.ts \ ../../../i18n/nl/libcardmonapplet.ts \ ../../../i18n/da/libcardmonapplet.ts \ ../../../i18n/xx/libcardmonapplet.ts \ ../../../i18n/en/libcardmonapplet.ts \ ../../../i18n/es/libcardmonapplet.ts \ ../../../i18n/fr/libcardmonapplet.ts \ ../../../i18n/hu/libcardmonapplet.ts \ ../../../i18n/ja/libcardmonapplet.ts \ ../../../i18n/ko/libcardmonapplet.ts \ ../../../i18n/no/libcardmonapplet.ts \ ../../../i18n/pl/libcardmonapplet.ts \ ../../../i18n/pt/libcardmonapplet.ts \ ../../../i18n/pt_BR/libcardmonapplet.ts \ ../../../i18n/sl/libcardmonapplet.ts \ ../../../i18n/zh_CN/libcardmonapplet.ts \ ../../../i18n/zh_TW/libcardmonapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/clipboardapplet/clipboardapplet.pro b/core/applets/clipboardapplet/clipboardapplet.pro index 1e9cc4f..358d658 100644 --- a/core/applets/clipboardapplet/clipboardapplet.pro +++ b/core/applets/clipboardapplet/clipboardapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = clipboard.h clipboardappletimpl.h SOURCES = clipboard.cpp clipboardappletimpl.cpp TARGET = clipboardapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libclipboardapplet.ts \ ../../../i18n/nl/libclipboardapplet.ts \ ../../../i18n/da/libclipboardapplet.ts \ ../../../i18n/xx/libclipboardapplet.ts \ ../../../i18n/en/libclipboardapplet.ts \ ../../../i18n/es/libclipboardapplet.ts \ ../../../i18n/fr/libclipboardapplet.ts \ ../../../i18n/hu/libclipboardapplet.ts \ ../../../i18n/ja/libclipboardapplet.ts \ ../../../i18n/ko/libclipboardapplet.ts \ ../../../i18n/no/libclipboardapplet.ts \ ../../../i18n/pl/libclipboardapplet.ts \ ../../../i18n/pt/libclipboardapplet.ts \ ../../../i18n/pt_BR/libclipboardapplet.ts \ ../../../i18n/sl/libclipboardapplet.ts \ ../../../i18n/zh_CN/libclipboardapplet.ts \ ../../../i18n/zh_TW/libclipboardapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/clockapplet/clockapplet.pro b/core/applets/clockapplet/clockapplet.pro index 22c7b55..88092f5 100644 --- a/core/applets/clockapplet/clockapplet.pro +++ b/core/applets/clockapplet/clockapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = clock.h clockappletimpl.h SOURCES = clock.cpp clockappletimpl.cpp TARGET = clockapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include .. LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libclockapplet.ts \ ../../../i18n/nl/libclockapplet.ts \ ../../../i18n/da/libclockapplet.ts \ ../../../i18n/xx/libclockapplet.ts \ ../../../i18n/en/libclockapplet.ts \ ../../../i18n/es/libclockapplet.ts \ ../../../i18n/fr/libclockapplet.ts \ ../../../i18n/hu/libclockapplet.ts \ ../../../i18n/ja/libclockapplet.ts \ ../../../i18n/ko/libclockapplet.ts \ ../../../i18n/no/libclockapplet.ts \ ../../../i18n/pl/libclockapplet.ts \ ../../../i18n/pt/libclockapplet.ts \ ../../../i18n/pt_BR/libclockapplet.ts \ ../../../i18n/sl/libclockapplet.ts \ ../../../i18n/zh_CN/libclockapplet.ts \ ../../../i18n/zh_TW/libclockapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/homeapplet/homeapplet.pro b/core/applets/homeapplet/homeapplet.pro index ac7956b..854050f 100644 --- a/core/applets/homeapplet/homeapplet.pro +++ b/core/applets/homeapplet/homeapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = home.h SOURCES = home.cpp TARGET = homeapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libhomeapplet.ts \ ../../../i18n/nl/libhomeapplet.ts \ ../../../i18n/da/libhomeapplet.ts \ ../../../i18n/xx/libhomeapplet.ts \ ../../../i18n/en/libhomeapplet.ts \ ../../../i18n/es/libhomeapplet.ts \ ../../../i18n/fr/libhomeapplet.ts \ ../../../i18n/hu/libhomeapplet.ts \ ../../../i18n/ja/libhomeapplet.ts \ ../../../i18n/ko/libhomeapplet.ts \ ../../../i18n/no/libhomeapplet.ts \ ../../../i18n/pl/libhomeapplet.ts \ ../../../i18n/pt/libhomeapplet.ts \ ../../../i18n/pt_BR/libhomeapplet.ts \ ../../../i18n/sl/libhomeapplet.ts \ ../../../i18n/zh_CN/libhomeapplet.ts \ ../../../i18n/zh_TW/libhomeapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/irdaapplet/irdaapplet.pro b/core/applets/irdaapplet/irdaapplet.pro index 56632ed..be16bad 100644 --- a/core/applets/irdaapplet/irdaapplet.pro +++ b/core/applets/irdaapplet/irdaapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = irda.h irdaappletimpl.h SOURCES = irda.cpp irdaappletimpl.cpp TARGET = irdaapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libirdaapplet.ts \ ../../../i18n/nl/libirdaapplet.ts \ ../../../i18n/da/libirdaapplet.ts \ ../../../i18n/xx/libirdaapplet.ts \ ../../../i18n/en/libirdaapplet.ts \ ../../../i18n/es/libirdaapplet.ts \ ../../../i18n/fr/libirdaapplet.ts \ ../../../i18n/hu/libirdaapplet.ts \ ../../../i18n/ja/libirdaapplet.ts \ ../../../i18n/ko/libirdaapplet.ts \ ../../../i18n/no/libirdaapplet.ts \ ../../../i18n/pl/libirdaapplet.ts \ ../../../i18n/pt/libirdaapplet.ts \ ../../../i18n/pt_BR/libirdaapplet.ts \ ../../../i18n/sl/libirdaapplet.ts \ ../../../i18n/zh_CN/libirdaapplet.ts \ ../../../i18n/zh_TW/libirdaapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/logoutapplet/logoutapplet.pro b/core/applets/logoutapplet/logoutapplet.pro index a019303..7826bb3 100644 --- a/core/applets/logoutapplet/logoutapplet.pro +++ b/core/applets/logoutapplet/logoutapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = logout.h SOURCES = logout.cpp TARGET = logoutapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/liblogoutapplet.ts \ ../../../i18n/nl/liblogoutapplet.ts \ ../../../i18n/da/liblogoutapplet.ts \ ../../../i18n/xx/liblogoutapplet.ts \ ../../../i18n/en/liblogoutapplet.ts \ ../../../i18n/es/liblogoutapplet.ts \ ../../../i18n/fr/liblogoutapplet.ts \ ../../../i18n/hu/liblogoutapplet.ts \ ../../../i18n/ja/liblogoutapplet.ts \ ../../../i18n/ko/liblogoutapplet.ts \ ../../../i18n/no/liblogoutapplet.ts \ ../../../i18n/pl/liblogoutapplet.ts \ ../../../i18n/pt/liblogoutapplet.ts \ ../../../i18n/pt_BR/liblogoutapplet.ts \ ../../../i18n/sl/liblogoutapplet.ts \ ../../../i18n/zh_CN/liblogoutapplet.ts \ ../../../i18n/zh_TW/liblogoutapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/restartapplet/restartapplet.pro b/core/applets/restartapplet/restartapplet.pro index bd27b0a..368a0ea 100644 --- a/core/applets/restartapplet/restartapplet.pro +++ b/core/applets/restartapplet/restartapplet.pro @@ -1,17 +1,17 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = restart.h restartappletimpl.h SOURCES = restart.cpp restartappletimpl.cpp TARGET = restartapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 MOC_DIR=opieobj OBJECTS_DIR=opieobj include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/restartapplet2/restartapplet.pro b/core/applets/restartapplet2/restartapplet.pro index 85a3b66..12a7922 100644 --- a/core/applets/restartapplet2/restartapplet.pro +++ b/core/applets/restartapplet2/restartapplet.pro @@ -1,17 +1,17 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = restart.h SOURCES = restart.cpp TARGET = restartapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 MOC_DIR=opieobj OBJECTS_DIR=opieobj include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/rotateapplet/rotateapplet.pro b/core/applets/rotateapplet/rotateapplet.pro index 9b39dba..2c8de8d 100644 --- a/core/applets/rotateapplet/rotateapplet.pro +++ b/core/applets/rotateapplet/rotateapplet.pro @@ -1,31 +1,31 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugn warn_on release HEADERS = rotate.h SOURCES = rotate.cpp TARGET = rotateapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/librotateapplet.ts \ ../../../i18n/nl/librotateapplet.ts \ ../../../i18n/da/librotateapplet.ts \ ../../../i18n/xx/librotateapplet.ts \ ../../../i18n/en/librotateapplet.ts \ ../../../i18n/es/librotateapplet.ts \ ../../../i18n/fr/librotateapplet.ts \ ../../../i18n/hu/librotateapplet.ts \ ../../../i18n/ja/librotateapplet.ts \ ../../../i18n/ko/librotateapplet.ts \ ../../../i18n/no/librotateapplet.ts \ ../../../i18n/pl/librotateapplet.ts \ ../../../i18n/pt/librotateapplet.ts \ ../../../i18n/pt_BR/librotateapplet.ts \ ../../../i18n/sl/librotateapplet.ts \ ../../../i18n/zh_CN/librotateapplet.ts \ ../../../i18n/zh_TW/librotateapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/screenshotapplet/screenshotapplet.pro b/core/applets/screenshotapplet/screenshotapplet.pro index fe7b299..a86eff2 100644 --- a/core/applets/screenshotapplet/screenshotapplet.pro +++ b/core/applets/screenshotapplet/screenshotapplet.pro @@ -1,35 +1,35 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = screenshot.h inputDialog.h screenshotappletimpl.h SOURCES = screenshot.cpp inputDialog.cpp screenshotappletimpl.cpp TARGET = screenshotapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 MOC_DIR=opieobj OBJECTS_DIR=opieobj TRANSLATIONS = ../../../i18n/de/libscreenshotapplet.ts \ ../../../i18n/nl/libscreenshotapplet.ts \ ../../../i18n/da/libscreenshotapplet.ts \ ../../../i18n/xx/libscreenshotapplet.ts \ ../../../i18n/en/libscreenshotapplet.ts \ ../../../i18n/es/libscreenshotapplet.ts \ ../../../i18n/fr/libscreenshotapplet.ts \ ../../../i18n/hu/libscreenshotapplet.ts \ ../../../i18n/ja/libscreenshotapplet.ts \ ../../../i18n/ko/libscreenshotapplet.ts \ ../../../i18n/no/libscreenshotapplet.ts \ ../../../i18n/pl/libscreenshotapplet.ts \ ../../../i18n/pt/libscreenshotapplet.ts \ ../../../i18n/pt_BR/libscreenshotapplet.ts \ ../../../i18n/sl/libscreenshotapplet.ts \ ../../../i18n/zh_CN/libscreenshotapplet.ts \ ../../../i18n/zh_TW/libscreenshotapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/suspendapplet/suspendapplet.pro b/core/applets/suspendapplet/suspendapplet.pro index 7635d32..f58de63 100644 --- a/core/applets/suspendapplet/suspendapplet.pro +++ b/core/applets/suspendapplet/suspendapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = suspend.h SOURCES = suspend.cpp TARGET = suspendapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libsuspendapplet.ts \ ../../../i18n/nl/libsuspendapplet.ts \ ../../../i18n/da/libsuspendapplet.ts \ ../../../i18n/xx/libsuspendapplet.ts \ ../../../i18n/en/libsuspendapplet.ts \ ../../../i18n/es/libsuspendapplet.ts \ ../../../i18n/fr/libsuspendapplet.ts \ ../../../i18n/hu/libsuspendapplet.ts \ ../../../i18n/ja/libsuspendapplet.ts \ ../../../i18n/ko/libsuspendapplet.ts \ ../../../i18n/no/libsuspendapplet.ts \ ../../../i18n/pl/libsuspendapplet.ts \ ../../../i18n/pt/libsuspendapplet.ts \ ../../../i18n/pt_BR/libsuspendapplet.ts \ ../../../i18n/sl/libsuspendapplet.ts \ ../../../i18n/zh_CN/libsuspendapplet.ts \ ../../../i18n/zh_TW/libsuspendapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/vmemo/vmemo.pro b/core/applets/vmemo/vmemo.pro index 8cf1f07..43cb767 100644 --- a/core/applets/vmemo/vmemo.pro +++ b/core/applets/vmemo/vmemo.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = vmemo.h vmemoimpl.h adpcm.h SOURCES = vmemo.cpp vmemoimpl.cpp adpcm.c TARGET = vmemoapplet DESTDIR =$(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libvmemoapplet.ts \ ../../../i18n/nl/libvmemoapplet.ts \ ../../../i18n/da/libvmemoapplet.ts \ ../../../i18n/xx/libvmemoapplet.ts \ ../../../i18n/en/libvmemoapplet.ts \ ../../../i18n/es/libvmemoapplet.ts \ ../../../i18n/fr/libvmemoapplet.ts \ ../../../i18n/hu/libvmemoapplet.ts \ ../../../i18n/ja/libvmemoapplet.ts \ ../../../i18n/ko/libvmemoapplet.ts \ ../../../i18n/no/libvmemoapplet.ts \ ../../../i18n/pl/libvmemoapplet.ts \ ../../../i18n/pt/libvmemoapplet.ts \ ../../../i18n/pt_BR/libvmemoapplet.ts \ ../../../i18n/sl/libvmemoapplet.ts \ ../../../i18n/zh_CN/libvmemoapplet.ts \ ../../../i18n/zh_TW/libvmemoapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro index d30567c..68d9eff 100644 --- a/core/applets/volumeapplet/volumeapplet.pro +++ b/core/applets/volumeapplet/volumeapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = volume.h volumeappletimpl.h oledbox.h SOURCES = volume.cpp volumeappletimpl.cpp oledbox.cpp TARGET = volumeapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libvolumeapplet.ts \ ../../../i18n/nl/libvolumeapplet.ts \ ../../../i18n/da/libvolumeapplet.ts \ ../../../i18n/xx/libvolumeapplet.ts \ ../../../i18n/en/libvolumeapplet.ts \ ../../../i18n/es/libvolumeapplet.ts \ ../../../i18n/fr/libvolumeapplet.ts \ ../../../i18n/hu/libvolumeapplet.ts \ ../../../i18n/ja/libvolumeapplet.ts \ ../../../i18n/ko/libvolumeapplet.ts \ ../../../i18n/no/libvolumeapplet.ts \ ../../../i18n/pl/libvolumeapplet.ts \ ../../../i18n/pt/libvolumeapplet.ts \ ../../../i18n/pt_BR/libvolumeapplet.ts \ ../../../i18n/sl/libvolumeapplet.ts \ ../../../i18n/zh_CN/libvolumeapplet.ts \ ../../../i18n/zh_TW/libvolumeapplet.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp index d6f93da..0ac043b 100644 --- a/core/launcher/applauncher.cpp +++ b/core/launcher/applauncher.cpp @@ -485,129 +485,133 @@ bool AppLauncher::executeBuiltin(const QString &c, const QString &document) bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise) { qWarning("AppLauncher::execute"); // Convert the command line in to a list of arguments QStringList list = QStringList::split(QRegExp(" *"),c); if ( !docParam.isEmpty() ) list.append( docParam ); QString appName = list[0]; if ( isRunning(appName) ) { QCString channel = "QPE/Application/"; channel += appName.latin1(); // Need to lock it to avoid race conditions with QPEApplication::processQCopFile QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName); if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) { #ifndef Q_OS_WIN32 flock(f.handle(), LOCK_EX); #endif QDataStream ds(&f); QByteArray b; QDataStream bstream(b, IO_WriteOnly); if ( !f.size() ) { ds << channel << QCString("raise()") << b; if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) { int id = startTimer(RAISE_TIMEOUT_MS); waitingHeartbeat.insert( appName, id ); } } if ( !docParam.isEmpty() ) { bstream << docParam; ds << channel << QCString("setDocument(QString)") << b; } f.flush(); #ifndef Q_OS_WIN32 flock(f.handle(), LOCK_UN); #endif f.close(); } if ( QCopChannel::isRegistered(channel) ) // avoid unnecessary warnings QCopChannel::send(channel,"QPEProcessQCop()"); return TRUE; } #ifdef QT_NO_QWS_MULTIPROCESS QMessageBox::warning( 0, tr("Error"), tr("<qt>Could not find the application %1</qt>").arg(c), tr("OK"), 0, 0, 0, 1 ); #else QStrList slist; unsigned j; for ( j = 0; j < list.count(); j++ ) slist.append( list[j].utf8() ); const char **args = new const char *[slist.count() + 1]; for ( j = 0; j < slist.count(); j++ ) args[j] = slist.at(j); args[j] = NULL; #ifndef Q_OS_WIN32 +#ifdef Q_OS_MACX + if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".dylib" ) ) { +#else if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) { +#endif /* Q_OS_MACX */ qDebug( "Quick launching: %s", args[0] ); if ( getuid() == 0 ) setpriority( PRIO_PROCESS, qlPid, 0 ); QCString qlch("QPE/QuickLauncher-"); qlch += QString::number(qlPid); QCopEnvelope env( qlch, "execute(QStrList)" ); env << slist; runningApps[qlPid] = QString(args[0]); emit launched(qlPid, QString(args[0])); QCopEnvelope e("QPE/System", "busy()"); qlPid = 0; qlReady = FALSE; QTimer::singleShot( getuid() == 0 ? 800 : 1500, this, SLOT(createQuickLauncher()) ); } else { int pid = ::vfork(); if ( !pid ) { for ( int fd = 3; fd < 100; fd++ ) ::close( fd ); ::setpgid( ::getpid(), ::getppid() ); // Try bindir first, so that foo/bar works too ::execv( QPEApplication::qpeDir()+"bin/"+args[0], (char * const *)args ); ::execvp( args[0], (char * const *)args ); _exit( -1 ); } runningApps[pid] = QString(args[0]); emit launched(pid, QString(args[0])); QCopEnvelope e("QPE/System", "busy()"); } #else QProcess *proc = new QProcess(this); if (proc){ for (int i=0; i < slist.count(); i++) proc->addArgument(args[i]); connect(proc, SIGNAL(processExited()), this, SLOT(processExited())); if (!proc->start()){ qDebug("Unable to start application %s", args[0]); }else{ PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier(); if (procInfo){ DWORD pid = procInfo->dwProcessId; runningApps[pid] = QString(args[0]); runningAppsProc.append(proc); emit launched(pid, QString(args[0])); QCopEnvelope e("QPE/System", "busy()"); }else{ qDebug("Unable to read process inforation #1 for %s", args[0]); } } }else{ qDebug("Unable to create process for application %s", args[0]); return FALSE; } #endif #endif //QT_NO_QWS_MULTIPROCESS delete [] args; return TRUE; } void AppLauncher::kill( int pid ) { #ifndef Q_OS_WIN32 ::kill( pid, SIGTERM ); diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp index 8f3e812..62e316c 100644 --- a/core/launcher/inputmethods.cpp +++ b/core/launcher/inputmethods.cpp @@ -166,129 +166,133 @@ InputMethods::~InputMethods() unloadInputMethods(); } void InputMethods::hideInputMethod() { kbdButton->setOn( FALSE ); } void InputMethods::showInputMethod() { kbdButton->setOn( TRUE ); } void InputMethods::showInputMethod(const QString& name) { int i = 0; QValueList<InputMethod>::Iterator it; InputMethod *im = 0; for ( it = inputMethodList.begin(); it != inputMethodList.end(); ++it, i++ ) { QString lname = (*it).libName.mid((*it).libName.findRev('/') + 1); if ( (*it).name() == name || lname == name ) { im = &(*it); break; } } if ( im ) chooseKeyboard(im); } void InputMethods::resetStates() { if ( mkeyboard && !mkeyboard->newIM ) mkeyboard->interface->resetState(); } QRect InputMethods::inputRect() const { if ( !mkeyboard || !mkeyboard->widget || !mkeyboard->widget->isVisible() ) return QRect(); else return mkeyboard->widget->geometry(); } void InputMethods::unloadInputMethods() { unloadMethod( inputMethodList ); unloadMethod( inputModifierList ); inputMethodList.clear(); inputModifierList.clear(); } void InputMethods::unloadMethod( QValueList<InputMethod>& list ) { QValueList<InputMethod>::Iterator it; for (it = list.begin(); it != list.end(); ++it ) (*it).releaseInterface(); } QStringList InputMethods::plugins()const { QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif /* Q_OS_MACX */ return dir.entryList(); } void InputMethods::installTranslator( const QString& type ) { QStringList langs = Global::languageList(); QStringList::ConstIterator lit; for ( lit= langs.begin(); lit!=langs.end(); ++lit) { QString lang = *lit; QTranslator * trans = new QTranslator(qApp); QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; if ( trans->load( tfn )) qApp->installTranslator( trans ); else delete trans; } } void InputMethods::setPreferedHandlers() { Config cfg("qpe"); cfg.setGroup("InputMethod"); QString current = cfg.readEntry("current"); QString im = cfg.readEntry("im"); QValueList<InputMethod>::Iterator it; if (!inputModifierList.isEmpty() && !im.isEmpty() ) { for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it ) if ( (*it).name() == im ) { imethod = &(*it); break; } } if (!inputMethodList.isEmpty() && !current.isEmpty() ) { for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) if ( (*it).name() == current ) { qWarning("preferred keyboard is %s", current.latin1() ); mkeyboard = &(*it); kbdButton->setPixmap( *mkeyboard->icon() ); break; } } } void InputMethods::loadInputMethods() { #ifndef QT_NO_COMPONENT hideInputMethod(); mkeyboard = 0; unloadInputMethods(); QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; QStringList list = plugins(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { InputMethodInterface *iface = 0; ExtInputMethodInterface *eface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) { InputMethod input; input.newIM = FALSE; diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp index 579c78c..63f8d05 100644 --- a/core/launcher/irserver.cpp +++ b/core/launcher/irserver.cpp @@ -1,73 +1,77 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "irserver.h" #include <qtopia/qlibrary.h> #include <qtopia/qpeapplication.h> #include <qtranslator.h> #include "obexinterface.h" #include <qdir.h> IrServer::IrServer( QObject *parent, const char *name ) : QObject( parent, name ), obexIface(0) { lib = 0; obexIface = 0; QString path = QPEApplication::qpeDir() + "/plugins/obex/"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif /* Q_OS_MACX */ QStringList list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { QLibrary *trylib = new QLibrary( path + *it ); //qDebug("trying lib %s", (path + (*it)).latin1() ); if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { lib = trylib; //qDebug("found obex lib" ); QString lang = getenv( "LANG" ); QTranslator * trans = new QTranslator(qApp); QString type = (*it).left( (*it).find(".") ); QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; //qDebug("tr fpr obex: %s", tfn.latin1() ); if ( trans->load( tfn )) qApp->installTranslator( trans ); else delete trans; break; } else { delete lib; } } if ( !lib ) qDebug("could not load IR plugin" ); } IrServer::~IrServer() { if ( obexIface ) obexIface->release(); delete lib; } diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 74965df..5416d33 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -215,129 +215,131 @@ static bool firstUse() FirstUse *fu = new FirstUse(); fu->exec(); bool rs = fu->restartNeeded(); delete fu; return rs; } int initApplication( int argc, char ** argv ) { cleanup(); initEnvironment(); //Don't flicker at startup: #ifdef QWS QWSServer::setDesktopBackground( QImage() ); #endif ServerApplication a( argc, argv, QApplication::GuiServer ); refreshTimeZoneConfig(); initKeyboard(); // Don't use first use under Windows if ( firstUse() ) { a.restart(); return 0; } ODevice::inst ( )-> setSoftSuspend ( true ); { QCopEnvelope e("QPE/System", "setBacklight(int)" ); e << -3; // Forced on } AlarmServer::initialize(); Server *s = new Server(); (void)new SysFileMonitor(s); #ifdef QWS Network::createServer(s); #endif s->show(); /* THE ARM rtc has problem holdings the time on reset */ if ( QDate::currentDate ( ). year ( ) < 2000 ) { if ( QMessageBox::information ( 0, ServerApplication::tr( "Information" ), ServerApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); e << QString ( ); } } int rv = a.exec(); qDebug("exiting..."); delete s; +#ifndef Q_OS_MACX ODevice::inst()->setSoftSuspend( false ); +#endif return rv; } static const char *pidfile_path = "/var/run/opie.pid"; void create_pidfile ( ) { FILE *f; if (( f = ::fopen ( pidfile_path, "w" ))) { ::fprintf ( f, "%d", getpid ( )); ::fclose ( f ); } } void remove_pidfile ( ) { ::unlink ( pidfile_path ); } void handle_sigterm ( int /* sig */ ) { if ( qApp ) qApp-> quit ( ); } #ifndef Q_OS_WIN32 int main( int argc, char ** argv ) { ::signal ( SIGCHLD, SIG_IGN ); ::signal ( SIGTERM, handle_sigterm ); ::signal ( SIGINT, handle_sigterm ); ::setsid ( ); ::setpgid ( 0, 0 ); ::atexit ( remove_pidfile ); create_pidfile ( ); int retVal = initApplication( argc, argv ); // Have we been asked to restart? if ( ServerApplication::doRestart ) { for ( int fd = 3; fd < 100; fd++ ) close( fd ); execl( (QPEApplication::qpeDir()+"bin/qpe").latin1(), "qpe", 0 ); } // Kill them. Kill them all. ::kill ( 0, SIGTERM ); ::sleep ( 1 ); ::kill ( 0, SIGKILL ); return retVal; } #else int main( int argc, char ** argv ) { int retVal = initApplication( argc, argv ); diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp index 4f149a5..bf34368 100644 --- a/core/launcher/packageslave.cpp +++ b/core/launcher/packageslave.cpp @@ -1,97 +1,341 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "packageslave.h" +#include <qtopia/qprocess.h> -#include <qpe/process.h> -#include <qpe/qcopenvelope_qws.h> +#ifdef Q_WS_QWS +#include <qtopia/qcopenvelope_qws.h> +#endif #include <qdatastream.h> +#ifdef Q_WS_QWS #include <qcopchannel_qws.h> +#endif +#include <qtextstream.h> +#include <qdir.h> + +#include <stdlib.h> +#include <sys/stat.h> // mkdir() + +#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <unistd.h> +#include <sys/vfs.h> +#include <mntent.h> +#elif defined(Q_OS_WIN32) +#include <windows.h> +#include <winbase.h> +#elif defined(Q_OS_MACX) +#include <unistd.h> +#endif + -PackageSlave::PackageSlave( QObject *parent, char* name ) - : QObject( parent, name ), packageChannel( 0 ) +PackageHandler::PackageHandler( QObject *parent, char* name ) + : QObject( parent, name ), packageChannel( 0 ), currentProcess( 0 ), mNoSpaceLeft( FALSE ) { // setup qcop channel +#ifndef QT_NO_COP packageChannel = new QCopChannel( "QPE/Package", this ); connect( packageChannel, SIGNAL( received(const QCString &, const QByteArray &) ), this, SLOT( qcopMessage( const QCString &, const QByteArray &) ) ); +#endif } -void PackageSlave::qcopMessage( const QCString &msg, const QByteArray &data ) +void PackageHandler::qcopMessage( const QCString &msg, const QByteArray &data ) { QDataStream stream( data, IO_ReadOnly ); if ( msg == "installPackage(QString)" ) { QString file; stream >> file; installPackage( file ); - } - else if ( msg == "removePackage(QString)" ) { + } else if ( msg == "removePackage(QString)" ) { QString file; stream >> file; removePackage( file ); + } else if ( msg == "addPackageFiles(QString,QString)" ) { + QString location, listfile; + stream >> location >> listfile; + addPackageFiles( location, listfile); + } else if ( msg == "addPackages(QString)" ) { + QString location; + stream >> location; + addPackages( location ); + } else if ( msg == "cleanupPackageFiles(QString)" ) { + QString listfile; + stream >> listfile; + cleanupPackageFiles( listfile ); + } else if ( msg == "cleanupPackages(QString)" ) { + QString location; + stream >> location; + cleanupPackages( location ); + } else if ( msg == "prepareInstall(QString,QString)" ) { + QString size, path; + stream >> size; + stream >> path; + prepareInstall( size, path ); } } -void PackageSlave::installPackage( const QString &package ) +void PackageHandler::installPackage( const QString &package ) { - Process proc( QStringList() << "ipkg" << "install" << package ); + if ( mNoSpaceLeft ) { + mNoSpaceLeft = FALSE; + // Don't emit that for now, I still couldn't test it (Wener) + //sendReply( "installFailed(QString)", package ); + //return; + } + + currentProcess = new QProcess( QStringList() << "ipkg" << "install" << package ); // No tr + connect( currentProcess, SIGNAL( processExited() ), SLOT( iProcessExited() ) ); + connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) ); + connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) ); + currentPackage = package; + currentProcessError=""; sendReply( "installStarted(QString)", package ); + currentProcess->start(); +} + +void PackageHandler::removePackage( const QString &package ) +{ + currentProcess = new QProcess( QStringList() << "ipkg" << "remove" << package ); // No tr + connect( currentProcess, SIGNAL( processExited() ), SLOT( rmProcessExited() ) ); + connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) ); + connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) ); + currentPackage = package; + + currentProcessError=""; + sendReply( "removeStarted(QString)", package ); + currentProcess->start(); +} + +void PackageHandler::sendReply( const QCString& msg, const QString& arg ) +{ +#ifndef QT_NO_COP + QCopEnvelope e( "QPE/Desktop", msg ); + e << arg; +#endif +} + +void PackageHandler::addPackageFiles( const QString &location, + const QString &listfile ) +{ + QFile f(listfile); +#ifndef Q_OS_WIN32 + //make a copy so we can remove the symlinks later + mkdir( ("/usr/lib/ipkg/info/"+location).ascii(), 0777 ); + system(("cp " + f.name() + " /usr/lib/ipkg/info/"+location).ascii()); +#else + QDir d; + //#### revise + qDebug("Copy file at %s: %s", __FILE__, __LINE__ ); + d.mkdir(("/usr/lib/ipkg/info/" + location).ascii()); + system(("copy " + f.name() + " /usr/lib/ipkg/info/"+location).ascii()); +#endif + + + if ( f.open(IO_ReadOnly) ) { + QTextStream ts(&f); + + QString s; + while ( !ts.eof() ) { // until end of file... + s = ts.readLine(); // line of text excluding '\n' + // for s, do link/mkdir. + if ( s.right(1) == "/" ) { + qDebug("do mkdir for %s", s.ascii()); +#ifndef Q_OS_WIN32 + mkdir( s.ascii(), 0777 ); + //possible optimization: symlink directories + //that don't exist already. -- Risky. +#else + d.mkdir( s.ascii()); +#endif + + } else { +#ifndef Q_OS_WIN32 + qDebug("do symlink for %s", s.ascii()); + symlink( (location + s).ascii(), s.ascii() ); +#else + qDebug("Copy file instead of a symlink for WIN32"); + if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE)) + qWarning("Unable to create symlinkfor %s", + (location + s).ascii()); +#endif + } + } + f.close(); + } +} - QString output; - if ( proc.exec( "", output ) ) { - sendReply( "installDone(QString)", package ); +void PackageHandler::addPackages( const QString &location ) +{ + // get list of *.list in location/usr/lib/ipkg/info/*.list + QDir dir(location + "/usr/lib/ipkg/info", "*.list", // No tr + QDir::Name, QDir::Files); + if ( !dir.exists() ) + return; + + QStringList packages = dir.entryList(); + for ( QStringList::Iterator it = packages.begin(); + it != packages.end(); ++it ) { + addPackageFiles( location, *it ); } +} + + +void PackageHandler::cleanupPackageFiles( const QString &listfile ) +{ + QFile f(listfile); + + if ( f.open(IO_ReadOnly) ) { + QTextStream ts(&f); + + QString s; + while ( !ts.eof() ) { // until end of file... + s = ts.readLine(); // line of text excluding '\n' + // for s, do link/mkdir. + if ( s.right(1) == "/" ) { + //should rmdir if empty, after all files have been removed + } else { +#ifndef Q_OS_WIN32 + qDebug("remove symlink for %s", s.ascii()); + //check if it is a symlink first (don't remove /etc/passwd...) + char buf[10]; //we don't care about the contents + if ( ::readlink( s.ascii(),buf, 10 >= 0 ) ) + ::unlink( s.ascii() ); +#else + // ### revise + qWarning("Unable to remove symlink %s:%s", __FILE__, __LINE__); +#endif + } + } + f.close(); + + //remove the list file + ::unlink( listfile.ascii() ); + + } +} + +void PackageHandler::cleanupPackages( const QString &location ) +{ + // get list of *.list in location/usr/lib/ipkg/info/*.list + QDir dir( "/usr/lib/ipkg/info/"+location, "*.list", // No tr + QDir::Name, QDir::Files); + if ( !dir.exists() ) + return; + + QStringList packages = dir.entryList(); + for ( QStringList::Iterator it = packages.begin(); + it != packages.end(); ++it ) { + cleanupPackageFiles( *it ); + } + + //remove the backup directory + //### +} + +void PackageHandler::prepareInstall( const QString& size, const QString& path ) +{ + // Check whether there will be enough space to install the next package. + bool ok; + unsigned int s = size.toUInt( &ok ); + + if ( !ok ) + return; + + // Shamelessly stolen from the sysinfo application (Werner) +#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) + struct statfs fs; + if ( statfs( path.latin1(), &fs ) == 0 ) + if ( s > fs.f_bsize * fs.f_bavail ) { + //qDebug("############### Not enough space left ###############"); + mNoSpaceLeft = TRUE; + } +#endif +} + +void PackageHandler::iProcessExited() +{ + if ( currentProcess->normalExit() && currentProcess->exitStatus() == 0 ) + sendReply( "installDone(QString)", currentPackage ); else { - sendReply( "installFailed(QString)", package ); +#ifndef QT_NO_COP + QCopEnvelope e( "QPE/Desktop", "installFailed(QString,int,QString)" ); + e << currentPackage << currentProcess->exitStatus() + << currentProcessError; +#endif } + + delete currentProcess; + currentProcess = 0; + +#ifndef QT_NO_COP QCopEnvelope e("QPE/System", "linkChanged(QString)"); QString lf = QString::null; e << lf; - unlink( package ); +#endif + unlink( currentPackage ); } -void PackageSlave::removePackage( const QString &package ) +void PackageHandler::rmProcessExited() { - Process proc( QStringList() << "ipkg" << "remove" << package ); + if ( currentProcess->normalExit() && currentProcess->exitStatus() == 0 ) + sendReply( "removeDone(QString)", currentPackage ); + else + sendReply( "removeFailed(QString)", currentPackage ); - sendReply( "removeStarted(QString)", package ); - - QString output; - if ( proc.exec( "", output ) ) { - sendReply( "removeDone(QString)", package ); - } - else { - sendReply( "removeFailed(QString)", package ); - } +#ifndef QT_NO_COP QCopEnvelope e("QPE/System", "linkChanged(QString)"); QString lf = QString::null; e << lf; +#endif } -void PackageSlave::sendReply( const QCString& msg, const QString& arg ) +void PackageHandler::readyReadStdout() { - QCopEnvelope e( "QPE/Desktop", msg ); - e << arg; + while ( currentProcess->canReadLineStdout() ) { + QString line = currentProcess->readLineStdout(); + currentProcessError.append("OUT:"+line); + if ( line.contains( "Unpacking" ) ) // No tr + sendReply( "installStep(QString)", "one" ); // No tr + else if ( line.contains( "Configuring" ) ) // No tr + sendReply( "installStep(QString)", "two" ); // No tr + } +} + +void PackageHandler::readyReadStderr() +{ + while ( currentProcess->canReadLineStderr() ) { + QString line = currentProcess->readLineStderr(); + currentProcessError.append("ERR:"+line); + } +} + +void PackageHandler::redoPackages() +{ + //get list of filesystems + + //call cleanupPackages for the ones that have disappeared + + //call addPackageFiles for the new ones } diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp index a07bf64..19a8c93 100644 --- a/core/launcher/qprocess_unix.cpp +++ b/core/launcher/qprocess_unix.cpp @@ -1,116 +1,119 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ //#include "qplatformdefs.h" // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. #if defined(connect) #undef connect #endif #include "qprocess.h" #ifndef QT_NO_PROCESS #include "qapplication.h" #include "qqueue.h" #include "qlist.h" #include "qsocketnotifier.h" #include "qtimer.h" #include "qregexp.h" #include "qcleanuphandler_p.h" #include <stdlib.h> // ### FOR Qt 2.3 compat #include <unistd.h> #include <signal.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <sys/wait.h> #include <sys/fcntl.h> #include <errno.h> +#ifdef Q_OS_MACX +#include <sys/time.h> +#endif #include <sys/resource.h> #ifdef __MIPSEL__ # ifndef SOCK_DGRAM # define SOCK_DGRAM 1 # endif # ifndef SOCK_STREAM # define SOCK_STREAM 2 # endif #endif //#define QT_QPROCESS_DEBUG #ifdef Q_C_CALLBACKS extern "C" { #endif // Q_C_CALLBACKS #define QT_SIGNAL_RETTYPE void #define QT_SIGNAL_ARGS int #define QT_SIGNAL_IGNORE SIG_IGN QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS); QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS); #ifdef Q_C_CALLBACKS } #endif // Q_C_CALLBACKS class QProc; class QProcessManager; class QProcessPrivate { public: QProcessPrivate(); ~QProcessPrivate(); void closeOpenSocketsForChild(); void newProc( pid_t pid, QProcess *process ); QByteArray bufStdout; QByteArray bufStderr; QQueue<QByteArray> stdinBuf; QSocketNotifier *notifierStdin; QSocketNotifier *notifierStdout; QSocketNotifier *notifierStderr; ssize_t stdinBufRead; QProc *proc; bool exitValuesCalculated; bool socketReadCalled; static QProcessManager *procManager; }; /*********************************************************************** * * QProc * diff --git a/core/launcher/server.pro b/core/launcher/server.pro index 93baeb4..0513536 100644 --- a/core/launcher/server.pro +++ b/core/launcher/server.pro @@ -54,67 +54,72 @@ SOURCES += server.cpp \ serverinterface.cpp \ launchertab.cpp \ documentlist.cpp \ appicons.cpp \ taskbar.cpp \ runningappbar.cpp \ applauncher.cpp \ stabmon.cpp \ inputmethods.cpp \ systray.cpp \ wait.cpp \ shutdownimpl.cpp \ launcher.cpp \ launcherview.cpp \ $$(OPIEDIR)/core/apps/calibrate/calibrate.cpp \ transferserver.cpp \ packageslave.cpp \ irserver.cpp \ qcopbridge.cpp \ startmenu.cpp \ main.cpp \ firstuse.cpp \ $$(OPIEDIR)/rsync/base64.c \ $$(OPIEDIR)/rsync/buf.c \ $$(OPIEDIR)/rsync/checksum.c \ $$(OPIEDIR)/rsync/command.c \ $$(OPIEDIR)/rsync/delta.c \ $$(OPIEDIR)/rsync/emit.c \ $$(OPIEDIR)/rsync/hex.c \ $$(OPIEDIR)/rsync/job.c \ $$(OPIEDIR)/rsync/mdfour.c \ $$(OPIEDIR)/rsync/mksum.c \ $$(OPIEDIR)/rsync/msg.c \ $$(OPIEDIR)/rsync/netint.c \ $$(OPIEDIR)/rsync/patch.c \ $$(OPIEDIR)/rsync/prototab.c \ $$(OPIEDIR)/rsync/readsums.c \ $$(OPIEDIR)/rsync/scoop.c \ $$(OPIEDIR)/rsync/search.c \ $$(OPIEDIR)/rsync/stats.c \ $$(OPIEDIR)/rsync/stream.c \ $$(OPIEDIR)/rsync/sumset.c \ $$(OPIEDIR)/rsync/trace.c \ $$(OPIEDIR)/rsync/tube.c \ $$(OPIEDIR)/rsync/util.c \ $$(OPIEDIR)/rsync/version.c \ $$(OPIEDIR)/rsync/whole.c \ $$(OPIEDIR)/rsync/qrsync.cpp \ syncdialog.cpp \ serverapp.cpp \ launcherglobal.cpp \ qprocess.cpp \ qprocess_unix.cpp \ screensaver.cpp INCLUDEPATH += $(OPIEDIR)/core/apps/calibrate DEPENDPATH += $(OPIEDIR)/core/apps/calibrate INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/rsync DEPENDPATH += $(OPIEDIR)/rsync TARGET = qpe -LIBS += -lcrypt -lqpe -lopie +CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) +contains( CONFTEST, y ){ + LIBS += -lqpe -lopie +}else{ + LIBS += -lcrypt -lqpe -lopie +} include ( $(OPIEDIR)/include.pro ) diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 014418d..08ae885 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -195,129 +195,133 @@ bool StartMenu::loadMenu( QPopupMenu *menu ) launchMenu->setName(sepfirst ? "accessories" : "accessories_need_sep"); // No tr return (nother || ntabs ); } void StartMenu::launch() { int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); if ( launchMenu->isVisible() ) launchMenu->hide(); else launchMenu->popup( QPoint( 1, y ) ); } static int compareAppletPositions(const void *a, const void *b) { const MenuApplet* aa = *(const MenuApplet**)a; const MenuApplet* ab = *(const MenuApplet**)b; int d = aa->iface->position() - ab->iface->position(); if ( d ) return d; return QString::compare(aa->library->library(),ab->library->library()); } void StartMenu::clearApplets() { if (launchMenu ) launchMenu-> hide(); for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { MenuApplet *applet = it. current ( ); if ( launchMenu ) { launchMenu-> removeItem ( applet-> id ); delete applet-> popup; } applet-> iface-> release(); applet-> library-> unload(); delete applet-> library; } m_applets.clear(); } void StartMenu::loadApplets() { Config cfg( "StartMenu" ); cfg.setGroup( "Applets" ); // SafeMode causes too much problems, so we disable it for now -- // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02 // removed in the remerge PluginManager could handle it // we don't currently use it -zecke QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); QString lang = getenv( "LANG" ); QString path = QPEApplication::qpeDir() + "/plugins/applets"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif /* Q_OS_MACX */ QStringList list = dir.entryList(); QStringList::Iterator it; int napplets=0; MenuApplet* *xapplets = new MenuApplet*[list.count()]; for ( it = list.begin(); it != list.end(); ++it ) { if ( exclude.find( *it ) != exclude.end() ) continue; MenuAppletInterface *iface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { MenuApplet *applet = new MenuApplet; xapplets[napplets++] = applet; applet->library = lib; applet->iface = iface; QTranslator *trans = new QTranslator(qApp); QString type = (*it).left( (*it).find(".") ); QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; if ( trans->load( tfn )) qApp->installTranslator( trans ); else delete trans; } else { exclude += *it; delete lib; } } cfg.writeEntry( "ExcludeApplets", exclude, ',' ); qsort(xapplets,napplets,sizeof(m_applets[0]),compareAppletPositions); int foo = ( launchMenu-> count ( )) ? launchMenu-> insertSeparator ( ) : 0; while (napplets--) { MenuApplet *applet = xapplets[napplets]; applet-> popup = applet-> iface-> popup ( this ); if ( applet-> popup ) applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); else applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); m_applets.insert ( applet-> id, new MenuApplet(*applet)); } delete [] xapplets; } /* * Launcher calls loadMenu too often fix that */ void StartMenu::addApplets(QPopupMenu* pop) { QIntDict<MenuApplet> dict; if( pop-> count ( )) pop-> insertSeparator ( ); for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { MenuApplet *applet = it. current ( ); if ( applet-> popup ) applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); else diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp index 6122770..691f6b8 100644 --- a/core/launcher/systray.cpp +++ b/core/launcher/systray.cpp @@ -41,109 +41,114 @@ SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0) { //setFrameStyle( QFrame::Panel | QFrame::Sunken ); loadApplets(); } SysTray::~SysTray() { clearApplets(); } static int compareAppletPositions(const void *a, const void *b) { const TaskbarApplet* aa = *(const TaskbarApplet**)a; const TaskbarApplet* ab = *(const TaskbarApplet**)b; int d = ab->iface->position() - aa->iface->position(); if ( d ) return d; return QString::compare(ab->name,aa->name); } void SysTray::loadApplets() { hide(); clearApplets(); addApplets(); } void SysTray::clearApplets() { #ifndef QT_NO_COMPONENTS /* * Note on clearing. SOme applets delete their * applets themselves some don't do it * and on restart this can crash. If we delete it * here we might end up in a double deletion. We could * use QGuardedPtr but that would be one QOBject * for every applet more but only useful for restart */ QValueList<TaskbarApplet>::Iterator mit; for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) { (*mit).iface->release(); (*mit).library->unload(); delete (*mit).library; } #endif appletList.clear(); if ( layout ) delete layout; layout = new QHBoxLayout( this, 0, 1 ); layout->setAutoAdd(TRUE); } void SysTray::addApplets() { hide(); #ifndef QT_NO_COMPONENTS Config cfg( "Taskbar" ); cfg.setGroup( "Applets" ); QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); QString lang = getenv( "LANG" ); QString path = QPEApplication::qpeDir() + "/plugins/applets"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif /* Q_OS_MACX */ QStringList list = dir.entryList(); QStringList::Iterator it; int napplets=0; TaskbarApplet* *applets = new TaskbarApplet*[list.count()]; for ( it = list.begin(); it != list.end(); ++it ) { if ( exclude.find( *it ) != exclude.end() ) continue; + qWarning( "Found Applet: %s", (*it).latin1() ); TaskbarAppletInterface *iface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { TaskbarApplet *applet = new TaskbarApplet; applets[napplets++] = applet; applet->library = lib; applet->iface = iface; QTranslator *trans = new QTranslator(qApp); QString type = (*it).left( (*it).find(".") ); QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; if ( trans->load( tfn )) qApp->installTranslator( trans ); else delete trans; } else { exclude += *it; delete lib; } } cfg.writeEntry( "ExcludeApplets", exclude, ',' ); qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); while (napplets--) { TaskbarApplet *applet = applets[napplets]; applet->applet = applet->iface->applet( this ); appletList.append(*applet); } delete [] applets; #else /* ## FIXME single app */ TaskbarApplet * const applet = new TaskbarApplet(); applet->iface = new ClockAppletImpl(); applet->applet = applet->iface->applet( this ); appletList.append( applet ); #endif show(); } diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index c69df2d..439e110 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp @@ -1,96 +1,99 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ //#define _XOPEN_SOURCE #include <qtopia/global.h> #include <qtopia/qpeapplication.h> #ifndef Q_OS_WIN32 #include <pwd.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> #include <time.h> + +#ifndef Q_OS_MACX #include <shadow.h> #include <crypt.h> +#endif /* Q_OS_MACX */ #else #include <stdlib.h> #include <time.h> #endif #if defined(_OS_LINUX_) #include <shadow.h> #endif #include <qdir.h> #include <qfile.h> #include <qtextstream.h> #include <qdatastream.h> #include <qmessagebox.h> #include <qstringlist.h> #include <qfileinfo.h> #include <qregexp.h> //#include <qtopia/qcopchannel_qws.h> #include <qtopia/process.h> #include <qtopia/global.h> #include <qtopia/config.h> #include <qtopia/private/contact.h> #include <qtopia/quuid.h> #include <qtopia/version.h> #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif #include "launcherglobal.h" #include "transferserver.h" #include <qtopia/qprocess.h> const int block_size = 51200; TransferServer::TransferServer( Q_UINT16 port, QObject *parent, const char* name) : QServerSocket( port, 1, parent, name ) { connections.setAutoDelete( TRUE ); if ( !ok() ) qWarning( "Failed to bind to port %d", port ); } void TransferServer::authorizeConnections() { QListIterator<ServerPI> it(connections); while ( it.current() ) { if ( !it.current()->verifyAuthorised() ) { disconnect( it.current(), SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); connections.removeRef( it.current() ); } else ++it; } } void TransferServer::closed(ServerPI *item) { connections.removeRef(item); } TransferServer::~TransferServer() diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.pro b/core/multimedia/opieplayer/wavplugin/wavplugin.pro index 0366542..db41ad4 100644 --- a/core/multimedia/opieplayer/wavplugin/wavplugin.pro +++ b/core/multimedia/opieplayer/wavplugin/wavplugin.pro @@ -1,32 +1,32 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = wavplugin.h wavpluginimpl.h SOURCES = wavplugin.cpp wavpluginimpl.cpp TARGET = wavplugin DESTDIR = $(OPIEDIR)/plugins/codecs INCLUDEPATH += $(OPIEDIR)/include .. DEPENDPATH += ../$(OPIEDIR)/include .. LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../../../i18n/de/libwavplugin.ts \ ../../../../i18n/nl/libwavplugin.ts \ ../../../../i18n/da/libwavplugin.ts \ ../../../../i18n/xx/libwavplugin.ts \ ../../../../i18n/en/libwavplugin.ts \ ../../../../i18n/es/libwavplugin.ts \ ../../../../i18n/fr/libwavplugin.ts \ ../../../../i18n/hu/libwavplugin.ts \ ../../../../i18n/ja/libwavplugin.ts \ ../../../../i18n/ko/libwavplugin.ts \ ../../../../i18n/no/libwavplugin.ts \ ../../../../i18n/pl/libwavplugin.ts \ ../../../../i18n/pt/libwavplugin.ts \ ../../../../i18n/pt_BR/libwavplugin.ts \ ../../../../i18n/sl/libwavplugin.ts \ ../../../../i18n/zh_CN/libwavplugin.ts \ ../../../../i18n/zh_TW/libwavplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/today/plugins/addressbook/addressbook.pro b/core/pim/today/plugins/addressbook/addressbook.pro index 4ebbc9e..54aaff2 100644 --- a/core/pim/today/plugins/addressbook/addressbook.pro +++ b/core/pim/today/plugins/addressbook/addressbook.pro @@ -1,43 +1,43 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release # Input HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \ addresspluginwidget.h SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \ addresspluginwidget.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie DESTDIR = $(OPIEDIR)/plugins/today TARGET = todayaddressbookplugin TRANSLATIONS = ../../../../../i18n/de/libtodayaddressbookplugin.ts \ ../../../../../i18n/nl/libtodayaddressbookplugin.ts \ ../../../../../i18n/xx/libtodayaddressbookplugin.ts \ ../../../../../i18n/en/libtodayaddressbookplugin.ts \ ../../../../../i18n/es/libtodayaddressbookplugin.ts \ ../../../../../i18n/fr/libtodayaddressbookplugin.ts \ ../../../../../i18n/hu/libtodayaddressbookplugin.ts \ ../../../../../i18n/ja/libtodayaddressbookplugin.ts \ ../../../../../i18n/ko/libtodayaddressbookplugin.ts \ ../../../../../i18n/no/libtodayaddressbookplugin.ts \ ../../../../../i18n/pl/libtodayaddressbookplugin.ts \ ../../../../../i18n/pt/libtodayaddressbookplugin.ts \ ../../../../../i18n/pt_BR/libtodayaddressbookplugin.ts \ ../../../../../i18n/sl/libtodayaddressbookplugin.ts \ ../../../../../i18n/zh_CN/libtodayaddressbookplugin.ts \ ../../../../../i18n/zh_TW/libtodayaddressbookplugin.ts \ ../../../../../i18n/it/libtodayaddressbookplugin.ts \ ../../../../../i18n/da/libtodayaddressbookplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro index e0a1dcb..2139f63 100644 --- a/core/pim/today/plugins/datebook/datebook.pro +++ b/core/pim/today/plugins/datebook/datebook.pro @@ -1,39 +1,39 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release # Input HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ datebookevent.h datebookpluginwidget.h SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ datebookevent.cpp datebookpluginwidget.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie DESTDIR = $(OPIEDIR)/plugins/today TARGET = todaydatebookplugin TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \ ../../../../../i18n/nl/libtodaydatebookplugin.ts \ ../../../../../i18n/xx/libtodaydatebookplugin.ts \ ../../../../../i18n/en/libtodaydatebookplugin.ts \ ../../../../../i18n/es/libtodaydatebookplugin.ts \ ../../../../../i18n/fr/libtodaydatebookplugin.ts \ ../../../../../i18n/hu/libtodaydatebookplugin.ts \ ../../../../../i18n/ja/libtodaydatebookplugin.ts \ ../../../../../i18n/ko/libtodaydatebookplugin.ts \ ../../../../../i18n/no/libtodaydatebookplugin.ts \ ../../../../../i18n/pl/libtodaydatebookplugin.ts \ ../../../../../i18n/pt/libtodaydatebookplugin.ts \ ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \ ../../../../../i18n/sl/libtodaydatebookplugin.ts \ ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \ ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \ ../../../../../i18n/it/libtodaydatebookplugin.ts \ ../../../../../i18n/da/libtodaydatebookplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/today/plugins/mail/mail.pro b/core/pim/today/plugins/mail/mail.pro index 70c484d..421b3a5 100644 --- a/core/pim/today/plugins/mail/mail.pro +++ b/core/pim/today/plugins/mail/mail.pro @@ -1,37 +1,37 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release # Input HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie DESTDIR = $(OPIEDIR)/plugins/today TARGET = todaymailplugin TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \ ../../../../../i18n/nl/libtodaymailplugin.ts \ ../../../../../i18n/xx/libtodaymailplugin.ts \ ../../../../../i18n/en/libtodaymailplugin.ts \ ../../../../../i18n/es/libtodaymailplugin.ts \ ../../../../../i18n/fr/libtodaymailplugin.ts \ ../../../../../i18n/hu/libtodaymailplugin.ts \ ../../../../../i18n/ja/libtodaymailplugin.ts \ ../../../../../i18n/ko/libtodaymailplugin.ts \ ../../../../../i18n/no/libtodaymailplugin.ts \ ../../../../../i18n/pl/libtodaymailplugin.ts \ ../../../../../i18n/pt/libtodaymailplugin.ts \ ../../../../../i18n/pt_BR/libtodaymailplugin.ts \ ../../../../../i18n/sl/libtodaymailplugin.ts \ ../../../../../i18n/zh_CN/libtodaymailplugin.ts \ ../../../../../i18n/zh_TW/libtodaymailplugin.ts \ ../../../../../i18n/it/libtodaymailplugin.ts \ ../../../../../i18n/da/libtodaymailplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro index 31a6a27..c8730bb 100644 --- a/core/pim/today/plugins/todolist/todolist.pro +++ b/core/pim/today/plugins/todolist/todolist.pro @@ -1,40 +1,40 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release # Input HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ todopluginwidget.h SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ todopluginwidget.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie DESTDIR = $(OPIEDIR)/plugins/today TARGET = todaytodolistplugin TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ ../../../../../i18n/nl/libtodaytodolistplugin.ts \ ../../../../../i18n/xx/libtodaytodolistplugin.ts \ ../../../../../i18n/en/libtodaytodolistplugin.ts \ ../../../../../i18n/es/libtodaytodolistplugin.ts \ ../../../../../i18n/fr/libtodaytodolistplugin.ts \ ../../../../../i18n/hu/libtodaytodolistplugin.ts \ ../../../../../i18n/ja/libtodaytodolistplugin.ts \ ../../../../../i18n/ko/libtodaytodolistplugin.ts \ ../../../../../i18n/no/libtodaytodolistplugin.ts \ ../../../../../i18n/pl/libtodaytodolistplugin.ts \ ../../../../../i18n/pt/libtodaytodolistplugin.ts \ ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ ../../../../../i18n/sl/libtodaytodolistplugin.ts \ ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ ../../../../../i18n/it/libtodaytodolistplugin.ts \ ../../../../../i18n/da/libtodaytodolistplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index f213943..cb18c1c 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -113,133 +113,140 @@ void Today::setOwnerField() { * Set the owner field with a given QString, for example per qcop. */ void Today::setOwnerField( QString &message ) { if ( !message.isEmpty() ) { OwnerField->setText( "<b>" + message + "</b>" ); } } /** * Init stuff needed for today. Reads the config file. */ void Today::init() { // read config Config cfg( "today" ); cfg.setGroup( "Plugins" ); m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); m_allApplets = cfg.readListEntry( "AllApplets", ',' ); cfg.setGroup( "General" ); m_iconSize = cfg.readNumEntry( "IconSize", 18 ); m_hideBanner = cfg.readNumEntry( "HideBanner", 0 ); setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); // set the date in top label QDate date = QDate::currentDate(); DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) ); if ( layout ) { delete layout; } if ( m_hideBanner ) { Opiezilla->hide(); TodayLabel->hide(); } else { Opiezilla->show(); TodayLabel->show(); } layout = new QVBoxLayout( this ); layout->addWidget( Frame ); layout->addWidget( OwnerField ); } /** * Load the plugins */ void Today::loadPlugins() { init(); QValueList<TodayPlugin>::Iterator tit; if ( !pluginList.isEmpty() ) { for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { (*tit).guiBox->hide(); (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); delete (*tit).guiBox; (*tit).library->unload(); delete (*tit).library; } pluginList.clear(); } QString path = QPEApplication::qpeDir() + "/plugins/today"; + qWarning("Searching for Plugins in: %s", path.latin1()); +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif QStringList list = dir.entryList(); QStringList::Iterator it; + qWarning("Found: %d entries !", list.count() ); + QMap<QString, TodayPlugin> tempList; for ( it = list.begin(); it != list.end(); ++it ) { QInterfacePtr<TodayPluginInterface> iface; QLibrary *lib = new QLibrary( path + "/" + *it ); qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); qDebug( QString(*it) ); TodayPlugin plugin; plugin.library = lib; plugin.iface = iface; plugin.name = QString(*it); QString type = (*it).left( (*it).find(".") ); // grr, sharp rom does not know Global::languageList(); // QStringList langs = Global::languageList(); QString tfn = QPEApplication::qpeDir() + "/i18n/"; QDir langDir = tfn; QStringList langs = langDir.entryList("*", QDir::Dirs ); for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { QString lang = *lit; qDebug( "Languages: " + lang ); QTranslator * trans = new QTranslator( qApp ); QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; if ( trans->load( tfn ) ) { qApp->installTranslator( trans ); } else { delete trans; } } // find out if plugins should be shown if ( m_excludeApplets.grep( *it ).isEmpty() ) { plugin.active = true; } else { plugin.active = false; } plugin.guiPart = plugin.iface->guiPart(); plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh(); // package the whole thing into a qwidget so it can be shown and hidden plugin.guiBox = new QWidget( this ); QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); QPixmap plugPix; plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); plugIcon->setPixmap( plugPix ); QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") ); plugIcon->setName( plugin.guiPart->appName() ); connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); // a scrollview for each plugin QScrollView* sv = new QScrollView( plugin.guiBox ); QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); // not sure if that is good .-) sv->setMinimumHeight( 12 ); sv->setResizePolicy( QScrollView::AutoOneFit ); sv->setHScrollBarMode( QScrollView::AlwaysOff ); sv->setFrameShape( QFrame::NoFrame ); diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp index 0337a94..239c824 100644 --- a/core/qws/transferserver.cpp +++ b/core/qws/transferserver.cpp @@ -1,180 +1,199 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define _XOPEN_SOURCE #include <pwd.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> #include <time.h> + +#ifndef Q_OS_MACX #include <shadow.h> +#endif /* Q_OS_MACX */ /* we need the _OS_LINUX stuff first ! */ #include <qglobal.h> #ifndef _OS_LINUX_ +// Is anybody able to review this ? The include "uuid/uuid.h" couldn't be found +// anywhere ? Therfore I removed it completely.. +// I think it should be made permanentyl !? (eilers) +#warning "Where should uuid/uuid.h be found ? Removed this part .. (eilers)" +#if 0 extern "C" { #include <uuid/uuid.h> #define UUID_H_INCLUDED } +#endif + #endif // not defined linux #if defined(_OS_LINUX_) #include <shadow.h> +#elif defined(Q_OS_MACX) +#include <stdlib.h> #endif #include <qdir.h> #include <qfile.h> #include <qtextstream.h> #include <qdatastream.h> #include <qmessagebox.h> #include <qstringlist.h> #include <qfileinfo.h> #include <qregexp.h> //#include <qpe/qcopchannel_qws.h> #include <qpe/process.h> #include <qpe/global.h> #include <qpe/config.h> #include <qpe/contact.h> #include <qpe/quuid.h> #include <qpe/version.h> #include <qpe/qcopenvelope_qws.h> #include "transferserver.h" #include <opie/oprocess.h> const int block_size = 51200; TransferServer::TransferServer( Q_UINT16 port, QObject *parent , const char* name ) : QServerSocket( port, 1, parent, name ) { if ( !ok() ) qWarning( "Failed to bind to port %d", port ); } TransferServer::~TransferServer() { } void TransferServer::newConnection( int socket ) { (void) new ServerPI( socket, this ); } /* * small class in anonymous namespace * to generate a QUUid for us */ namespace { struct UidGen { QString uuid(); }; -#if !defined(_OS_LINUX_) - +#if defined(Q_OS_MACX) QString UidGen::uuid() { - uuid_t uuid; - uuid_generate( uuid ); - return QUUid( uuid ).toString(); + srandom( random() ); + QString numStr = QString::number( random() ); + + return "{" + numStr + "}"; } -#else +#elif defined(_OS_LINUX_) /* * linux got a /proc/sys/kernel/random/uuid file * it'll generate the uuids for us */ QString UidGen::uuid() { QFile file( "/proc/sys/kernel/random/uuid" ); if (!file.open(IO_ReadOnly ) ) return QString::null; QTextStream stream(&file); return "{" + stream.read().stripWhiteSpace() + "}"; } +#else +QString UidGen::uuid() +{ + uuid_t uuid; + ::uuid_generate( uuid ); + return QUUid( uuid ).toString(); +} #endif } QString SyncAuthentication::serverId() { Config cfg("Security"); cfg.setGroup("Sync"); QString r = cfg.readEntry("serverid"); if ( r.isEmpty() ) { UidGen gen; r = gen.uuid(); cfg.writeEntry("serverid", r ); } return r; } QString SyncAuthentication::ownerName() { QString vfilename = Global::applicationFileName("addressbook", "businesscard.vcf"); if (QFile::exists(vfilename)) { Contact c; c = Contact::readVCard( vfilename )[0]; return c.fullName(); } return ""; } QString SyncAuthentication::loginName() { struct passwd *pw; pw = getpwuid( geteuid() ); return QString::fromLocal8Bit( pw->pw_name ); } int SyncAuthentication::isAuthorized(QHostAddress peeraddress) { Config cfg("Security"); cfg.setGroup("Sync"); // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); uint auth_peer = cfg.readNumEntry("auth_peer", 0xc0a80100); // QHostAddress allowed; // allowed.setAddress(allowedstr); // uint auth_peer = allowed.ip4Addr(); uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits", 24); uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined ? 0xffffffff : (((1 << auth_peer_bits) - 1) << (32 - auth_peer_bits)); return (peeraddress.ip4Addr() & mask) == auth_peer; } bool SyncAuthentication::checkUser( const QString& user ) { if ( user.isEmpty() ) return FALSE; QString euser = loginName(); return user == euser; } bool SyncAuthentication::checkPassword( const QString& password ) { #ifdef ALLOW_UNIX_USER_FTP // First, check system password... diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index 5a9fada..6fca621 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp @@ -18,129 +18,133 @@ ..}^=.= = ; Public License for more details. ++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; -_. . . )=. = see the file COPYING. If not, write to the -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "menusettings.h" #include <qpe/config.h> #include <qpe/qlibrary.h> #include <qpe/qpeapplication.h> #include <qpe/menuappletinterface.h> #include <qpe/qcopenvelope_qws.h> #include <qdir.h> #include <qlistview.h> #include <qcheckbox.h> #include <qheader.h> #include <qlayout.h> #include <qlabel.h> #include <qwhatsthis.h> #include <stdlib.h> MenuSettings::MenuSettings ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { m_applets_changed = false; QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); lay-> addWidget ( l ); m_list = new QListView ( this ); m_list-> addColumn ( "foobar" ); m_list-> header ( )-> hide ( ); lay-> addWidget ( m_list ); m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); lay-> addWidget ( m_menutabs ); QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); init ( ); } void MenuSettings::init ( ) { Config cfg ( "StartMenu" ); cfg. setGroup ( "Applets" ); QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; +#ifdef Q_OS_MACX + QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); +#else QStringList list = QDir ( path, "lib*.so" ). entryList ( ); +#endif /* Q_OS_MACX */ for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { QString name; QPixmap icon; MenuAppletInterface *iface = 0; QLibrary *lib = new QLibrary ( path + "/" + *it ); lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); if ( iface ) { QString lang = getenv( "LANG" ); QTranslator *trans = new QTranslator ( qApp ); QString type = (*it). left ((*it). find (".")); QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; if ( trans-> load ( tfn )) qApp-> installTranslator ( trans ); else delete trans; name = iface-> name ( ); icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); iface-> release ( ); lib-> unload ( ); QCheckListItem *item; item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); if ( !icon. isNull ( )) item-> setPixmap ( 0, icon ); item-> setOn ( exclude. find ( *it ) == exclude. end ( )); m_applets [*it] = item; } else { delete lib; } } cfg. setGroup ( "Menu" ); m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); } void MenuSettings::appletChanged() { m_applets_changed = true; } void MenuSettings::accept ( ) { bool apps_changed = false; Config cfg ( "StartMenu" ); cfg. setGroup ( "Applets" ); if ( m_applets_changed ) { QStringList exclude; QMap <QString, QCheckListItem *>::Iterator it; for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { if ( !(*it)-> isOn ( )) exclude << it. key ( ); } cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); } cfg. writeEntry ( "SafeMode", false ); cfg. setGroup ( "Menu" ); if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { apps_changed = true; cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index b3e302a..d03ea49 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp @@ -14,143 +14,160 @@ + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General ..}^=.= = ; Public License for more details. ++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; -_. . . )=. = see the file COPYING. If not, write to the -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "taskbarsettings.h" #include <qpe/config.h> #include <qpe/qlibrary.h> #include <qpe/qpeapplication.h> #include <qpe/taskbarappletinterface.h> #include <qpe/qcopenvelope_qws.h> #include <qdir.h> #include <qlistview.h> #include <qcheckbox.h> #include <qheader.h> #include <qlayout.h> #include <qlabel.h> #include <qwhatsthis.h> #include <stdlib.h> TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { m_applets_changed = false; QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); lay-> addWidget ( l ); m_list = new QListView ( this ); m_list-> addColumn ( "foobar" ); m_list-> header ( )-> hide ( ); lay-> addWidget ( m_list ); QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); init ( ); } void TaskbarSettings::init ( ) { Config cfg ( "Taskbar" ); cfg. setGroup ( "Applets" ); QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; +#ifdef Q_OS_MACX + QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); +#else QStringList list = QDir ( path, "lib*.so" ). entryList ( ); +#endif /* Q_OS_MACX */ for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { QString name; QPixmap icon; TaskbarNamedAppletInterface *iface = 0; + qWarning("Load applet: %s", (*it).latin1() ); QLibrary *lib = new QLibrary ( path + "/" + *it ); lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); + qWarning("<1>"); if ( iface ) { + qWarning("<2>"); QString lang = getenv( "LANG" ); QTranslator *trans = new QTranslator ( qApp ); QString type = (*it). left ((*it). find (".")); QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; if ( trans-> load ( tfn )) qApp-> installTranslator ( trans ); else delete trans; name = iface-> name ( ); icon = iface-> icon ( ); iface-> release ( ); } + qWarning("<3>"); if ( !iface ) { + qWarning("<4>"); lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); if ( iface ) { + qWarning("<5>"); name = (*it). mid ( 3 ); + qWarning("Found applet: %s", name.latin1() ); +#ifdef Q_OS_MACX + int sep = name. find( ".dylib" ); +#else int sep = name. find( ".so" ); +#endif /* Q_OS_MACX */ if ( sep > 0 ) name. truncate ( sep ); sep = name. find ( "applet" ); if ( sep == (int) name.length ( ) - 6 ) name. truncate ( sep ); name[0] = name[0]. upper ( ); iface-> release ( ); } } + qWarning("<6>"); if ( iface ) { + qWarning("<7>"); QCheckListItem *item; item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); if ( !icon. isNull ( )) item-> setPixmap ( 0, icon ); item-> setOn ( exclude. find ( *it ) == exclude. end ( )); m_applets [*it] = item; } lib-> unload ( ); delete lib; } } void TaskbarSettings::appletChanged() { m_applets_changed = true; } void TaskbarSettings::accept ( ) { Config cfg ( "Taskbar" ); cfg. setGroup ( "Applets" ); if ( m_applets_changed ) { QStringList exclude; QMap <QString, QCheckListItem *>::Iterator it; for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { if ( !(*it)-> isOn ( )) exclude << it. key ( ); } cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); } cfg. writeEntry ( "SafeMode", false ); cfg. write ( ); if ( m_applets_changed ) { QCopEnvelope e ( "QPE/TaskBar", "reloadApplets()" ); m_applets_changed = false; } } diff --git a/development/keyview/keyview.pro b/development/keyview/keyview.pro index 70cc171..ca657bd 100644 --- a/development/keyview/keyview.pro +++ b/development/keyview/keyview.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -#CONFIG = qt warn_on debug -CONFIG = qt warn_on release +#CONFIG = qt plugin warn_on debug +CONFIG = qt plugin warn_on release HEADERS = keyview.h keyboardimpl.h SOURCES = keyview.cpp keyboardimpl.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include ../../launcher LIBS += -lqpe INTERFACES = TARGET = keyview DESTDIR = $(OPIEDIR)/plugins/inputmethods TRANSLATIONS = ../i18n/de/keyview.ts \ ../i18n/nl/keyview.ts \ ../i18n/da/keyview.ts \ ../i18n/xx/keyview.ts \ ../i18n/en/keyview.ts \ ../i18n/es/keyview.ts \ ../i18n/fr/keyview.ts \ ../i18n/hu/keyview.ts \ ../i18n/ja/keyview.ts \ ../i18n/ko/keyview.ts \ ../i18n/no/keyview.ts \ ../i18n/pl/keyview.ts \ ../i18n/pt/keyview.ts \ ../i18n/pt_BR/keyview.ts \ ../i18n/sl/keyview.ts \ ../i18n/zh_CN/keyview.ts \ ../i18n/zh_TW/keyview.ts include ( $(OPIEDIR)/include.pro ) diff --git a/development/macosx/README_MACOSX b/development/macosx/README_MACOSX new file mode 100644 index 0000000..e2ed15f --- a/dev/null +++ b/development/macosx/README_MACOSX @@ -0,0 +1,91 @@ +Information about porting Opie to MacOS-X (eilers) +================================================== + +Credits: +-------- + +Special thanks to xxxx for its patches for qt-X11 (2.3.2), QT/E (2.3.5) and qtopia (1.6.1). +Without them, I wouldn't be able to provide the port for OPIE to MacOS-X that fast.. + +Status: +------- +The basic system works quite well. But a lot of applications and plugins, +which are platform specific, need some work to be compileable. + +What is ready: + +libqpe +libopie1 +pim-applications (addressbook, todolist, datebook, today) +A lot of applications and plugins which are not platform specific. + +What will follow soon: + +libopie2 + +Remember: A lot of configuration-settings are not tested (as for instance +the quicklauncher) and might fail to compile. +If you want to avoid misconfigurations, you may want to start with +the config-file in this directory. Just copy "config_macosx" to $OPIEDIR/.config +to get a working configuration to start with. + +(The missing apps/plugins will be ported on demand.) + +How to compile Opie for MacOS-X: +------------------------------- + +Before compiling for MacOS-X, you need the following: + +1. X11-Server (Provided by Apple) +2. QT-2.3.2 for X11 +3. QT/E-2.3.7 +4. Patches for QT-2.3.2 for MacOSX +5. Patches for QT/E-2.3.7 for MacOSX + +Please follow the instructions by xxxx how to create a buildsystem +for your Mac. +What is different to the previous desciption: +You don't need Qtopia ! +It is recommended to use QT/E in version 2.3.7 instead of 2.3.5 as described. +The Patch for QT/E for Opie, including all other opie-patches is available in the +qt-directory ($OPIEDIR/qt) and is called "qte237-all-macosx.patch" + +If your buildsystem is working correctly, you should be able to build +opie. You have to enter "make menuconfig" and set +"Build Parameters"->"Target Machine"->"Mac OS X (DARWIN)" +activate the platform specific changes. + +You will see that a lot of applications and plugins/applets will not compile +successfully, due to the fact that they are not ported to this platform. +You may disable them to be able to compile the rest. + + +Information for Developers: +--------------------------- + +1. Platform specific code should be surrounded by +#ifdef Q_OS_MACX +MACOS-X CODE +#else +OTHER-CODE +#endif + +2. The Plugin-Handling by MacOS-X is different than it is by Linux. +On linux-systems, shared libraries are not different to dynamic loaded libraries +(aka plugins). They just are different whether they are loaded automatically +at startup or manually by any application. +On MacOS-X, the plugins are loaded by a special mechanism and must be in a special +binary format. Therefore you have to add the term "plugin" to the CONFIG-clause, as +for instance: + +TEMPLATE=lib +CONFIG += qt plugin release + +If you don't add "plugin" you will get a shared library which is not loadable +(Error-Code: NSObjectFileImageInappropriateFile (2))! + + + +For problems, help and flames, feel free to contact me at + +eilers.stefan@epost.de
\ No newline at end of file diff --git a/development/macosx/config_macosx b/development/macosx/config_macosx new file mode 100644 index 0000000..eb0792f --- a/dev/null +++ b/development/macosx/config_macosx @@ -0,0 +1,290 @@ +# +# Automatically generated make config: don't edit +# + +# +# Build Parameters +# +# CONFIG_TARGET_X86 is not set +CONFIG_TARGET_MACOSX=y +# CONFIG_TARGET_SHARP is not set +# CONFIG_TARGET_IPAQ is not set +# CONFIG_TARGET_RAMSES is not set +# CONFIG_TARGET_SIMPAD is not set +# CONFIG_TARGET_YOPY is not set +# CONFIG_OPTIMIZE is not set +CONFIG_DEBUG=y +CONFIG_QUICK_LAUNCH=y +# CONFIG_OPIE_NO_OVERRIDE_QT is not set +CONFIG_SPECFILE="qws/macx-generic-g++" +CONFIG_EXPERIMENTAL=y + +# +# Base +# +CONFIG_LIBQPE=y +# CONFIG_X11 is not set +CONFIG_LIBOPIE=y +# CONFIG_OPIE-LOGIN is not set +# CONFIG_OPIEALARM is not set +CONFIG_LAUNCHER=y +CONFIG_PRELOAD=y +CONFIG_LAUNCHER_CORE=y +CONFIG_QWS=y + +# +# +# + +# +# Applets +# +CONFIG_BATTERYAPPLET=y +# CONFIG_CARDMON is not set +CONFIG_CLIPBOARDAPPLET=y +CONFIG_CLOCKAPPLET=y +CONFIG_HOMEAPPLET=y +# CONFIG_IRDAAPPLET is not set +# CONFIG_LOGOUTAPPLET is not set +# CONFIG_OBEXAPPLET is not set +# CONFIG_OBEX is not set +# CONFIG_RESTARTAPPLET is not set +# CONFIG_ROTATEAPPLET is not set +# CONFIG_SCREENSHOTAPPLET is not set +# CONFIG_SUSPENDAPPLET is not set +# CONFIG_VMEMO is not set +# CONFIG_VOLUMEAPPLET is not set +# CONFIG_VTAPPLET is not set + +# +# Network applet needs a libqpe and libopie2 (core, ui, net) +# +CONFIG_NOTESAPPLET=y +# CONFIG_WIRELESSAPPLET is not set + +# +# Apps +# +# CONFIG_CALIBRATE is not set +# CONFIG_EMBEDDEDKONSOLE is not set +CONFIG_FILEBROWSER=y +CONFIG_HELPBROWSER=y +# CONFIG_OAPP is not set +CONFIG_OIPKG=y +CONFIG_QCOP=y +CONFIG_TEXTEDIT=y +# CONFIG_ADVANCEDFM is not set +# CONFIG_AQPKG is not set +CONFIG_CHECKBOOK=y +# CONFIG_ODICT is not set +# CONFIG_BARTENDER is not set +# CONFIG_OPIE-CONSOLE is not set +# CONFIG_OPIE-READER is not set +CONFIG_OPIE-SHEET=y +CONFIG_OPIE-WRITE=y +CONFIG_OXYGEN=y +CONFIG_SYSINFO=y +CONFIG_TABLEVIEWER=y +CONFIG_TINYKATE=y +CONFIG_LIBKATE=y +# CONFIG_ZSAFE is not set + +# +# Communications and Networking +# +# CONFIG_GSMTOOL is not set +# CONFIG_KEYPEBBLE is not set +# CONFIG_MOBILEMSG is not set +# CONFIG_MAIL is not set +# CONFIG_FTPLIB is not set +# CONFIG_MAILIT is not set +# CONFIG_OPIEIRC is not set +# CONFIG_OPIE-RDESKTOP is not set +# CONFIG_UBROWSER is not set + +# +# wellenreiter needs libqpe, libopie1 and libopie2 (core+net+ui) +# + +# +# Games +# +CONFIG_BACKGAMMON=y +CONFIG_BOUNCE=y +CONFIG_BUZZWORD=y +CONFIG_FIFTEEN=y +CONFIG_GO=y +CONFIG_KBILL=y +CONFIG_KCHECKERS=y +CONFIG_KPACMAN=y +CONFIG_MINDBREAKER=y +CONFIG_MINESWEEP=y +# CONFIG_WORDGAME is not set +CONFIG_PARASHOOT=y +CONFIG_QASTEROIDS=y +# CONFIG_SFCAVE is not set +# CONFIG_SFCAVE-SDL is not set +# CONFIG_SNAKE is not set +CONFIG_SOLITAIRE=y +# CONFIG_TETRIX is not set +# CONFIG_TICTAC is not set + +# +# Graphics and Multimedia +# +# CONFIG_FREETYPE is not set +CONFIG_DRAWPAD=y +# CONFIG_QPDF is not set +# CONFIG_OPIEPLAYER is not set + +# +# opie-camera needs a libqpe, libopie and libopie2core +# +# CONFIG_OPIEPLAYER2 is not set +# CONFIG_OPIEREC is not set +CONFIG_SHOWIMG=y + +# +# Input methods +# +# CONFIG_DASHER is not set +# CONFIG_DVORAK is not set +CONFIG_HANDWRITING=y + +# +# opie-handwriting-classicset automatically selected +# + +# +# opie-handwriting-graffitiset automatically selected +# +CONFIG_JUMPX=y +# CONFIG_KEYBOARD is not set +CONFIG_KJUMPX=y +# CONFIG_MULTIKEY is not set +CONFIG_PICKBOARD=y +CONFIG_UNIKEYBOARD=y + +# +# Pim +# +CONFIG_ADDRESSBOOK=y +CONFIG_DATEBOOK=y +CONFIG_OSEARCH=y +CONFIG_TODAY=y +CONFIG_TODO=y + +# +# Today Plugins +# +# CONFIG_TODAY_FORTUNE is not set +# CONFIG_TODAY_STOCKTICKER is not set +# CONFIG_TODAY_WEATHER is not set +CONFIG_TODAY_ADDRESSBOOK=y +CONFIG_TODAY_DATEBOOK=y +CONFIG_TODAY_MAIL=y +CONFIG_TODAY_TODOLIST=y + +# +# Settings +# +CONFIG_BUTTON-SETTINGS=y +CONFIG_CITYTIME=y +CONFIG_LAUNCHER-SETTINGS=y +CONFIG_LIGHT-AND-POWER=y +CONFIG_SECURITY=y +CONFIG_APPEARANCE2=y +CONFIG_BACKUP=y +CONFIG_LANGUAGE=y +CONFIG_MEDIUMMOUNT=y +CONFIG_NETSYSTEMTIME=y +# CONFIG_NETWORKSETUP is not set +# CONFIG_SOUND is not set +# CONFIG_SSHKEYS is not set +CONFIG_TABMANAGER=y +# CONFIG_USERMANAGER is not set + +# +# Theming +# + +# +# Decorations +# +CONFIG_DECO_FLAT=y +CONFIG_DECO_LIQUID=y +CONFIG_DECO_POLISHED=y + +# +# Styles +# +CONFIG_FLAT=y +CONFIG_FRESH=y +CONFIG_LIQUID=y +CONFIG_METAL=y +CONFIG_THEME=y + +# +# Tools +# +CONFIG_CALCULATOR=y +CONFIG_CLOCK=y +CONFIG_EUROCONV=y +# CONFIG_FORMATTER is not set +CONFIG_OPIE-SH=y +# CONFIG_REMOTE is not set + +# +# Development +# +# CONFIG_KEYVIEW is not set + +# +# Examples +# +# CONFIG_EXAMPLES is not set + +# +# +# + +# +# Experimental +# + +# +# libopie2 +# +# CONFIG_LIBOPIE2CORE is not set + +# +# libopie2db needs a libqpe and libopie2core +# + +# +# libopie2net needs a libqpe and libopie2core +# + +# +# libopie2pim needs a libqpe and libopie2core +# + +# +# libopie2ui needs a libqpe and libopie2core +# + +# +# libopie2mm needs a libqpe and libopie2core +# + +# +# +# + +# +# the examples need a libqpe, libopie2core, libopie2db, libopie2net, libopie2pim, libopie2ui and libopie2mm +# + +# +# SQL-Support needs libopie2db! +# diff --git a/include.pro b/include.pro index 70ed731..4bdcaa7 100644 --- a/include.pro +++ b/include.pro @@ -1,105 +1,115 @@ include ( $(OPIEDIR)/gen.pro ) # base opie install path -prefix = /opt/QtPalmtop +# prefix = /opt/QtPalmtop ??? Why here (eilers) ??? +prefix = $(OPIEDIR) contains( CONFIG, quick-app-lib ) { TEMPLATE = lib DESTDIR = $(OPIEDIR)/plugins/application DEFINES += OPIE_APP_INTERFACE !contains( TARGET, launcher ) { message( Linking $$TARGET to quicklauncher ) system( rm -f $$(OPIEDIR)/bin/$$TARGET ) system( ln -s quicklauncher $$(OPIEDIR)/bin/$$TARGET ) } } contains ( CONFIG, quick-app-bin ) { TEMPLATE = app DESTDIR = $(OPIEDIR)/bin DEFINES -= OPIE_APP_INTERFACE message( Touching plugins/application/lib$${TARGET}.so ) system( touch $$(OPIEDIR)/plugins/application/lib$${TARGET}.so ) } contains( TEMPLATE, lib ) { target.path = $$prefix/lib } !contains( TEMPLATE, lib ) { target.path = $$prefix/bin } INSTALLS += target # ipkg control files control.path = /CONTROL control.files = control postinst prerm postrm preinst conffiles INSTALLS += control # images, default is $$prefix/pics/$$TARGET pics.path = $$prefix/pics/$$TARGET pics.files = pics/* INSTALLS += pics # sounds, default path is $$prefix/sounds/$$TARGET sounds.path = $$prefix/sounds/$$TARGET sounds.files = sounds/* INSTALLS += sounds # init scripts, default path is /etc/init.d init.path = /etc/init.d init.files = init.d/* INSTALLS += init # data, default path is /usr/share/$$TARGET data.path = /usr/share/$$TARGET data.files = share/* INSTALLS += data etc.path = $$prefix/etc/ etc.files = etc/* INSTALLS += etc apps.path = $$prefix/apps/ apps.files = apps/* INSTALLS += apps # sounds, default path is $$prefix/sounds/$$TARGET sounds.path = $$prefix/sounds/$$TARGET sounds.files = sounds/* INSTALLS += sounds # anything in nonstandard paths root.path = / root.files = root/* INSTALLS += root # new targets opie-lupdate.target = opie-lupdate opie-lupdate.commands = opie-lupdate $(PRO) opie-lrelease.target = opie-lrelease opie-lrelease.commands = opie-lrelease $(PRO) lupdate.target = lupdate lupdate.commands = lupdate -noobsolete $(PRO) lrelease.target = lrelease lrelease.commands = lrelease $(PRO) # new message target to get all strings from the apps with and without tr messages.target = messages messages.commands = xgettext -C -n -ktr -kQT_TRANSLATE_NOOP $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-tr.po' && xgettext -C -n -a $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-allstrings.po' ipk.target = ipk ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk opie-lupdate opie-lrelease messages +CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) +contains( CONFTEST, y ){ +QMAKE_LFLAGS += -Wl +} +else { QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib +# I am not sure whether it is a good idea to change the way plugins is build +# on linux. Therefore I remove the "plugin" term, which is needed by MacOS-X +CONFIG -= plugin +} QMAKE_LIBDIR += $(OPIEDIR)/lib MOC_DIR=.moc/$(PLATFORM) OBJECTS_DIR=.obj/$(PLATFORM) #was here now at thetop #include ( $(OPIEDIR)/gen.pro ) diff --git a/inputmethods/dasher/dasher.pro b/inputmethods/dasher/dasher.pro index 7b6def9..b7669a4 100644 --- a/inputmethods/dasher/dasher.pro +++ b/inputmethods/dasher/dasher.pro @@ -1,57 +1,57 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = Alphabet.h \ DasherModel.h \ FrameRate.h \ AlphabetMap.h \ DasherNode.h \ LanguageModel.h \ AlphIO.h \ DasherScreen.h \ PPMLanguageModel.h \ Context.h \ DasherSettingsInterface.h \ QtDasherImpl.h \ CustomAlphabet.h \ DasherTypes.h \ QtDasherPlugin.h \ DashEdit.h \ DasherView.h \ QtDasherScreen.h \ DasherAppInterface.h \ DasherViewSquare.h \ SettingsStore.h \ DasherInterface.h \ DasherWidgetInterface.h SOURCES = Alphabet.cpp \ DasherModel.cpp \ LanguageModel.cpp \ AlphabetMap.cpp \ DasherNode.cpp \ PPMLanguageModel.cpp \ AlphIO.cpp \ DasherSettingsInterface.cpp \ SettingsStore.cpp \ CustomAlphabet.cpp \ DasherView.cpp \ DasherInterface.cpp \ DasherViewSquare.cpp \ QtDasherImpl.cc \ QtDasherPlugin.cc \ QtDasherScreen.cc TARGET = qdasher DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher LIBS += -lqpe QMAKE_LFLAGS += -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods VERSION = 1.0.0 SUBDIRS = DasherCore include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/dvorak/dvorak.pro b/inputmethods/dvorak/dvorak.pro index cd30aa2..67fe4e6 100644 --- a/inputmethods/dvorak/dvorak.pro +++ b/inputmethods/dvorak/dvorak.pro @@ -1,36 +1,36 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = dvorak.h \ dvorakimpl.h SOURCES = dvorak.cpp \ dvorakimpl.cpp TARGET = qdvorak DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard QMAKE_LFLAGS += -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods VERSION = 1.0.0 TRANSLATIONS = ../../i18n/de/libqdvorak.ts \ ../../i18n/nl/libqdvorak.ts \ ../../i18n/da/libqdvorak.ts \ ../../i18n/xx/libqdvorak.ts \ ../../i18n/en/libqdvorak.ts \ ../../i18n/es/libqdvorak.ts \ ../../i18n/fr/libqdvorak.ts \ ../../i18n/hu/libqdvorak.ts \ ../../i18n/ja/libqdvorak.ts \ ../../i18n/ko/libqdvorak.ts \ ../../i18n/no/libqdvorak.ts \ ../../i18n/pl/libqdvorak.ts \ ../../i18n/pt/libqdvorak.ts \ ../../i18n/pt_BR/libqdvorak.ts \ ../../i18n/sl/libqdvorak.ts \ ../../i18n/zh_CN/libqdvorak.ts \ ../../i18n/zh_TW/libqdvorak.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/handwriting/handwriting.pro b/inputmethods/handwriting/handwriting.pro index 4ec5932..7a22208 100644 --- a/inputmethods/handwriting/handwriting.pro +++ b/inputmethods/handwriting/handwriting.pro @@ -1,54 +1,54 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = qimpenchar.h \ qimpenprofile.h \ qimpencombining.h \ qimpenhelp.h \ qimpeninput.h \ qimpenmatch.h \ qimpensetup.h \ qimpenstroke.h \ qimpenwidget.h \ qimpenwordpick.h \ handwritingimpl.h SOURCES = qimpenchar.cpp \ qimpenprofile.cpp \ qimpencombining.cpp \ qimpenhelp.cpp \ qimpeninput.cpp \ qimpenmatch.cpp \ qimpensetup.cpp \ qimpenstroke.cpp \ qimpenwidget.cpp \ qimpenwordpick.cpp \ handwritingimpl.cpp INTERFACES = qimpenprefbase.ui TARGET = qhandwriting DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../i18n/de/libqhandwriting.ts \ ../../i18n/nl/libqhandwriting.ts \ ../../i18n/da/libqhandwriting.ts \ ../../i18n/xx/libqhandwriting.ts \ ../../i18n/en/libqhandwriting.ts \ ../../i18n/es/libqhandwriting.ts \ ../../i18n/fr/libqhandwriting.ts \ ../../i18n/hu/libqhandwriting.ts \ ../../i18n/ja/libqhandwriting.ts \ ../../i18n/ko/libqhandwriting.ts \ ../../i18n/no/libqhandwriting.ts \ ../../i18n/pl/libqhandwriting.ts \ ../../i18n/pt/libqhandwriting.ts \ ../../i18n/pt_BR/libqhandwriting.ts \ ../../i18n/sl/libqhandwriting.ts \ ../../i18n/zh_CN/libqhandwriting.ts \ ../../i18n/zh_TW/libqhandwriting.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/jumpx/jumpx.pro b/inputmethods/jumpx/jumpx.pro index eff4563..a75ffd5 100644 --- a/inputmethods/jumpx/jumpx.pro +++ b/inputmethods/jumpx/jumpx.pro @@ -1,35 +1,35 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ keyboardimpl.h SOURCES = keyboard.cpp \ keyboardimpl.cpp TARGET = qjumpx DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../i18n/de/libqjumpx.ts \ ../../i18n/nl/libqjumpx.ts \ ../../i18n/da/libqjumpx.ts \ ../../i18n/xx/libqjumpx.ts \ ../../i18n/en/libqjumpx.ts \ ../../i18n/es/libqjumpx.ts \ ../../i18n/fr/libqjumpx.ts \ ../../i18n/hu/libqjumpx.ts \ ../../i18n/ja/libqjumpx.ts \ ../../i18n/ko/libqjumpx.ts \ ../../i18n/no/libqjumpx.ts \ ../../i18n/pl/libqjumpx.ts \ ../../i18n/pt/libqjumpx.ts \ ../../i18n/pt_BR/libqjumpx.ts \ ../../i18n/sl/libqjumpx.ts \ ../../i18n/zh_CN/libqjumpx.ts \ ../../i18n/zh_TW/libqjumpx.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/keyboard/keyboard.pro b/inputmethods/keyboard/keyboard.pro index 5ca97f1..56e35b9 100644 --- a/inputmethods/keyboard/keyboard.pro +++ b/inputmethods/keyboard/keyboard.pro @@ -1,36 +1,36 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ keyboardimpl.h SOURCES = keyboard.cpp \ keyboardimpl.cpp TARGET = qkeyboard DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard QMAKE_LFLAGS += -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods VERSION = 1.0.0 TRANSLATIONS = ../../i18n/de/libqkeyboard.ts \ ../../i18n/nl/libqkeyboard.ts \ ../../i18n/da/libqkeyboard.ts \ ../../i18n/xx/libqkeyboard.ts \ ../../i18n/en/libqkeyboard.ts \ ../../i18n/es/libqkeyboard.ts \ ../../i18n/fr/libqkeyboard.ts \ ../../i18n/hu/libqkeyboard.ts \ ../../i18n/ja/libqkeyboard.ts \ ../../i18n/ko/libqkeyboard.ts \ ../../i18n/no/libqkeyboard.ts \ ../../i18n/pl/libqkeyboard.ts \ ../../i18n/pt/libqkeyboard.ts \ ../../i18n/pt_BR/libqkeyboard.ts \ ../../i18n/sl/libqkeyboard.ts \ ../../i18n/zh_CN/libqkeyboard.ts \ ../../i18n/zh_TW/libqkeyboard.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/kjumpx/kjumpx.pro b/inputmethods/kjumpx/kjumpx.pro index 0624583..2dd6ddf 100644 --- a/inputmethods/kjumpx/kjumpx.pro +++ b/inputmethods/kjumpx/kjumpx.pro @@ -1,35 +1,35 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ keyboardimpl.h SOURCES = keyboard.cpp \ keyboardimpl.cpp TARGET = qkjumpx DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../i18n/de/libqkjumpx.ts \ ../../i18n/nl/libqkjumpx.ts \ ../../i18n/da/libqkjumpx.ts \ ../../i18n/xx/libqkjumpx.ts \ ../../i18n/en/libqkjumpx.ts \ ../../i18n/es/libqkjumpx.ts \ ../../i18n/fr/libqkjumpx.ts \ ../../i18n/hu/libqkjumpx.ts \ ../../i18n/ja/libqkjumpx.ts \ ../../i18n/ko/libqkjumpx.ts \ ../../i18n/no/libqkjumpx.ts \ ../../i18n/pl/libqkjumpx.ts \ ../../i18n/pt/libqkjumpx.ts \ ../../i18n/pt_BR/libqkjumpx.ts \ ../../i18n/sl/libqkjumpx.ts \ ../../i18n/zh_CN/libqkjumpx.ts \ ../../i18n/zh_TW/libqkjumpx.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/multikey/multikey.pro b/inputmethods/multikey/multikey.pro index 424c000..82dcb94 100644 --- a/inputmethods/multikey/multikey.pro +++ b/inputmethods/multikey/multikey.pro @@ -1,36 +1,36 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ configdlg.h \ keyboardimpl.h SOURCES = keyboard.cpp \ configdlg.cpp \ keyboardimpl.cpp TARGET = qmultikey DESTDIR = $(OPIEDIR)/plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard QMAKE_LFLAGS += -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods VERSION = 1.0.0 TRANSLATIONS = ../../i18n/pt_BR/libqmultikey.ts \ ../../i18n/nl/libqmultikey.ts \ ../../i18n/de/libqmultikey.ts \ ../../i18n/xx/libqmultikey.ts \ ../../i18n/en/libqmultikey.ts \ ../../i18n/hu/libqmultikey.ts \ ../../i18n/sl/libqmultikey.ts \ ../../i18n/ja/libqmultikey.ts \ ../../i18n/ko/libqmultikey.ts \ ../../i18n/pl/libqmultikey.ts \ ../../i18n/no/libqmultikey.ts \ ../../i18n/zh_CN/libqmultikey.ts \ ../../i18n/zh_TW/libqmultikey.ts \ ../../i18n/fr/libqmultikey.ts \ ../../i18n/da/libqmultikey.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/pickboard/pickboard.pro b/inputmethods/pickboard/pickboard.pro index 53ff8f0..b86c069 100644 --- a/inputmethods/pickboard/pickboard.pro +++ b/inputmethods/pickboard/pickboard.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = pickboard.h pickboardcfg.h pickboardimpl.h pickboardpicks.h SOURCES = pickboard.cpp pickboardcfg.cpp pickboardimpl.cpp pickboardpicks.cpp TARGET = qpickboard DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../i18n/de/libqpickboard.ts \ ../../i18n/nl/libqpickboard.ts \ ../../i18n/da/libqpickboard.ts \ ../../i18n/xx/libqpickboard.ts \ ../../i18n/en/libqpickboard.ts \ ../../i18n/es/libqpickboard.ts \ ../../i18n/fr/libqpickboard.ts \ ../../i18n/hu/libqpickboard.ts \ ../../i18n/ja/libqpickboard.ts \ ../../i18n/ko/libqpickboard.ts \ ../../i18n/no/libqpickboard.ts \ ../../i18n/pl/libqpickboard.ts \ ../../i18n/pt/libqpickboard.ts \ ../../i18n/pt_BR/libqpickboard.ts \ ../../i18n/sl/libqpickboard.ts \ ../../i18n/zh_CN/libqpickboard.ts \ ../../i18n/zh_TW/libqpickboard.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/unikeyboard/unikeyboard.pro b/inputmethods/unikeyboard/unikeyboard.pro index 0732dc8..678f575 100644 --- a/inputmethods/unikeyboard/unikeyboard.pro +++ b/inputmethods/unikeyboard/unikeyboard.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = unikeyboard.h unikeyboardimpl.h SOURCES = unikeyboard.cpp unikeyboardimpl.cpp TARGET = qunikeyboard DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include ../../launcher LIBS += -lqpe VERSION = 1.0.0 TRANSLATIONS = ../../i18n/de/libqunikeyboard.ts \ ../../i18n/nl/libqunikeyboard.ts \ ../../i18n/da/libqunikeyboard.ts \ ../../i18n/xx/libqunikeyboard.ts \ ../../i18n/en/libqunikeyboard.ts \ ../../i18n/es/libqunikeyboard.ts \ ../../i18n/fr/libqunikeyboard.ts \ ../../i18n/hu/libqunikeyboard.ts \ ../../i18n/ja/libqunikeyboard.ts \ ../../i18n/ko/libqunikeyboard.ts \ ../../i18n/no/libqunikeyboard.ts \ ../../i18n/pl/libqunikeyboard.ts \ ../../i18n/pt/libqunikeyboard.ts \ ../../i18n/pt_BR/libqunikeyboard.ts \ ../../i18n/sl/libqunikeyboard.ts \ ../../i18n/zh_CN/libqunikeyboard.ts \ ../../i18n/zh_TW/libqunikeyboard.ts include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/libopie/libopie.pro b/libopie/libopie.pro index 0398775..bf6b78f 100644 --- a/libopie/libopie.pro +++ b/libopie/libopie.pro @@ -32,105 +32,101 @@ HEADERS = ofontmenu.h \ pim/orecur.h \ pim/opimstate.h \ pim/opimxrefpartner.h \ pim/opimxref.h \ pim/opimxrefmanager.h \ pim/opimmaintainer.h \ pim/opimnotify.h \ pim/opimnotifymanager.h \ pim/opimmainwindow.h \ pim/opimresolver.h \ pim/oevent.h \ pim/otimezone.h \ pim/odatebookaccess.h \ pim/odatebookaccessbackend.h \ pim/odatebookaccessbackend_xml.h \ orecurrancewidget.h \ oticker.h owait.h SOURCES = ofontmenu.cc \ ocolorbutton.cpp \ sharp_compat.cpp \ xmltree.cc \ ofiledialog.cc ofileselector.cpp \ ocheckitem.cpp \ colordialog.cpp \ colorpopupmenu.cpp oclickablelabel.cpp \ oprocctrl.cpp oprocess.cpp \ odevice.cpp odevicebutton.cpp otimepicker.cpp \ otabwidget.cpp otabbar.cpp \ ofontselector.cpp \ pim/otodo.cpp \ pim/opimrecord.cpp \ pim/otodoaccess.cpp \ pim/otodoaccessbackend.cpp \ pim/otodoaccessxml.cpp \ pim/oconversion.cpp \ pim/ocontact.cpp \ pim/ocontactfields.cpp \ pim/ocontactaccess.cpp \ pim/ocontactaccessbackend_vcard.cpp \ pim/ocontactaccessbackend_xml.cpp \ pim/otodoaccessvcal.cpp \ pim/orecur.cpp \ pim/opimstate.cpp \ pim/opimxrefpartner.cpp \ pim/opimxref.cpp \ pim/opimxrefmanager.cpp \ pim/opimmaintainer.cpp \ pim/opimnotify.cpp \ pim/opimnotifymanager.cpp \ pim/opimmainwindow.cpp \ pim/opimresolver.cpp \ pim/oevent.cpp \ pim/otimezone.cpp \ pim/odatebookaccess.cpp \ pim/odatebookaccessbackend.cpp \ pim/odatebookaccessbackend_xml.cpp \ orecurrancewidget.cpp \ oticker.cpp owait.cpp TARGET = opie INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/lib$(PROJMAK) -# The following is just for my Notebook ! -# It should never be committed !! (eilers) -# QMAKE_CXXFLAGS += -DQT_NO_SOUND - LIBS += -lqpe # Add SQL-Support if selected by config (eilers) CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND ) contains( CONFTEST, y ){ DEFINES += __USE_SQL LIBS += -lopiedb2 -lsqlite HEADERS += pim/otodoaccesssql.h pim/ocontactaccessbackend_sql.h SOURCES += pim/otodoaccesssql.cpp pim/ocontactaccessbackend_sql.cpp } INTERFACES = otimepickerbase.ui orecurrancebase.ui TARGET = opie TRANSLATIONS = ../i18n/de/libopie.ts \ ../i18n/nl/libopie.ts \ ../i18n/xx/libopie.ts \ ../i18n/en/libopie.ts \ ../i18n/es/libopie.ts \ ../i18n/fr/libopie.ts \ ../i18n/hu/libopie.ts \ ../i18n/ja/libopie.ts \ ../i18n/ko/libopie.ts \ ../i18n/no/libopie.ts \ ../i18n/pl/libopie.ts \ ../i18n/pt/libopie.ts \ ../i18n/pt_BR/libopie.ts \ ../i18n/sl/libopie.ts \ ../i18n/zh_CN/libopie.ts \ ../i18n/zh_TW/libopie.ts \ ../i18n/da/libopie.ts include ( big-screen/big-screen.pro ) include ( $(OPIEDIR)/include.pro ) diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 3edf8e7..fef623a 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -1,90 +1,92 @@ /* This file is part of the OPIE libraries Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <signal.h> #include <sys/time.h> +#ifndef QT_NO_SOUND #include <linux/soundcard.h> +#endif #include <math.h> #include <qapplication.h> #include <qfile.h> #include <qtextstream.h> #include <qpe/sound.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include "odevice.h" #include <qwindowsystem_qws.h> #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif // _IO and friends are only defined in kernel headers ... #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) #define OD_IO(type,number) OD_IOC(0,type,number,0) #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) using namespace Opie; class ODeviceData { public: QString m_vendorstr; OVendor m_vendor; QString m_modelstr; OModel m_model; QString m_systemstr; OSystem m_system; QString m_sysverstr; Transformation m_rotation; ODirection m_direction; QValueList <ODeviceButton> *m_buttons; uint m_holdtime; QStrList *m_cpu_frequencies; }; class iPAQ : public ODevice, public QWSServer::KeyboardFilter { protected: virtual void init ( ); virtual void initButtons ( ); public: virtual bool setSoftSuspend ( bool soft ); virtual bool setDisplayBrightness ( int b ); virtual int displayBrightnessResolution ( ) const; virtual void alarmSound ( ); diff --git a/library/filemanager.cpp b/library/filemanager.cpp index cc657fa..91986a0 100644 --- a/library/filemanager.cpp +++ b/library/filemanager.cpp @@ -1,98 +1,107 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "filemanager.h" #include "applnk.h" #include <qdir.h> #include <qfile.h> #include <qfileinfo.h> #include <qtextstream.h> #include <qtextcodec.h> #include <errno.h> #include <stdlib.h> #include <unistd.h> #include <sys/stat.h> #include <dirent.h> -#include <sys/sendfile.h> +#ifdef Q_OS_MACX +// MacOS X does not have sendfile.. :( +// But maybe in the future.. !? +# ifdef SENDFILE +# include <sys/types.h> +# include <sys/socket.h> +# endif +#else +# include <sys/sendfile.h> +#endif /* Q_OS_MACX */ #include <fcntl.h> /*! \class FileManager \brief The FileManager class assists with AppLnk input/output. */ /*! Constructs a FileManager. */ FileManager::FileManager() { } /*! Destroys a FileManager. */ FileManager::~FileManager() { } /*! Saves \a data as the document specified by \a f. Returns whether the operation succeeded. */ bool FileManager::saveFile( const DocLnk &f, const QByteArray &data ) { QString fn = f.file() + ".new"; ensurePathExists( fn ); QFile fl( fn ); if ( !fl.open( IO_WriteOnly|IO_Raw ) ) { qWarning("open failed"); return FALSE; } int total_written = fl.writeBlock( data ); fl.close(); if ( total_written != int(data.size()) || !f.writeLink() ) { QFile::remove( fn ); return FALSE; } qDebug("total written %d out of %d", total_written, data.size()); // else rename the file... if ( !renameFile( fn.latin1(), f.file().latin1() ) ) { qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), f.file().latin1(), errno ); // remove the file... } return TRUE; } /*! Saves \a text as the document specified by \a f. The text is saved in UTF8 format. Returns whether the operation succeeded. */ bool FileManager::saveFile( const DocLnk &f, const QString &text ) { QString fn = f.file() + ".new"; ensurePathExists( fn ); QFile fl( fn ); @@ -155,161 +164,195 @@ bool FileManager::loadFile( const DocLnk &f, QByteArray &ba ) QString fn = f.file(); QFile fl( fn ); if ( !fl.open( IO_ReadOnly ) ) return FALSE; ba.resize( fl.size() ); if ( fl.size() > 0 ) fl.readBlock( ba.data(), fl.size() ); fl.close(); return TRUE; } /*! Copies the document specified by \a src to the document specified by \a dest. Returns whether the operation succeeded. */ bool FileManager::copyFile( const AppLnk &src, const AppLnk &dest ) { QFile sf( src.file() ); if ( !sf.open( IO_ReadOnly ) ) return FALSE; QString fn = dest.file() + ".new"; ensurePathExists( fn ); QFile df( fn ); if ( !df.open( IO_WriteOnly|IO_Raw ) ) return FALSE; const int bufsize = 16384; char buffer[bufsize]; bool ok = TRUE; int bytesRead = 0; while ( ok && !sf.atEnd() ) { bytesRead = sf.readBlock( buffer, bufsize ); if ( bytesRead < 0 ) ok = FALSE; while ( ok && bytesRead > 0 ) { int bytesWritten = df.writeBlock( buffer, bytesRead ); if ( bytesWritten < 0 ) ok = FALSE; else bytesRead -= bytesWritten; } } if ( ok ) ok = dest.writeLink(); if ( ok ) { // okay now rename the file... if ( !renameFile( fn.latin1(), dest.file().latin1() ) ) { qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), dest.file().latin1(), errno ); // remove the tmp file, otherwise, it will just lay around... QFile::remove( fn.latin1() ); } } else { QFile::remove( fn.latin1() ); } return ok; } + + bool FileManager::copyFile( const QString & src, const QString & dest ) { bool success = true; struct stat status; int read_fd=0; int write_fd=0; struct stat stat_buf; off_t offset = 0; QFile srcFile(src); QFile destFile(dest); if(!srcFile.open( IO_ReadOnly|IO_Raw)) { return success = false; } read_fd = srcFile.handle(); if(read_fd != -1) { fstat (read_fd, &stat_buf); if( !destFile.open( IO_WriteOnly|IO_Raw ) ) return success = false; write_fd = destFile.handle(); if(write_fd != -1) { int err=0; QString msg; - err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size); - if( err == -1) { - switch(err) { - case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. "; - case EINVAL: msg = "Descriptor is not valid or locked. "; - case ENOMEM: msg = "Insufficient memory to read from in_fd."; - case EIO: msg = "Unspecified error while reading from in_fd."; - }; - success = false; - } - } else { +#ifdef Q_OS_MACX +#ifdef SENDMAIL + /* FreeBSD does support a different kind of + * sendfile. (eilers) + * I took this from Very Secure FTPd + * Licence: GPL + * Author: Chris Evans + * sysdeputil.c + */ + /* XXX - start_pos will truncate on 32-bit machines - can we + * say "start from current pos"? + */ + off_t written = 0; + int retval = 0; + retval = sendfile(read_fd, write_fd, offset, stat_buf.st_size, NULL, + &written, 0); + /* Translate to Linux-like retval */ + if (written > 0) + { + err = (int) written; + } +#else /* SENDMAIL */ + err == -1; + msg = "FAILURE: Using unsupported function \"sendfile()\" Need Workaround !!"; + success = false; +# warning "Need workaround for sendfile!!(eilers)" +#endif /* SENDMAIL */ + +#else + err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size); + if( err == -1) { + switch(err) { + case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. "; + case EINVAL: msg = "Descriptor is not valid or locked. "; + case ENOMEM: msg = "Insufficient memory to read from in_fd."; + case EIO: msg = "Unspecified error while reading from in_fd."; + }; + success = false; + } +#endif /* Q_OS_MACX */ + if( !success ) + qWarning( msg ); + } else { qWarning("open write failed %s, %s",src.latin1(), dest.latin1()); success = false; } } else { qWarning("open read failed %s, %s",src.latin1(), dest.latin1()); success = false; } srcFile.close(); destFile.close(); // Set file permissions if( stat( (const char *) src, &status ) == 0 ) { chmod( (const char *) dest, status.st_mode ); } return success; } bool FileManager::renameFile( const QString & src, const QString & dest ) { if(copyFile( src, dest )) { if(QFile::remove(src) ) { return true; } } return false; } /*! Opens the document specified by \a f as a readable QIODevice. The caller must delete the return value. Returns 0 if the operation fails. */ QIODevice* FileManager::openFile( const DocLnk& f ) { QString fn = f.file(); QFile* fl = new QFile( fn ); if ( !fl->open( IO_ReadOnly ) ) { delete fl; fl = 0; } return fl; } /*! Opens the document specified by \a f as a writable QIODevice. The caller must delete the return value. Returns 0 if the operation fails. */ QIODevice* FileManager::saveFile( const DocLnk& f ) { QString fn = f.file(); ensurePathExists( fn ); QFile* fl = new QFile( fn ); if ( fl->open( IO_WriteOnly ) ) { f.writeLink(); } else { delete fl; fl = 0; } return fl; } diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp index c7a5211..2ad8e95 100644 --- a/library/fontdatabase.cpp +++ b/library/fontdatabase.cpp @@ -109,129 +109,133 @@ QStringList FontDatabase::families() const } } QDir dir(fontDir(),"*.qpf"); for (int i=0; i<(int)dir.count(); i++) { QString familyname = fontFamily(dir[i]); if ( !familyDict.find( familyname ) ) { familyDict.insert( familyname, (void *)1 ); list.append( familyname ); } } return list; #endif #endif } #ifdef QT_NO_FONTDATABASE /*! Returns a list of standard fontsizes. */ QValueList<int> FontDatabase::standardSizes() { static int s[]={ 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72, 0 }; static bool first = TRUE; static QValueList<int> sList; if ( first ) { first = FALSE; int i = 0; while( s[i] ) sList.append( s[i++] ); } return sList; } #endif /*! Load any font renderer plugins that are available and make the fonts that the plugins can read available. */ void FontDatabase::loadRenderers() { #ifndef QWS return; #else #ifndef QT_NO_COMPONENT if ( !factoryList ) factoryList = new QValueList<FontFactory>; QValueList<FontFactory>::Iterator mit; for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) { qt_fontmanager->factories.setAutoDelete( false ); qt_fontmanager->factories.removeRef( (*mit).factory ); qt_fontmanager->factories.setAutoDelete( true ); (*mit).interface->release(); (*mit).library->unload(); delete (*mit).library; } factoryList->clear(); QString path = QPEApplication::qpeDir() + "/plugins/fontfactories"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif if ( !dir.exists()) return; QStringList list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { FontFactoryInterface *iface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) { FontFactory factory; factory.library = lib; factory.interface = iface; factory.factory = factory.interface->fontFactory(); factoryList->append( factory ); qt_fontmanager->factories.append( factory.factory ); readFonts( factory.factory ); } else { delete lib; } } #endif #endif } /*! \internal */ void FontDatabase::readFonts( QFontFactory *factory ) { #ifndef QWS return; #else // Load in font definition file QString fn = fontDir() + "fontdir"; FILE* fontdef=fopen(fn.local8Bit(),"r"); if(!fontdef) { QCString temp=fn.local8Bit(); qWarning("Cannot find font definition file %s - is $QTDIR set correctly?", temp.data()); return; } char buf[200]=""; char name[200]=""; char render[200]=""; char file[200]=""; char flags[200]=""; char isitalic[10]=""; fgets(buf,200,fontdef); while(!feof(fontdef)) { if ( buf[0] != '#' ) { int weight=50; int size=0; flags[0]=0; sscanf(buf,"%s %s %s %s %d %d %s",name,file,render,isitalic,&weight,&size,flags); QString filename; if ( file[0] != '/' ) filename = fontDir(); filename += file; if ( QFile::exists(filename) ) { if( factory->name() == render ) { QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y', weight,size,flags,filename); qt_fontmanager->diskfonts.append(qdf); diff --git a/library/global.cpp b/library/global.cpp index 90954fe..05d23ac 100644 --- a/library/global.cpp +++ b/library/global.cpp @@ -543,129 +543,133 @@ void Global::terminate( const AppLnk* app ) } #endif } /*! Low-level function to run command \a c. \warning Do not use this function. Use execute instead. \sa execute() */ void Global::invoke(const QString &c) { // Convert the command line in to a list of arguments QStringList list = QStringList::split(QRegExp(" *"),c); #if !defined(QT_NO_COP) QString ap=list[0]; // see if the application is already running // XXX should lock file /tmp/qcop-msg-ap if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) { // If the channel is already register, the app is already running, so show it. { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } //QCopEnvelope e("QPE/System", "notBusy(QString)" ); //e << ap; return; } // XXX should unlock file /tmp/qcop-msg-ap //see if it is being started if ( StartingAppList::isStarting( ap ) ) { // FIXME take it out for now, since it leads to a much to short showing of wait if // some entry is clicked. // Real cause is that ::execute is called twice for document tab. But it would need some larger changes // to fix that, and with future syncs with qtopia 1.6 it will change anyway big time since somebody there // had the idea that an apploader belongs to the launcher ... //QCopEnvelope e("QPE/System", "notBusy(QString)" ); //e << ap; return; } #endif #ifdef QT_NO_QWS_MULTIPROCESS QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 ); #else QStrList slist; unsigned int j; for ( j = 0; j < list.count(); j++ ) slist.append( list[j].utf8() ); const char **args = new (const char *)[slist.count() + 1]; for ( j = 0; j < slist.count(); j++ ) args[j] = slist.at(j); args[j] = NULL; #if !defined(QT_NO_COP) // an attempt to show a wait... // more logic should be used, but this will be fine for the moment... QCopEnvelope ( "QPE/System", "busy()" ); #endif #ifdef HAVE_QUICKEXEC +#ifdef Q_OS_MACX + QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".dylib"; +#else QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; +#endif qDebug("libfile = %s", libexe.latin1() ); if ( QFile::exists( libexe ) ) { qDebug("calling quickexec %s", libexe.latin1() ); quickexecv( libexe.utf8().data(), (const char **)args ); } else #endif { bool success = false; int pfd [2]; if ( ::pipe ( pfd ) < 0 ) pfd [0] = pfd [1] = -1; pid_t pid = ::fork ( ); if ( pid == 0 ) { // child for ( int fd = 3; fd < 100; fd++ ) { if ( fd != pfd [1] ) ::close ( fd ); } ::setpgid ( ::getpid ( ), ::getppid ( )); // Closing of fd[1] indicates that the execvp succeeded! if ( pfd [1] >= 0 ) ::fcntl ( pfd [1], F_SETFD, FD_CLOEXEC ); // Try bindir first, so that foo/bar works too ::execv ( qpeDir ( ) + "/bin/" + args [0], (char * const *) args ); ::execvp ( args [0], (char * const *) args ); char resultByte = 1; if ( pfd [1] >= 0 ) ::write ( pfd [1], &resultByte, 1 ); ::_exit ( -1 ); } else if ( pid > 0 ) { success = true; if ( pfd [1] >= 0 ) ::close ( pfd [1] ); if ( pfd [0] >= 0 ) { while ( true ) { char resultByte; int n = ::read ( pfd [0], &resultByte, 1 ); if ( n == 1 ) { success = false; break; } if (( n == -1 ) && (( errno == ECHILD ) || ( errno == EINTR ))) continue; break; // success } ::close ( pfd [0] ); } } if ( success ) StartingAppList::add( list[0] ); else QMessageBox::warning( 0, "Error", "Could not start the application " + c, "Ok", 0, 0, 0, 1 ); } #endif //QT_NO_QWS_MULTIPROCESS } diff --git a/library/library.pro b/library/library.pro index ab1f451..5acfc0c 100644 --- a/library/library.pro +++ b/library/library.pro @@ -63,95 +63,95 @@ HEADERS = calendar.h \ SOURCES = calendar.cpp \ global.cpp \ xmlreader.cpp \ mimetype.cpp \ menubutton.cpp \ network.cpp \ networkinterface.cpp \ filemanager.cpp \ fontmanager.cpp \ qdawg.cpp \ datebookmonth.cpp \ fileselector.cpp \ imageedit.cpp \ resource.cpp \ qpedecoration_qws.cpp \ qcopenvelope_qws.cpp \ qpeapplication.cpp \ qpestyle.cpp \ qpedialog.cpp \ lightstyle.cpp \ config.cpp \ applnk.cpp \ sound.cpp \ tzselect.cpp \ qmath.c \ datebookdb.cpp \ alarmserver.cpp \ password.cpp \ process.cpp \ process_unix.cpp \ timestring.cpp \ fontdatabase.cpp \ power.cpp \ storage.cpp \ qpemessagebox.cpp \ backend/timeconversion.cpp \ qpedebug.cpp \ qpemenubar.cpp \ qpetoolbar.cpp \ backend/categories.cpp \ backend/stringutil.cpp \ backend/palmtoprecord.cpp \ backend/task.cpp \ backend/event.cpp \ backend/contact.cpp \ categorymenu.cpp \ categoryedit_p.cpp \ categoryselect.cpp \ categorywidget.cpp \ ir.cpp \ backend/vcc_yacc.cpp \ backend/vobject.cpp \ findwidget_p.cpp \ finddialog.cpp \ lnkproperties.cpp \ qt_override.cpp # Qt 3 compatibility HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp INCLUDEPATH += $(OPIEDIR)/include backend -LIBS += -ldl -lcrypt -lm +# LIBS += -ldl -lcrypt -lm INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui TARGET = qpe DESTDIR = $(OPIEDIR)/lib$(PROJMAK) VERSION = 1.5.0.1 TRANSLATIONS = ../i18n/de/libqpe.ts \ ../i18n/nl/libqpe.ts \ ../i18n/xx/libqpe.ts \ ../i18n/en/libqpe.ts \ ../i18n/es/libqpe.ts \ ../i18n/fr/libqpe.ts \ ../i18n/hu/libqpe.ts \ ../i18n/ja/libqpe.ts \ ../i18n/ko/libqpe.ts \ ../i18n/no/libqpe.ts \ ../i18n/pl/libqpe.ts \ ../i18n/pt/libqpe.ts \ ../i18n/pt_BR/libqpe.ts \ ../i18n/sl/libqpe.ts \ ../i18n/zh_CN/libqpe.ts \ ../i18n/it/libqpe.ts \ ../i18n/zh_TW/libqpe.ts \ ../i18n/da/libqpe.ts include ( $(OPIEDIR)/include.pro ) contains( CONFIG, no-override ){ DEFINES += OPIE_NO_OVERRIDE_QT } diff --git a/library/network.cpp b/library/network.cpp index 3568809..991e11a 100644 --- a/library/network.cpp +++ b/library/network.cpp @@ -357,88 +357,92 @@ QString Network::serviceType(const QString& service) \internal */ bool Network::serviceNeedsPassword(const QString& service) { Config cfg(service,Config::File); cfg.setGroup("Info"); QString type = cfg.readEntry("Type"); NetworkInterface* plugin = Network::loadPlugin(type); cfg.setGroup("Properties"); return plugin ? plugin->needPassword(cfg) : FALSE; } /*! \internal */ bool Network::networkOnline() { return ns && ns->networkOnline(); } /*! \internal */ void Network::createServer(QObject* parent) { ns = new NetworkServer(parent); } /*! \internal */ int Network::addStateWidgets(QWidget* parent) { int n=0; QStringList l = Network::choices(); QVBoxLayout* vb = new QVBoxLayout(parent); for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { Config cfg(*it,Config::File); cfg.setGroup("Info"); QString type = cfg.readEntry("Type"); NetworkInterface* plugin = Network::loadPlugin(type); cfg.setGroup("Properties"); if ( plugin ) { QWidget* w; if ( (w=plugin->addStateWidget(parent,cfg)) ) { n++; vb->addWidget(w); } } } return n; } static QDict<NetworkInterface> *ifaces; /*! \internal */ NetworkInterface* Network::loadPlugin(const QString& type) { #ifndef QT_NO_COMPONENT if ( !ifaces ) ifaces = new QDict<NetworkInterface>; NetworkInterface *iface = ifaces->find(type); if ( !iface ) { +#ifdef Q_OS_MACX + QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".dylib"; +#else QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so"; +#endif QLibrary lib(libfile); if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK ) return 0; ifaces->insert(type,iface); QStringList langs = Global::languageList(); for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { QString lang = *it; QTranslator * trans = new QTranslator(qApp); QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm"; if ( trans->load( tfn )) qApp->installTranslator( trans ); else delete trans; } } return iface; #else return 0; #endif } #include "network.moc" #endif // QT_NO_COP diff --git a/library/qlibrary_unix.cpp b/library/qlibrary_unix.cpp index 7740321..0229b7b 100644 --- a/library/qlibrary_unix.cpp +++ b/library/qlibrary_unix.cpp @@ -15,118 +15,229 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "qlibrary_p.h" #ifndef QT_NO_COMPONENT /* The platform dependent implementations of - loadLibrary - freeLibrary - resolveSymbol It's not too hard to guess what the functions do. */ #if defined(Q_OS_HPUX) // for HP-UX < 11.x and 32 bit #include <dl.h> bool QLibraryPrivate::loadLibrary() { if ( pHnd ) return TRUE; QString filename = library->library(); pHnd = (void*)shl_load( filename.latin1(), BIND_DEFERRED | BIND_NONFATAL | DYNAMIC_PATH, 0 ); #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) if ( !pHnd ) qDebug( "Failed to load library %s!", filename.latin1() ); #endif return pHnd != 0; } bool QLibraryPrivate::freeLibrary() { if ( !pHnd ) return TRUE; if ( !shl_unload( (shl_t)pHnd ) ) { pHnd = 0; return TRUE; } return FALSE; } void* QLibraryPrivate::resolveSymbol( const char* symbol ) { if ( !pHnd ) return 0; void* address = 0; if ( shl_findsym( (shl_t*)&pHnd, symbol, TYPE_UNDEFINED, address ) < 0 ) { #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) qDebug( "Couldn't resolve symbol \"%s\"", symbol ); #endif return 0; } return address; } -#else // Q_OS_HPUX +#elif defined(_NULL_LIB_) + +bool QLibraryPrivate::loadLibrary() +{ + //qDebug("QLibraryPrivate::loadLibrary\n"); + return FALSE; +} +bool QLibraryPrivate::freeLibrary() +{ + //qDebug("QLibraryPrivate::freeLibrary\n"); + return FALSE; +} +void* QLibraryPrivate::resolveSymbol( const char* symbol ) +{ + //qDebug("QLibraryPrivate::resolveSymbol\n"); + return FALSE; +} + +#elif defined(Q_OS_MACX) + +#define ENUM_DYLD_BOOL +enum DYLD_BOOL { + DYLD_FALSE, + DYLD_TRUE +}; +#include <mach-o/dyld.h> +typedef struct { + NSObjectFileImage img; + NSModule mod; +} DyldLibDesc; + +bool QLibraryPrivate::loadLibrary() +{ + // qDebug("QLibraryPrivate::loadLibrary\n"); + // return FALSE; + if ( pHnd ) + return TRUE; + + QString filename = library->library(); + + NSObjectFileImage img = 0; + NSModule mod = 0; + NSObjectFileImageReturnCode ret = NSCreateObjectFileImageFromFile( filename.latin1() , &img ); + if ( ret != NSObjectFileImageSuccess ) { + qWarning( "Error in NSCreateObjectFileImageFromFile(): %d; Filename: %s", ret, filename.latin1() ); + if (ret == NSObjectFileImageAccess) { + qWarning ("(NSObjectFileImageAccess)" ); + } + } else { + mod = NSLinkModule(img, filename.latin1(), NSLINKMODULE_OPTION_BINDNOW | + NSLINKMODULE_OPTION_PRIVATE | + NSLINKMODULE_OPTION_RETURN_ON_ERROR); + if (mod == 0) { + qWarning( "Error in NSLinkModule()" ); + NSDestroyObjectFileImage(img); + } + } + DyldLibDesc* desc = 0; + if (img != 0 && mod != 0) { + desc = new DyldLibDesc; + desc->img = img; + desc->mod = mod; + } + pHnd = desc; + return pHnd != 0; +} + +bool QLibraryPrivate::freeLibrary() +{ + //qDebug("QLibraryPrivate::freeLibrary\n"); + //return FALSE; + if ( !pHnd ) + return TRUE; + + DyldLibDesc* desc = (DyldLibDesc*) pHnd; + NSModule mod = desc->mod; + NSObjectFileImage img = desc->img; + DYLD_BOOL success = NSUnLinkModule(mod, NSUNLINKMODULE_OPTION_NONE); + if ( success ) { + NSDestroyObjectFileImage(img); + delete desc; + pHnd = 0; + } +#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) + else { + qWarning( "Error in NSUnLinkModule(): %d", ret ); + } +#endif + return pHnd == 0; +} + +void* QLibraryPrivate::resolveSymbol( const char* symbol ) +{ + //qDebug("QLibraryPrivate::resolveSymbol\n"); + //return FALSE; + if ( !pHnd ) + return 0; + + DyldLibDesc* desc = (DyldLibDesc*) pHnd; + NSSymbol sym = NSLookupSymbolInModule(desc->mod, symbol); + void* address = 0; + if (sym != 0) { + address = NSAddressOfSymbol(sym); + } +#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) + if ( address == 0 ) + qWarning( "Cannot find symbol: %s", symbol ); +#endif + return address; +} + +#else // Something else, assuming POSIX #include <dlfcn.h> bool QLibraryPrivate::loadLibrary() { if ( pHnd ) return TRUE; QString filename = library->library(); pHnd = dlopen( filename.latin1() , RTLD_LAZY ); #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) if ( !pHnd ) qWarning( "%s", dlerror() ); #endif return pHnd != 0; } bool QLibraryPrivate::freeLibrary() { if ( !pHnd ) return TRUE; int ec = dlclose( pHnd ); if ( !ec ) pHnd = 0; #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) else { const char* error = dlerror(); if ( error ) qWarning( "%s", error ); } #endif return pHnd == 0; } void* QLibraryPrivate::resolveSymbol( const char* f ) { if ( !pHnd ) return 0; void* address = dlsym( pHnd, f ); #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) const char* error = dlerror(); if ( error ) qWarning( "%s", error ); #endif return address; } #endif // POSIX #endif // QT_NO_COMPONENT diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index d4734ae..a97efc0 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -1,157 +1,160 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** */ #define QTOPIA_INTERNAL_LANGLIST #include <stdlib.h> #include <unistd.h> +#ifndef Q_OS_MACX #include <linux/limits.h> // needed for some toolchains (PATH_MAX) +#endif #include <qfile.h> #include <qqueue.h> #ifdef Q_WS_QWS #ifndef QT_NO_COP #if QT_VERSION <= 231 #define private public #define sendLocally processEvent #include "qcopenvelope_qws.h" #undef private #else #include "qcopenvelope_qws.h" #endif #endif #include <qwindowsystem_qws.h> #endif #include <qtextstream.h> #include <qpalette.h> #include <qbuffer.h> #include <qptrdict.h> #include <qregexp.h> #include <qdir.h> #include <qlabel.h> #include <qdialog.h> #include <qdragobject.h> #include <qtextcodec.h> #include <qevent.h> #include <qtooltip.h> #include <qsignal.h> #include <qmainwindow.h> #include <qwidgetlist.h> #include <qpixmapcache.h> #if defined(Q_WS_QWS) && !defined(QT_NO_COP) #define QTOPIA_INTERNAL_INITAPP #include "qpeapplication.h" #include "qpestyle.h" #include "styleinterface.h" #if QT_VERSION >= 300 #include <qstylefactory.h> #else #include <qplatinumstyle.h> #include <qwindowsstyle.h> #include <qmotifstyle.h> #include <qmotifplusstyle.h> #include "lightstyle.h" #include <qpe/qlibrary.h> #endif #include "global.h" #include "resource.h" #if QT_VERSION <= 230 && defined(QT_NO_CODECS) #include "qutfcodec.h" #endif #include "config.h" #include "network.h" #ifdef QWS #include "fontmanager.h" #endif #include "alarmserver.h" #include "applnk.h" #include "qpemenubar.h" #include "textcodecinterface.h" #include "imagecodecinterface.h" #include <unistd.h> #include <sys/file.h> #include <sys/ioctl.h> +#ifndef QT_NO_SOUND #include <sys/soundcard.h> - +#endif #include "qt_override_p.h" class QPEApplicationData { public: QPEApplicationData ( ) : presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ), notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ), keep_running( true ), qcopQok( false ), qpe_main_widget( 0 ) {} int presstimer; QWidget* presswidget; QPoint presspos; bool rightpressed : 1; bool kbgrabbed : 1; bool notbusysent : 1; bool preloaded : 1; bool forceshow : 1; bool nomaximize : 1; bool keep_running : 1; bool qcopQok : 1; QStringList langs; QString appName; struct QCopRec { QCopRec( const QCString &ch, const QCString &msg, const QByteArray &d ) : channel( ch ), message( msg ), data( d ) { } QCString channel; QCString message; QByteArray data; }; QWidget* qpe_main_widget; QGuardedPtr<QWidget> lastraised; QQueue<QCopRec> qcopq; QString styleName; QString decorationName; void enqueueQCop( const QCString &ch, const QCString &msg, const QByteArray &data ) { qcopq.enqueue( new QCopRec( ch, msg, data ) ); } void sendQCopQ() { if (!qcopQok ) return; QCopRec * r; while((r=qcopq.dequeue())) { // remove from queue before sending... // event loop can come around again before getting // back from sendLocally #ifndef QT_NO_COP QCopChannel::sendLocally( r->channel, r->message, r->data ); @@ -172,305 +175,321 @@ public: ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); } #endif if ( mw->layout() && mw->inherits("QDialog") ) { QPEApplication::showDialog((QDialog*)mw, nomaximize); } else { #ifdef Q_WS_QWS if ( !nomaximize ) mw->showMaximized(); else #endif mw->show(); } } static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) { /* // This works but disable it for now until it is safe to apply // What is does is scan the .desktop files of all the apps for // the applnk that has the corresponding argv[0] as this program // then it uses the name stored in the .desktop file as the caption // for the main widget. This saves duplicating translations for // the app name in the program and in the .desktop files. AppLnkSet apps( appsPath ); QList<AppLnk> appsList = apps.children(); for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { if ( (*it)->exec() == appName ) { mw->setCaption( (*it)->name() ); return TRUE; } } */ return FALSE; } void show(QWidget* mw, bool nomax) { setWidgetCaptionFromAppName( mw, appName, QPEApplication::qpeDir() + "apps" ); nomaximize = nomax; qpe_main_widget = mw; qcopQok = TRUE; #ifndef QT_NO_COP sendQCopQ(); #endif if ( preloaded ) { if (forceshow) show_mx(mw, nomax); } else if ( keep_running ) { show_mx(mw, nomax); } } void loadTextCodecs() { QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif QStringList list; if ( dir. exists ( )) list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { TextCodecInterface *iface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { QValueList<int> mibs = iface->mibEnums(); for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) { (void)iface->createForMib(*i); // ### it exists now; need to remember if we can delete it } } else { lib->unload(); delete lib; } } } void loadImageCodecs() { QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif QStringList list; if ( dir. exists ( )) list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { ImageCodecInterface *iface = 0; QLibrary *lib = new QLibrary( path + "/" + *it ); if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { QStringList formats = iface->keys(); for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) { (void)iface->installIOHandler(*i); // ### it exists now; need to remember if we can delete it } } else { lib->unload(); delete lib; } } } }; class ResourceMimeFactory : public QMimeSourceFactory { public: ResourceMimeFactory() : resImage( 0 ) { setFilePath( Global::helpPath() ); setExtensionType( "html", "text/html;charset=UTF-8" ); } ~ResourceMimeFactory() { delete resImage; } const QMimeSource* data( const QString& abs_name ) const { const QMimeSource * r = QMimeSourceFactory::data( abs_name ); if ( !r ) { int sl = abs_name.length(); do { sl = abs_name.findRev( '/', sl - 1 ); QString name = sl >= 0 ? abs_name.mid( sl + 1 ) : abs_name; int dot = name.findRev( '.' ); if ( dot >= 0 ) name = name.left( dot ); QImage img = Resource::loadImage( name ); if ( !img.isNull() ) { delete resImage; resImage = new QImageDrag( img ); r = resImage; } } while ( !r && sl > 0 ); } return r; } private: mutable QImageDrag *resImage; }; static int& hack(int& i) { #if QT_VERSION <= 230 && defined(QT_NO_CODECS) // These should be created, but aren't in Qt 2.3.0 (void)new QUtf8Codec; (void)new QUtf16Codec; #endif return i; } static int muted = 0; static int micMuted = 0; static void setVolume( int t = 0, int percent = -1 ) { switch ( t ) { case 0: { Config cfg( "qpe" ); cfg.setGroup( "Volume" ); if ( percent < 0 ) percent = cfg.readNumEntry( "VolumePercent", 50 ); +#ifndef QT_NO_SOUND int fd = 0; if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { int vol = muted ? 0 : percent; // set both channels to same volume vol |= vol << 8; ioctl( fd, MIXER_WRITE( 0 ), &vol ); ::close( fd ); } +#endif } break; } } static void setMic( int t = 0, int percent = -1 ) { switch ( t ) { case 0: { Config cfg( "qpe" ); cfg.setGroup( "Volume" ); if ( percent < 0 ) percent = cfg.readNumEntry( "Mic", 50 ); +#ifndef QT_NO_SOUND int fd = 0; int mic = micMuted ? 0 : percent; if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic ); ::close( fd ); } +#endif } break; } } static void setBass( int t = 0, int percent = -1 ) { switch ( t ) { case 0: { Config cfg( "qpe" ); cfg.setGroup( "Volume" ); if ( percent < 0 ) percent = cfg.readNumEntry( "BassPercent", 50 ); +#ifndef QT_NO_SOUND int fd = 0; int bass = percent; if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { ioctl( fd, MIXER_WRITE( SOUND_MIXER_BASS ), &bass ); ::close( fd ); } +#endif } break; } } static void setTreble( int t = 0, int percent = -1 ) { switch ( t ) { case 0: { Config cfg( "qpe" ); cfg.setGroup( "Volume" ); if ( percent < 0 ) percent = cfg.readNumEntry( "TreblePercent", 50 ); +#ifndef QT_NO_SOUND int fd = 0; int treble = percent; if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { ioctl( fd, MIXER_WRITE( SOUND_MIXER_TREBLE ), &treble ); ::close( fd ); } +#endif } break; } } /*! \class QPEApplication qpeapplication.h \brief The QPEApplication class implements various system services that are available to all Qtopia applications. Simply by using QPEApplication instead of QApplication, a standard Qt application becomes a Qtopia application. It automatically follows style changes, quits and raises, and in the case of \link docwidget.html document-oriented\endlink applications, changes the currently displayed document in response to the environment. To create a \link docwidget.html document-oriented\endlink application use showMainDocumentWidget(); to create a non-document-oriented application use showMainWidget(). The keepRunning() function indicates whether the application will continue running after it's processed the last \link qcop.html QCop\endlink message. This can be changed using setKeepRunning(). A variety of signals are emitted when certain events occur, for example, timeChanged(), clockChanged(), weekChanged(), dateFormatChanged() and volumeChanged(). If the application receives a \link qcop.html QCop\endlink message on the application's QPE/Application/\e{appname} channel, the appMessage() signal is emitted. There are also flush() and reload() signals, which are emitted when synching begins and ends respectively - upon these signals, the application should save and reload any data files that are involved in synching. Most of these signals will initially be received and unfiltered through the appMessage() signal. This class also provides a set of useful static functions. The qpeDir() and documentDir() functions return the respective paths. The grabKeyboard() and ungrabKeyboard() functions are used to control whether the application takes control of the device's physical buttons (e.g. application launch keys). The stylus' mode of operation is set with setStylusOperation() and retrieved with stylusOperation(). There are also setInputMethodHint() and inputMethodHint() functions. \ingroup qtopiaemb */ /*! \fn void QPEApplication::clientMoused() \internal */ /*! \fn void QPEApplication::timeChanged(); This signal is emitted when the time changes outside the normal passage of time, i.e. if the time is set backwards or forwards. */ /*! \fn void QPEApplication::clockChanged( bool ampm ); This signal is emitted when the user changes the clock's style. If \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise, @@ -1588,133 +1607,139 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) */ void QPEApplication::setKeepRunning() { if ( qApp && qApp->inherits( "QPEApplication" ) ) { QPEApplication * qpeApp = ( QPEApplication* ) qApp; qpeApp->d->keep_running = TRUE; } } /*! Returns TRUE if the application will quit after processing the current list of qcop messages; otherwise returns FALSE. \sa setKeepRunning() */ bool QPEApplication::keepRunning() const { return d->keep_running; } /*! \internal */ void QPEApplication::internalSetStyle( const QString &style ) { #if QT_VERSION >= 300 if ( style == "QPE" ) { setStyle( new QPEStyle ); } else { QStyle *s = QStyleFactory::create( style ); if ( s ) setStyle( s ); } #else if ( style == "Windows" ) { setStyle( new QWindowsStyle ); } else if ( style == "QPE" ) { setStyle( new QPEStyle ); } else if ( style == "Light" ) { setStyle( new LightStyle ); } #ifndef QT_NO_STYLE_PLATINUM else if ( style == "Platinum" ) { setStyle( new QPlatinumStyle ); } #endif #ifndef QT_NO_STYLE_MOTIF else if ( style == "Motif" ) { setStyle( new QMotifStyle ); } #endif #ifndef QT_NO_STYLE_MOTIFPLUS else if ( style == "MotifPlus" ) { setStyle( new QMotifPlusStyle ); } #endif else { QStyle *sty = 0; QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/"; +#ifdef Q_OS_MACX + if ( style. find ( ".dylib" ) > 0 ) + path += style; + else + path = path + "lib" + style. lower ( ) + ".dylib"; // compatibility +#else if ( style. find ( ".so" ) > 0 ) path += style; else path = path + "lib" + style. lower ( ) + ".so"; // compatibility - +#endif static QLibrary *lastlib = 0; static StyleInterface *lastiface = 0; QLibrary *lib = new QLibrary ( path ); StyleInterface *iface = 0; if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface ) sty = iface-> style ( ); if ( sty ) { setStyle ( sty ); if ( lastiface ) lastiface-> release ( ); lastiface = iface; if ( lastlib ) { lastlib-> unload ( ); delete lastlib; } lastlib = lib; } else { if ( iface ) iface-> release ( ); delete lib; setStyle ( new LightStyle ( )); } } #endif } /*! \internal */ void QPEApplication::prepareForTermination( bool willrestart ) { if ( willrestart ) { // Draw a big wait icon, the image can be altered in later revisions // QWidget *d = QApplication::desktop(); QImage img = Resource::loadImage( "launcher/new_wait" ); QPixmap pix; pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) ); QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize | QWidget::WStyle_NoBorder | QWidget::WStyle_Tool ); lblWait->setPixmap( pix ); lblWait->setAlignment( QWidget::AlignCenter ); lblWait->show(); lblWait->showMaximized(); } #ifndef SINGLE_APP { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); } processEvents(); // ensure the message goes out. sleep( 1 ); // You have 1 second to comply. #endif } /*! \internal */ void QPEApplication::shutdown() { diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index 933542d..bac1a75 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp @@ -451,133 +451,141 @@ QRegion WindowDecorationInterface::mask( const WindowData *wd ) const return QRegion(r) - rect; } class DefaultWindowDecoration : public WindowDecorationInterface { public: DefaultWindowDecoration() : ref(0) {} QString name() const { return "Default"; } QPixmap icon() const { return QPixmap(); } QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_WindowDecoration ) *iface = this; if ( *iface ) (*iface)->addRef(); return QS_OK; } Q_REFCOUNT private: ulong ref; }; static WindowDecorationInterface *wdiface = 0; static QLibrary *wdlib = 0; static QString libname; //=========================================================================== QPEDecoration::QPEDecoration() : QWSDefaultDecoration() { init ( libname ); } QPEDecoration::QPEDecoration( const QString &plugin ) : QWSDefaultDecoration() { init ( plugin ); } void QPEDecoration::init ( const QString &plugin ) { libname = plugin; if ( wdlib ) { wdiface->release(); wdlib->unload(); delete wdlib; wdlib = 0; } else { delete wdiface; } WindowDecorationInterface *iface = 0; QString path = QPEApplication::qpeDir() + "/plugins/decorations/"; +#ifdef Q_OS_MACX + if ( plugin.find( ".dylib" ) > 0 ) { +#else if ( plugin.find( ".so" ) > 0 ) { +#endif // full library name supplied path += plugin; } else { +#ifdef Q_OS_MACX + path += "lib" + plugin.lower() + ".dylib"; // compatibility +#else path += "lib" + plugin.lower() + ".so"; // compatibility +#endif } QLibrary *lib = new QLibrary( path ); if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { wdiface = iface; wdlib = lib; } else { delete lib; wdiface = new DefaultWindowDecoration; } helpFile = QString(qApp->argv()[0]) + ".html"; QStringList helpPath = Global::helpPath(); helpExists = FALSE; for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) { helpExists = QFile::exists( *it + "/" + helpFile ); //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists); } qpeManager = new QPEManager( this ); // Qtopia 1.5 compatibility imageOk = *okImage ( 15 ); imageClose = *closeImage ( 15 ); imageHelp = *helpImage ( 15 ); } QPEDecoration::~QPEDecoration() { delete qpeManager; } const char **QPEDecoration::menuPixmap() { return (const char **)0; } const char **QPEDecoration::closePixmap() { return (const char **)qpe_close_xpm; } const char **QPEDecoration::minimizePixmap() { return (const char **)qpe_accept_xpm; } const char **QPEDecoration::maximizePixmap() { return (const char **)0; } const char **QPEDecoration::normalizePixmap() { return (const char **)0; } int QPEDecoration::getTitleHeight( const QWidget *w ) { WindowDecorationInterface::WindowData wd; windowData( w, wd ); return wdiface->metric(WindowDecorationInterface::TitleHeight,&wd); } /* diff --git a/library/sound.cpp b/library/sound.cpp index c8704f9..5b67995 100644 --- a/library/sound.cpp +++ b/library/sound.cpp @@ -1,95 +1,98 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qpe/resource.h> #include <qpe/sound.h> #include <qpe/qcopenvelope_qws.h> #include <qsound.h> #include <qfile.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> + +#ifndef QT_NO_SOUND #include <sys/soundcard.h> +#endif #include "config.h" #include <qmessagebox.h> #ifndef QT_NO_SOUND static int WAVsoundDuration(const QString& filename) { // bad solution // most of this is copied from qsoundqss.cpp QFile input(filename); if ( !input.open(IO_ReadOnly) ) return 0; struct QRiffChunk { char id[4]; Q_UINT32 size; char data[4/*size*/]; } chunk; struct { Q_INT16 formatTag; Q_INT16 channels; Q_INT32 samplesPerSec; Q_INT32 avgBytesPerSec; Q_INT16 blockAlign; Q_INT16 wBitsPerSample; } chunkdata; int total = 0; while(1) { // Keep reading chunks... const int n = sizeof(chunk)-sizeof(chunk.data); if ( input.readBlock((char*)&chunk,n) != n ) break; if ( qstrncmp(chunk.id,"data",4) == 0 ) { total += chunkdata.avgBytesPerSec ? chunk.size * 1000 / chunkdata.avgBytesPerSec : 0; //qDebug("%d bytes of PCM (%dms)", chunk.size,chunkdata.avgBytesPerSec ? chunk.size * 1000 / chunkdata.avgBytesPerSec : 0); input.at(input.at()+chunk.size-4); } else if ( qstrncmp(chunk.id,"RIFF",4) == 0 ) { char d[4]; if ( input.readBlock(d,4) != 4 ) return 0; if ( qstrncmp(d,"WAVE",4) != 0 ) { // skip //qDebug("skip %.4s RIFF chunk",d); if ( chunk.size < 10000000 ) (void)input.at(input.at()+chunk.size-4); } } else if ( qstrncmp(chunk.id,"fmt ",4) == 0 ) { if ( input.readBlock((char*)&chunkdata,sizeof(chunkdata)) != sizeof(chunkdata) ) return 0; #define WAVE_FORMAT_PCM 1 if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) { //qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag); return 0; } } else { //qDebug("skip %.4s chunk",chunk.id); // ignored chunk if ( chunk.size < 10000000 ) (void)input.at(input.at()+chunk.size); diff --git a/library/storage.cpp b/library/storage.cpp index dc5cc22..f8b75d0 100644 --- a/library/storage.cpp +++ b/library/storage.cpp @@ -1,127 +1,139 @@ /********************************************************************** ** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org> ** Copyright (C) Lorn Potter <llornkcor@handhelds.org> ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Opie Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qpe/storage.h> #include <qpe/custom.h> #include <qfile.h> #include <qtimer.h> #include <qcopchannel_qws.h> #include <stdio.h> -#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) +#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <sys/vfs.h> #include <mntent.h> #endif +#ifdef Q_OS_MACX +# include <sys/param.h> +# include <sys/ucred.h> +# include <sys/mount.h> +# include <stdio.h> // For strerror() +# include <errno.h> +#endif /* Q_OS_MACX */ + #include <qstringlist.h> -#include <sys/vfs.h> -#include <mntent.h> +// Shouldn't be here ! (eilers) +// #include <sys/vfs.h> +// #include <mntent.h> static bool isCF(const QString& m) { + +#ifndef Q_OS_MACX FILE* f = fopen("/var/run/stab", "r"); if (!f) f = fopen("/var/state/pcmcia/stab", "r"); if (!f) f = fopen("/var/lib/pcmcia/stab", "r"); if ( f ) { char line[1024]; char devtype[80]; char devname[80]; while ( fgets( line, 1024, f ) ) { // 0 ide ide-cs 0 hda 3 0 if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 ) { if ( QString(devtype) == "ide" && m.find(devname)>0 ) { fclose(f); return TRUE; } } } fclose(f); } +#endif /* Q_OS_MACX */ return FALSE; } /*! \class StorageInfo storage.h \brief The StorageInfo class describes the disks mounted on the file system. This class provides access to the mount information for the Linux filesystem. Each mount point is represented by the FileSystem class. To ensure this class has the most up to date size information, call the update() method. Note that this will automatically be signaled by the operating system when a disk has been mounted or unmounted. \ingroup qtopiaemb */ /*! Constructor that determines the current mount points of the filesystem. The standard \a parent parameters is passed on to QObject. */ StorageInfo::StorageInfo( QObject *parent ) : QObject( parent ) { mFileSystems.setAutoDelete( TRUE ); channel = new QCopChannel( "QPE/Card", this ); connect( channel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); update(); } /*! Returns the longest matching FileSystem that starts with the same prefix as \a filename as its mount point. */ const FileSystem *StorageInfo::fileSystemOf( const QString &filename ) { for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) { if ( filename.startsWith( (*i)->path() ) ) return (*i); } return 0; } void StorageInfo::cardMessage( const QCString& msg, const QByteArray& ) { if ( msg == "mtabChanged()" ) update(); } /*! Updates the mount and free space available information for each mount point. This method is automatically called when a disk is mounted or unmounted. */ // cause of the lack of a d pointer we need // to store informations in a config file :( void StorageInfo::update() { //qDebug("StorageInfo::updating"); #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) struct mntent *me; FILE *mntfp = setmntent( "/etc/mtab", "r" ); QStringList curdisks; QStringList curopts; QStringList curfs; @@ -143,142 +155,162 @@ void StorageInfo::update() bool found = FALSE; for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) { if ( (*i)->disk() == fs ) { found = TRUE; break; } } if ( !found ) rebuild = TRUE; } } endmntent( mntfp ); } if ( rebuild || n != (int)mFileSystems.count() ) { mFileSystems.clear(); QStringList::ConstIterator it=curdisks.begin(); QStringList::ConstIterator fsit=curfs.begin(); QStringList::ConstIterator optsIt=curopts.begin(); for (; it!=curdisks.end(); ++it, ++fsit, ++optsIt) { QString opts = *optsIt; QString disk = *it; QString humanname; bool removable = FALSE; if ( isCF(disk) ) { humanname = tr("CF Card"); removable = TRUE; } else if ( disk == "/dev/hda1" ) { humanname = tr("Hard Disk"); } else if ( disk.left(9) == "/dev/mmcd" ) { humanname = tr("SD Card"); removable = TRUE; } else if ( disk.left( 14 ) == "/dev/mmc/part1" ) { humanname = tr("MMC Card"); removable = TRUE; } else if ( disk.left(7) == "/dev/hd" ) humanname = tr("Hard Disk") + " " + disk; else if ( disk.left(7) == "/dev/sd" ) humanname = tr("SCSI Hard Disk") + " " + disk; else if ( disk.left(14) == "/dev/mtdblock6" ) //openzaurus ramfs humanname = tr("Internal Memory"); else if ( disk == "/dev/mtdblock1" || humanname == "/dev/mtdblock/1" ) humanname = tr("Internal Storage"); else if ( disk.left(14) == "/dev/mtdblock/" ) humanname = tr("Internal Storage") + " " + disk; else if ( disk.left(13) == "/dev/mtdblock" ) humanname = tr("Internal Storage") + " " + disk; else if ( disk.left(9) == "/dev/root" ) humanname = tr("Internal Storage") + " " + disk; else if ( disk.left(5) == "tmpfs" ) //ipaqs /mnt/ramfs humanname = tr("Internal Memory"); FileSystem *fs = new FileSystem( disk, *fsit, humanname, removable, opts ); mFileSystems.append( fs ); } emit disksChanged(); } else { // just update them for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) i.current()->update(); } #endif } bool deviceTab( const char *device) { - QString name = device; - bool hasDevice=false; + QString name = device; + bool hasDevice=false; + +#ifdef Q_OS_MACX + // Darwin (MacOS X) + struct statfs** mntbufp; + int count = 0; + if ( ( count = getmntinfo( mntbufp, MNT_WAIT ) ) == 0 ){ + qWarning("deviceTab: Error in getmntinfo(): %s",strerror( errno ) ); + hasDevice = false; + } + for( int i = 0; i < count; i++ ){ + QString deviceName = mntbufp[i]->f_mntfromname; + qDebug(deviceName); + if( deviceName.left( name.length() ) == name ) + hasDevice = true; + } +#else + // Linux struct mntent *me; FILE *mntfp = setmntent( "/etc/mtab", "r" ); if ( mntfp ) { while ( (me = getmntent( mntfp )) != 0 ) { QString deviceName = me->mnt_fsname; // qDebug(deviceName); if( deviceName.left(name.length()) == name) { hasDevice = true; } } } endmntent( mntfp ); +#endif /* Q_OS_MACX */ + + return hasDevice; } /*! * @fn static bool StorageInfo::hasCf() * @brief returns whether device has Cf mounted * */ bool StorageInfo::hasCf() { return deviceTab("/dev/hd"); } /*! * @fn static bool StorageInfo::hasSd() * @brief returns whether device has SD mounted * */ bool StorageInfo::hasSd() { return deviceTab("/dev/mmcd"); } /*! * @fn static bool StorageInfo::hasMmc() * @brief reutrns whether device has mmc mounted * */ bool StorageInfo::hasMmc() { bool hasMmc=false; if( deviceTab("/dev/mmc/part")) hasMmc=true; if( deviceTab("/dev/mmcd")) hasMmc=true; return hasMmc; } /*! \fn const QList<FileSystem> &StorageInfo::fileSystems() const Returns a list of all available mounted file systems. \warning This may change in Qtopia 3.x to return only relevant Qtopia file systems (and ignore mount points such as /tmp) */ /*! \fn void StorageInfo::disksChanged() Gets emitted when a disk has been mounted or unmounted, such as when a CF c */ //--------------------------------------------------------------------------- FileSystem::FileSystem( const QString &disk, const QString &path, const QString &name, bool rem, const QString &o ) : fsdisk( disk ), fspath( path ), humanname( name ), blkSize(512), totalBlks(0), availBlks(0), removable( rem ), opts( o ) { update(); } void FileSystem::update() { #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) struct statfs fs; if ( !statfs( fspath.latin1(), &fs ) ) { blkSize = fs.f_bsize; totalBlks = fs.f_blocks; availBlks = fs.f_bavail; diff --git a/mkspecs/qws/macx-generic-g++/qmake.conf b/mkspecs/qws/macx-generic-g++/qmake.conf index 3460a40..04f1c8b 100644 --- a/mkspecs/qws/macx-generic-g++/qmake.conf +++ b/mkspecs/qws/macx-generic-g++/qmake.conf @@ -1,80 +1,81 @@ # # $Id$ # # qmake configuration for macx-g++ with Qt/Embedded # MAKEFILE_GENERATOR = UNIX TEMPLATE = app CONFIG += qt warn_on release QMAKE_EXTENSION_SHLIB = dylib QMAKE_CC = $(TB)cc QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = yacc QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) QMAKE_CFLAGS_WARN_ON = -Wall -W QMAKE_CFLAGS_WARN_OFF = QMAKE_CFLAGS_RELEASE = $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -fno-default-inline) QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_SHLIB = -fPIC QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses QMAKE_CFLAGS_THREAD = -D_REENTRANT QMAKE_CXX = $(TB)c++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_TRANSFORMED -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_TRANSFORMED -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) -DQ_OS_MACX -DQT_NO_SOUND -DOPIE_NO_OVERRIDE_QT QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_INCDIR = QMAKE_LIBDIR = QMAKE_INCDIR_X11 = QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $(QTDIR)/include QMAKE_LIBDIR_QT = $(QTDIR)/lib QMAKE_INCDIR_OPENGL = /usr/X11R6/include QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib QMAKE_LINK = $$QMAKE_CXX QMAKE_LINK_SHLIB = $$QMAKE_CXX QMAKE_LFLAGS = $(LFLAGS_EXTRA) QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_SHLIB = -dynamiclib QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace QMAKE_LFLAGS_PLUGIN = -bundle QMAKE_LFLAGS_SONAME = QMAKE_LFLAGS_THREAD = QMAKE_RPATH = QMAKE_LIBS = $(LIBS_EXTRA) QMAKE_LIBS_X11 = QMAKE_LIBS_X11SM = QMAKE_LIBS_QT = -lqte +#QMAKE_LIBS_QT = libqte.dylib QMAKE_LIBS_QT_THREAD = -lqte-mt QMAKE_LIBS_QT_OPENGL = -lqgl QMAKE_LIBS_THREAD = QMAKE_MOC = $(QTDIR)/bin/moc QMAKE_UIC = $(QTDIR)/bin/uic QMAKE_AR = ar cqs QMAKE_RANLIB = QMAKE_TAR = tar -cf QMAKE_GZIP = gzip -9f QMAKE_COPY = cp -f QMAKE_MOVE = mv -f QMAKE_DEL_FILE = rm -f QMAKE_DEL_DIR = rmdir diff --git a/noncore/applets/networkapplet/networkapplet.pro b/noncore/applets/networkapplet/networkapplet.pro index ec58455..368f80e 100644 --- a/noncore/applets/networkapplet/networkapplet.pro +++ b/noncore/applets/networkapplet/networkapplet.pro @@ -1,15 +1,15 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = networkapplet.h SOURCES = networkapplet.cpp TARGET = networkapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2 VERSION = 0.1.0 MOC_DIR = moc OBJECTS_DIR = obj include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/applets/notesapplet/notesapplet.pro b/noncore/applets/notesapplet/notesapplet.pro index e4558f7..3075948 100644 --- a/noncore/applets/notesapplet/notesapplet.pro +++ b/noncore/applets/notesapplet/notesapplet.pro @@ -1,16 +1,16 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = notes.h notesappletimpl.h SOURCES = notes.cpp notesappletimpl.cpp TARGET = notesapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 MOC_DIR=opieobj OBJECTS_DIR=opieobj include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/applets/wirelessapplet/wirelessapplet.pro b/noncore/applets/wirelessapplet/wirelessapplet.pro index 501327d..aee89d7 100644 --- a/noncore/applets/wirelessapplet/wirelessapplet.pro +++ b/noncore/applets/wirelessapplet/wirelessapplet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = wireless.h wirelessappletimpl.h networkinfo.h mgraph.h advancedconfig.h SOURCES = wireless.cpp wirelessappletimpl.cpp networkinfo.cpp mgraph.cpp advancedconfig.cpp INTERFACES = advancedconfigbase.ui TARGET = wirelessapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include LIBS += -lqpe VERSION = 0.1.0 TRANSLATIONS = ../../../i18n/de/libwirelessapplet.ts \ ../../../i18n/nl/libwirelessapplet.ts \ ../../../i18n/da/libwirelessapplet.ts \ ../../../i18n/xx/libwirelessapplet.ts \ ../../../i18n/en/libwirelessapplet.ts \ ../../../i18n/es/libwirelessapplet.ts \ ../../../i18n/fr/libwirelessapplet.ts \ ../../../i18n/hu/libwirelessapplet.ts \ ../../../i18n/ja/libwirelessapplet.ts \ ../../../i18n/ko/libwirelessapplet.ts \ ../../../i18n/no/libwirelessapplet.ts \ ../../../i18n/pl/libwirelessapplet.ts \ ../../../i18n/pt/libwirelessapplet.ts \ ../../../i18n/pt_BR/libwirelessapplet.ts \ ../../../i18n/sl/libwirelessapplet.ts \ ../../../i18n/zh_CN/libwirelessapplet.ts \ ../../../i18n/zh_TW/libwirelessapplet.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/decorations/flat/flat.pro b/noncore/decorations/flat/flat.pro index e691339..f3d63ea 100644 --- a/noncore/decorations/flat/flat.pro +++ b/noncore/decorations/flat/flat.pro @@ -1,15 +1,15 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = flat.h SOURCES = flat.cpp TARGET = flat DESTDIR = $(OPIEDIR)/plugins/decorations INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/decorations/liquid/liquid.pro b/noncore/decorations/liquid/liquid.pro index 7c310a6..2afed26 100644 --- a/noncore/decorations/liquid/liquid.pro +++ b/noncore/decorations/liquid/liquid.pro @@ -1,14 +1,14 @@ TEMPLATE = lib -CONFIG = qt embedded release warn_on +CONFIG = qt plugin embedded release warn_on SOURCES = liquid.cpp HEADERS = liquid.h LIBS += -lqpe INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/plugins/decorations TARGET = liquid VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/decorations/polished/polished.pro b/noncore/decorations/polished/polished.pro index 1ee940e..d3f3dcc 100644 --- a/noncore/decorations/polished/polished.pro +++ b/noncore/decorations/polished/polished.pro @@ -1,15 +1,15 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = polished.h SOURCES = polished.cpp TARGET = polished DESTDIR = $(OPIEDIR)/plugins/decorations INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/net/opietooth/applet/applet.pro b/noncore/net/opietooth/applet/applet.pro index 23c1d0a..4efcb42 100644 --- a/noncore/net/opietooth/applet/applet.pro +++ b/noncore/net/opietooth/applet/applet.pro @@ -1,33 +1,33 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = bluezapplet.h bluezappletimpl.h SOURCES = bluezapplet.cpp bluezappletimpl.cpp TARGET = bluetoothapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopietooth VERSION = 0.0.3 TRANSLATIONS = ../../../../i18n/de/libbluetoothapplet.ts \ ../../../../i18n/nl/libbluetoothapplet.ts \ ../../../../i18n/da/libbluetoothapplet.ts \ ../../../../i18n/xx/libbluetoothapplet.ts \ ../../../../i18n/en/libbluetoothapplet.ts \ ../../../../i18n/es/libbluetoothapplet.ts \ ../../../../i18n/fr/libbluetoothapplet.ts \ ../../../../i18n/hu/libbluetoothapplet.ts \ ../../../../i18n/ja/libbluetoothapplet.ts \ ../../../../i18n/ko/libbluetoothapplet.ts \ ../../../../i18n/no/libbluetoothapplet.ts \ ../../../../i18n/pl/libbluetoothapplet.ts \ ../../../../i18n/pt/libbluetoothapplet.ts \ ../../../../i18n/pt_BR/libbluetoothapplet.ts \ ../../../../i18n/sl/libbluetoothapplet.ts \ ../../../../i18n/zh_CN/libbluetoothapplet.ts \ ../../../../i18n/zh_TW/libbluetoothapplet.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/settings/networksettings/ppp/ppp.pro b/noncore/settings/networksettings/ppp/ppp.pro index 84acd0e..dc78eb1 100644 --- a/noncore/settings/networksettings/ppp/ppp.pro +++ b/noncore/settings/networksettings/ppp/ppp.pro @@ -1,17 +1,17 @@ #TEMPLATE = app # TEMPLATE = lib -#CONFIG += qt warn_on release -CONFIG += qt warn_on debug +#CONFIG += qt plugin warn_on release +CONFIG += qt plugin warn_on debug DESTDIR = $(OPIEDIR)/plugins/networksettings HEADERS = pppmodule.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h conwindow.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h interfaceinformationppp.h interfaceppp.h authwidget.h chooserwidget.h devices.h SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp conwindow.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp interfaceinformationppp.cpp interfaceppp.cpp authwidget.cpp chooserwidget.cpp devices.cpp INCLUDEPATH += $(OPIEDIR)/include ../ ../interfaces/ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -L../interfaces/ -linterfaces TARGET = kppp VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/settings/networksettings/wlan/wlan.pro b/noncore/settings/networksettings/wlan/wlan.pro index 82a5b2f..098ad1d 100644 --- a/noncore/settings/networksettings/wlan/wlan.pro +++ b/noncore/settings/networksettings/wlan/wlan.pro @@ -1,28 +1,28 @@ # TEMPLATE = lib #TEMPLATE = app -CONFIG += qt warn_on release -#CONFIG += qt warn_on debug +CONFIG += qt plugin warn_on release +#CONFIG += qt plugin warn_on debug DESTDIR = $(OPIEDIR)/plugins/networksettings HEADERS = infoimp.h wlanmodule.h wextensions.h keyedit.h SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp keyedit.cpp INCLUDEPATH += $(OPIEDIR)/include ../ ../interfaces/ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -L../interfaces/ -linterfaces -lopienet2 INTERFACES = wlan.ui info.ui TARGET = wlan VERSION = 1.0.0 #CONFIG += wirelessopts wirelessopts { HEADERS += wlanimp.h SOURCES += wlanimp.cpp } ! wirelessopts { HEADERS += wlanimp2.h SOURCES += wlanimp2.cpp } include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/styles/flat/flat.pro b/noncore/styles/flat/flat.pro index ed25d5c..2721e14 100644 --- a/noncore/styles/flat/flat.pro +++ b/noncore/styles/flat/flat.pro @@ -1,15 +1,15 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = flat.h SOURCES = flat.cpp TARGET = flatstyle DESTDIR = $(OPIEDIR)/plugins/styles INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/styles/fresh/fresh.pro b/noncore/styles/fresh/fresh.pro index 88a8de3..564c5cd 100644 --- a/noncore/styles/fresh/fresh.pro +++ b/noncore/styles/fresh/fresh.pro @@ -1,15 +1,15 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = fresh.h SOURCES = fresh.cpp TARGET = freshstyle DESTDIR = $(OPIEDIR)/plugins/styles INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/styles/liquid/liquid.pro b/noncore/styles/liquid/liquid.pro index 9241eba..4e1c575 100644 --- a/noncore/styles/liquid/liquid.pro +++ b/noncore/styles/liquid/liquid.pro @@ -1,39 +1,39 @@ TEMPLATE = lib -CONFIG = qt embedded release warn_on +CONFIG = qt plugin embedded release warn_on SOURCES = liquid.cpp \ effects.cpp \ liquidset.cpp \ plugin.cpp HEADERS = liquid.h \ effects.h \ liquidset.h \ plugin.h LIBS += -lqpe -lopie INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/plugins/styles TARGET = liquid VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libliquid.ts \ ../../../i18n/nl/libliquid.ts \ ../../../i18n/da/libliquid.ts \ ../../../i18n/xx/libliquid.ts \ ../../../i18n/en/libliquid.ts \ ../../../i18n/es/libliquid.ts \ ../../../i18n/fr/libliquid.ts \ ../../../i18n/hu/libliquid.ts \ ../../../i18n/ja/libliquid.ts \ ../../../i18n/ko/libliquid.ts \ ../../../i18n/no/libliquid.ts \ ../../../i18n/pl/libliquid.ts \ ../../../i18n/pt/libliquid.ts \ ../../../i18n/pt_BR/libliquid.ts \ ../../../i18n/sl/libliquid.ts \ ../../../i18n/zh_CN/libliquid.ts \ ../../../i18n/zh_TW/libliquid.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/styles/metal/metal.pro b/noncore/styles/metal/metal.pro index 3bb376d..8633284 100644 --- a/noncore/styles/metal/metal.pro +++ b/noncore/styles/metal/metal.pro @@ -1,32 +1,32 @@ TEMPLATE = lib -CONFIG = qt embedded release warn_on +CONFIG = qt plugin embedded release warn_on SOURCES = metal.cpp plugin.cpp HEADERS = metal.h plugin.h LIBS += -lqpe INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/plugins/styles TARGET = metal VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libmetal.ts \ ../../../i18n/nl/libmetal.ts \ ../../../i18n/da/libmetal.ts \ ../../../i18n/xx/libmetal.ts \ ../../../i18n/en/libmetal.ts \ ../../../i18n/es/libmetal.ts \ ../../../i18n/fr/libmetal.ts \ ../../../i18n/hu/libmetal.ts \ ../../../i18n/ja/libmetal.ts \ ../../../i18n/ko/libmetal.ts \ ../../../i18n/no/libmetal.ts \ ../../../i18n/pl/libmetal.ts \ ../../../i18n/pt/libmetal.ts \ ../../../i18n/pt_BR/libmetal.ts \ ../../../i18n/sl/libmetal.ts \ ../../../i18n/zh_CN/libmetal.ts \ ../../../i18n/zh_TW/libmetal.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/styles/theme/theme.pro b/noncore/styles/theme/theme.pro index f7ed324..4f84f3f 100644 --- a/noncore/styles/theme/theme.pro +++ b/noncore/styles/theme/theme.pro @@ -1,42 +1,42 @@ TEMPLATE = lib -CONFIG = qt embedded debug warn_on +CONFIG = qt plugin embedded debug warn_on SOURCES = ogfxeffect.cpp \ othemestyle.cpp \ othemebase.cpp \ themeset.cpp \ plugin.cpp HEADERS = ogfxeffect.h \ othemebase.h \ othemestyle.h \ themeset.h \ plugin.h LIBS += -lqpe INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(OPIEDIR)/plugins/styles TARGET = theme VERSION = 1.0.0 TRANSLATIONS = ../../../i18n/de/libtheme.ts \ ../../../i18n/nl/libtheme.ts \ ../../../i18n/da/libtheme.ts \ ../../../i18n/xx/libtheme.ts \ ../../../i18n/en/libtheme.ts \ ../../../i18n/es/libtheme.ts \ ../../../i18n/fr/libtheme.ts \ ../../../i18n/hu/libtheme.ts \ ../../../i18n/ja/libtheme.ts \ ../../../i18n/ko/libtheme.ts \ ../../../i18n/no/libtheme.ts \ ../../../i18n/pl/libtheme.ts \ ../../../i18n/pt/libtheme.ts \ ../../../i18n/pt_BR/libtheme.ts \ ../../../i18n/sl/libtheme.ts \ ../../../i18n/zh_CN/libtheme.ts \ ../../../i18n/zh_TW/libtheme.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/todayplugins/fortune/fortune.pro b/noncore/todayplugins/fortune/fortune.pro index 0a0d5b9..ac503c3 100644 --- a/noncore/todayplugins/fortune/fortune.pro +++ b/noncore/todayplugins/fortune/fortune.pro @@ -1,41 +1,41 @@ TEMPLATE = lib #CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release # Input HEADERS = fortuneplugin.h fortunepluginimpl.h \ fortunepluginwidget.h SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \ fortunepluginwidget.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie DESTDIR = $(OPIEDIR)/plugins/today TARGET = todayfortuneplugin TRANSLATIONS = ../../../i18n/de/libtodayfortuneplugin.ts \ ../../../i18n/nl/libtodayfortuneplugin.ts \ ../../../i18n/xx/libtodayfortuneplugin.ts \ ../../../i18n/en/libtodayfortuneplugin.ts \ ../../../i18n/es/libtodayfortuneplugin.ts \ ../../../i18n/fr/libtodayfortuneplugin.ts \ ../../../i18n/hu/libtodayfortuneplugin.ts \ ../../../i18n/ja/libtodayfortuneplugin.ts \ ../../../i18n/ko/libtodayfortuneplugin.ts \ ../../../i18n/no/libtodayfortuneplugin.ts \ ../../../i18n/pl/libtodayfortuneplugin.ts \ ../../../i18n/pt/libtodayfortuneplugin.ts \ ../../../i18n/pt_BR/libtodayfortuneplugin.ts \ ../../../i18n/sl/libtodayfortuneplugin.ts \ ../../../i18n/zh_CN/libtodayfortuneplugin.ts \ ../../../i18n/zh_TW/libtodayfortuneplugin.ts \ ../../../i18n/it/libtodayfortuneplugin.ts \ ../../../i18n/da/libtodayfortuneplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro index c34be33..490a8f9 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro @@ -1,48 +1,48 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release HEADERS = stocktickerplugin.h stocktickerpluginimpl.h stocktickerpluginwidget.h stocktickerconfig.h \ ../libstocks/csv.h \ ../libstocks/http.h \ ../libstocks/lists.h \ ../libstocks/stocks.h SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp stocktickerconfig.cpp \ ../libstocks/csv.c \ ../libstocks/currency.c \ ../libstocks/history.c \ ../libstocks/http.c \ ../libstocks/lists.c \ ../libstocks/stocks.c INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie -lpthread TMAKE_CFLAGS += -D__UNIX__ DESTDIR = $(OPIEDIR)/plugins/today TARGET = todaystocktickerplugin TRANSLATIONS = ../../../../i18n/de/libtodaystocktickerplugin.ts \ ../../../../i18n/nl/libtodaystocktickerplugin.ts \ ../../../../i18n/xx/libtodaystocktickerplugin.ts \ ../../../../i18n/en/libtodaystocktickerplugin.ts \ ../../../../i18n/es/libtodaystocktickerplugin.ts \ ../../../../i18n/fr/libtodaystocktickerplugin.ts \ ../../../../i18n/hu/libtodaystocktickerplugin.ts \ ../../../../i18n/ja/libtodaystocktickerplugin.ts \ ../../../../i18n/ko/libtodaystocktickerplugin.ts \ ../../../../i18n/no/libtodaystocktickerplugin.ts \ ../../../../i18n/pl/libtodaystocktickerplugin.ts \ ../../../../i18n/pt/libtodaystocktickerplugin.ts \ ../../../../i18n/pt_BR/libtodaystocktickerplugin.ts \ ../../../../i18n/sl/libtodaystocktickerplugin.ts \ ../../../../i18n/zh_CN/libtodaystocktickerplugin.ts \ ../../../../i18n/zh_TW/libtodaystocktickerplugin.ts \ ../../../../i18n/it/libtodaystocktickerplugin.ts \ ../../../../i18n/da/libtodaystocktickerplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/todayplugins/weather/weather.pro b/noncore/todayplugins/weather/weather.pro index 2833e88..bd4b565 100644 --- a/noncore/todayplugins/weather/weather.pro +++ b/noncore/todayplugins/weather/weather.pro @@ -1,43 +1,43 @@ TEMPLATE = lib #CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release HEADERS = weatherplugin.h \ weatherpluginimpl.h \ weatherpluginwidget.h \ weatherconfig.h SOURCES = weatherplugin.cpp \ weatherpluginimpl.cpp \ weatherpluginwidget.cpp \ weatherconfig.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie DESTDIR = $(OPIEDIR)/plugins/today TARGET = todayweatherplugin TRANSLATIONS = ../../../i18n/de/libtodayweatherplugin.ts \ ../../../i18n/nl/libtodayweatherplugin.ts \ ../../../i18n/xx/libtodayweatherplugin.ts \ ../../../i18n/en/libtodayweatherplugin.ts \ ../../../i18n/es/libtodayweatherplugin.ts \ ../../../i18n/fr/libtodayweatherplugin.ts \ ../../../i18n/hu/libtodayweatherplugin.ts \ ../../../i18n/ja/libtodayweatherplugin.ts \ ../../../i18n/ko/libtodayweatherplugin.ts \ ../../../i18n/no/libtodayweatherplugin.ts \ ../../../i18n/pl/libtodayweatherplugin.ts \ ../../../i18n/pt/libtodayweatherplugin.ts \ ../../../i18n/pt_BR/libtodayweatherplugin.ts \ ../../../i18n/sl/libtodayweatherplugin.ts \ ../../../i18n/zh_CN/libtodayweatherplugin.ts \ ../../../i18n/zh_TW/libtodayweatherplugin.ts \ ../../../i18n/it/libtodayweatherplugin.ts \ ../../../i18n/da/libtodayweatherplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/unsupported/mail2/bend/bend.pro b/noncore/unsupported/mail2/bend/bend.pro index b03f652..61eea5f 100644 --- a/noncore/unsupported/mail2/bend/bend.pro +++ b/noncore/unsupported/mail2/bend/bend.pro @@ -1,32 +1,32 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS += bend.h \ bendimpl.h SOURCES += bend.cpp \ bendimpl.cpp INCLUDEPATH += $(OPIEDIR)/include ../libmail LIBS += -lmail -lqpe TARGET = bend DESTDIR += $(OPIEDIR)/plugins/applets/ TRANSLATIONS = ../../../i18n/de/libbend.ts \ ../../../i18n/nl/libbend.ts \ ../../../i18n/da/libbend.ts \ ../../../i18n/xx/libbend.ts \ ../../../i18n/en/libbend.ts \ ../../../i18n/es/libbend.ts \ ../../../i18n/fr/libbend.ts \ ../../../i18n/hu/libbend.ts \ ../../../i18n/ja/libbend.ts \ ../../../i18n/ko/libbend.ts \ ../../../i18n/no/libbend.ts \ ../../../i18n/pl/libbend.ts \ ../../../i18n/pt/libbend.ts \ ../../../i18n/pt_BR/libbend.ts \ ../../../i18n/sl/libbend.ts \ ../../../i18n/zh_CN/libbend.ts \ ../../../i18n/zh_TW/libbend.ts include ( $(OPIEDIR)/include.pro ) diff --git a/plugins/Makefile b/plugins/Makefile index 4863bd0..2515903 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1,4 +1,8 @@ clean: - find -name "*.so*" -print0 | xargs -0 rm -f +ifeq ( CONFIG_TARGET_MACOSX, y ) + find ./ -name "*.dylib*" -print0 | xargs -0 rm -f +else + find ./ -name "*.so*" -print0 | xargs -0 rm -f +endif all install ipk lupdate lrelease opie-lupdate opie-lrelease: diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h index d212bff..94e5607 100644 --- a/qmake/include/qglobal.h +++ b/qmake/include/qglobal.h @@ -93,129 +93,136 @@ # define Q_OS_OS2EMX # else # define Q_OS_OS2 # endif #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) # define Q_OS_WIN32 # define Q_OS_WIN64 #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) # define Q_OS_WIN32 #elif defined(__MWERKS__) && defined(__INTEL__) # define Q_OS_WIN32 #elif defined(__sun) || defined(sun) # define Q_OS_SOLARIS #elif defined(hpux) || defined(__hpux) # define Q_OS_HPUX #elif defined(__ultrix) || defined(ultrix) # define Q_OS_ULTRIX #elif defined(sinix) # define Q_OS_RELIANT #elif defined(__linux__) || defined(__linux) # define Q_OS_LINUX #elif defined(__FreeBSD__) # define Q_OS_FREEBSD # define Q_OS_BSD4 #elif defined(__NetBSD__) # define Q_OS_NETBSD # define Q_OS_BSD4 #elif defined(__OpenBSD__) # define Q_OS_OPENBSD # define Q_OS_BSD4 #elif defined(__bsdi__) # define Q_OS_BSDI # define Q_OS_BSD4 #elif defined(__sgi) # define Q_OS_IRIX #elif defined(__osf__) # define Q_OS_OSF #elif defined(_AIX) # define Q_OS_AIX #elif defined(__Lynx__) # define Q_OS_LYNX #elif defined(__GNU_HURD__) # define Q_OS_HURD #elif defined(__DGUX__) # define Q_OS_DGUX #elif defined(__QNXNTO__) # define Q_OS_QNX6 #elif defined(__QNX__) # define Q_OS_QNX #elif defined(_SEQUENT_) # define Q_OS_DYNIX #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ # define Q_OS_SCO #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ # define Q_OS_UNIXWARE # define Q_OS_UNIXWARE7 #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ # define Q_OS_UNIXWARE # define Q_OS_UNIXWARE7 #else # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" #endif #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) -# define Q_OS_MAC +/* This hack forces the generater to compile qmake not for maxosx native. It is + * compiled for Linux and generates usual makefiles.. + * Does anyone has a better solution for this ? (eilers) + */ +// # define Q_OS_MAC +#define Q_OS_LINUX +#warning "boeser Hack !! (se)" +#undef Q_OS_MACX #endif #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) # undef Q_OS_UNIX #elif !defined(Q_OS_UNIX) # define Q_OS_UNIX #endif /* The compiler, must be one of: (Q_CC_x) SYM - Symantec C++ for both PC and Macintosh MPW - MPW C++ MWERKS - Metrowerks CodeWarrior MSVC - Microsoft Visual C/C++ BOR - Borland/Turbo C++ WAT - Watcom C++ GNU - GNU C++ COMEAU - Comeau C++ EDG - Edison Design Group C++ OC - CenterLine C++ SUN - Sun WorkShop, Forte Developer, or Sun ONE Studio C++ MIPS - MIPSpro C++ DEC - DEC C++ HP - HPUX C++ HPACC - HPUX ANSI C++ USLC - SCO OUDK, UDK, and UnixWare 2.X C++ CDS - Reliant C++ KAI - KAI C++ INTEL - Intel C++ HIGHC - MetaWare High C/C++ PGI - Portland Group C++ GHS - Green Hills Optimizing C++ Compilers Should be sorted most to least authoritative. */ /* Symantec C++ is now Digital Mars */ #if defined(__DMC__) || defined(__SC__) # define Q_CC_SYM /* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ # if defined(__SC__) && __SC__ < 0x750 # define Q_NO_EXPLICIT_KEYWORD # endif # define Q_NO_USING_KEYWORD # if !defined(_CPPUNWIND) # define Q_NO_EXCEPTIONS # endif #elif defined(applec) # define Q_CC_MPW # define Q_NO_BOOL_TYPE # define Q_NO_EXPLICIT_KEYWORD # define Q_NO_USING_KEYWORD #elif defined(__MWERKS__) # define Q_CC_MWERKS /* "explicit" recognized since 4.0d1 */ # define QMAC_PASCAL pascal # define Q_NO_USING_KEYWORD /* ### check "using" status */ #elif defined(_MSC_VER) # define Q_CC_MSVC diff --git a/qt/qt-2.3.7.patch/qte237-all-macosx.patch b/qt/qt-2.3.7.patch/qte237-all-macosx.patch new file mode 100644 index 0000000..82ed530 --- a/dev/null +++ b/qt/qt-2.3.7.patch/qte237-all-macosx.patch @@ -0,0 +1,1161 @@ +diff -ru qte-2.3.7_orig/include/qapplication.h qte-2.3.7/include/qapplication.h +--- qte-2.3.7_orig/include/qapplication.h Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/include/qapplication.h Mon Oct 27 14:21:28 2003 +@@ -61,6 +61,10 @@ + class QSemaphore; + #endif + ++#if !defined( QT_WEAK_SYMBOL ) ++#define QT_WEAK_SYMBOL ++#endif ++ + // REMOVE IN 3.0 (just here for moc source compatibility) + #define QNonBaseApplication QApplication + +@@ -85,7 +89,10 @@ + + #ifndef QT_NO_STYLE + static QStyle &style(); +- static void setStyle( QStyle* ); ++ static void setStyle( QStyle* ) QT_WEAK_SYMBOL; ++private: ++ static void setStyle_NonWeak( QStyle* ); ++public: + #endif + #if 1 /* OBSOLETE */ + enum ColorMode { NormalColors, CustomColors }; +@@ -106,11 +113,19 @@ + #ifndef QT_NO_PALETTE + static QPalette palette( const QWidget* = 0 ); + static void setPalette( const QPalette &, bool informWidgets=FALSE, ++ const char* className = 0 ) QT_WEAK_SYMBOL; ++private: ++ static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, + const char* className = 0 ); ++public: + #endif + static QFont font( const QWidget* = 0 ); + static void setFont( const QFont &, bool informWidgets=FALSE, ++ const char* className = 0 ) QT_WEAK_SYMBOL; ++private: ++ static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, + const char* className = 0 ); ++public: + static QFontMetrics fontMetrics(); + + QWidget *mainWidget() const; +@@ -207,7 +222,10 @@ + void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); + #ifndef QT_NO_QWS_MANAGER + static QWSDecoration &qwsDecoration(); +- static void qwsSetDecoration( QWSDecoration *); ++ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; ++private: ++ static void qwsSetDecoration_NonWeak( QWSDecoration *); ++public: + #endif + #endif + +Only in qte-2.3.7/include: qconfig-qpe.h +diff -ru qte-2.3.7_orig/include/qconfig.h qte-2.3.7/include/qconfig.h +--- qte-2.3.7_orig/include/qconfig.h Fri Jan 26 14:43:06 2001 ++++ qte-2.3.7/include/qconfig.h Wed Oct 29 22:13:16 2003 +@@ -1,3 +1,26 @@ ++// Copied from qconfig-qpe.h ++/********************************************************************** ++** Copyright (C) 2000 Trolltech AS. All rights reserved. ++** ++** This file is part of Qtopia Environment. ++** ++** This file may be distributed and/or modified under the terms of the ++** GNU General Public License version 2 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. ++** ++** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ++** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ++** ++** See http://www.trolltech.com/gpl/ for GPL licensing information. ++** ++** Contact info@trolltech.com if any conditions of this licensing are ++** not clear to you. ++** ++**********************************************************************/ ++#ifndef QT_H ++#endif // QT_H ++ + // Empty leaves all features enabled. See doc/html/features.html for choices. + + // Note that disabling some features will produce a libqt that is not +@@ -8,3 +31,69 @@ + #ifndef QT_DLL + #define QT_DLL // Internal + #endif ++ ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) ++# define QT_NO_QWS_CURSOR ++# define QT_NO_QWS_MOUSE_AUTO ++#endif ++#ifndef QT_NO_CODECS ++#define QT_NO_CODECS ++#endif ++#define QT_NO_UNICODETABLES ++//#define QT_NO_IMAGEIO_BMP ++#define QT_NO_IMAGEIO_PPM ++//#define QT_NO_ASYNC_IO ++//#define QT_NO_ASYNC_IMAGE_IO ++#define QT_NO_FREETYPE ++#define QT_NO_BDF ++//#define QT_NO_FONTDATABASE ++#define QT_NO_DRAGANDDROP ++//#define QT_NO_CLIPBOARD ++#define QT_NO_PROPERTIES ++#define QT_NO_NETWORKPROTOCOL ++ ++#define QT_NO_IMAGE_TEXT ++ ++//#define QT_NO_TOOLTIP ++#define QT_NO_COLORNAMES ++#define QT_NO_TRANSFORMATIONS ++#define QT_NO_TRANSLATION_BUILDER ++#define QT_NO_COMPLEXTEXT ++#define QT_NO_PRINTER ++#define QT_NO_PICTURE ++//#define QT_NO_ICONVIEW ++#define QT_NO_DIAL ++#define QT_NO_SIZEGRIP ++#define QT_NO_WORKSPACE ++//#define QT_NO_TABLE ++//#define QT_NO_ACTION ++//#define QT_NO_SETTINGS ++#define QT_NO_STYLE_POCKETPC ++#ifndef QT_NO_STYLE_AQUA ++# define QT_NO_STYLE_AQUA ++#endif ++#define QT_NO_STYLE_MOTIF ++#define QT_NO_STYLE_PLATINUM ++#define QT_NO_FILEDIALOG ++#define QT_NO_FONTDIALOG ++#define QT_NO_PRINTDIALOG ++#define QT_NO_COLORDIALOG ++#define QT_NO_INPUTDIALOG ++//#define QT_NO_MESSAGEBOX ++#define QT_NO_PROGRESSDIALOG ++//#define QT_NO_TABDIALOG ++#define QT_NO_WIZARD ++#define QT_NO_EFFECTS ++//#define QT_NO_COMPONENT ++#define QT_NO_DOM ++#define QT_NO_SEMIMODAL ++//#define QT_NO_PROGRESSBAR ++#define QT_NO_SPLITTER ++ ++//#define QT_NO_QWS_SAVEFONTS ++//#define QT_NO_QWS_PROPERTIES ++ ++#define QT_NO_QWS_BEOS_WM_STYLE ++#define QT_NO_QWS_KDE2_WM_STYLE ++#define QT_NO_QWS_KDE_WM_STYLE ++#define QT_NO_QWS_WINDOWS_WM_STYLE +diff -ru qte-2.3.7_orig/include/qfontdatabase.h qte-2.3.7/include/qfontdatabase.h +--- qte-2.3.7_orig/include/qfontdatabase.h Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/include/qfontdatabase.h Mon Oct 27 14:21:28 2003 +@@ -59,6 +59,10 @@ + class QDiskFont; + #endif + ++#if !defined( QT_WEAK_SYMBOL ) ++#define QT_WEAK_SYMBOL ++#endif ++ + class QFontDatabasePrivate; + + class Q_EXPORT QFontDatabase +@@ -67,9 +71,16 @@ + QFontDatabase(); + + QStringList families( bool onlyForLocale = TRUE ) const; ++ ++ + QValueList<int> pointSizes( const QString &family, + const QString &style = QString::null, +- const QString &charSet = QString::null ); ++ const QString &charSet = QString::null ) QT_WEAK_SYMBOL; ++private: ++ QValueList<int> pointSizes_NonWeak( const QString &family, ++ const QString &style, ++ const QString &charSet ); ++public: + QStringList styles( const QString &family, + const QString &charSet = QString::null ) const; + QStringList charSets( const QString &familyName, +Only in qte-2.3.7_orig/include: qgifimageformat_p.h +diff -ru qte-2.3.7_orig/include/qmodules.h qte-2.3.7/include/qmodules.h +--- qte-2.3.7_orig/include/qmodules.h Fri Aug 31 17:00:56 2001 ++++ qte-2.3.7/include/qmodules.h Wed Oct 29 21:57:53 2003 +@@ -1,14 +1,12 @@ +-#ifndef QT_H +-#endif // QT_H +- ++// These modules are licensed to you + #define QT_MODULE_TOOLS + #define QT_MODULE_KERNEL + #define QT_MODULE_WIDGETS + #define QT_MODULE_DIALOGS +- + #define QT_MODULE_ICONVIEW + #define QT_MODULE_WORKSPACE +-#define QT_MODULE_TABLE ++#define QT_MODULE_NETWORK + #define QT_MODULE_CANVAS ++#define QT_MODULE_TABLE + #define QT_MODULE_XML +-#define QT_MODULE_NETWORK ++#define QT_MODULE_OPENGL +Only in qte-2.3.7_orig/include: qxt.h +Only in qte-2.3.7/lib: libqte.dylib +Only in qte-2.3.7/lib: libqte.dylib.2 +Only in qte-2.3.7/lib: libqte.dylib.2.3 +Only in qte-2.3.7/lib: libqte.dylib.2.3.7 +Only in qte-2.3.7/src/3rdparty/kernel: qgifimageformat.o +Only in qte-2.3.7/src/3rdparty/kernel: qpointarray.o +Only in qte-2.3.7/src/3rdparty/kernel: qpolygonscanner.o +Only in qte-2.3.7/src/3rdparty/kernel: qregion_qws.o +Only in qte-2.3.7/src/3rdparty/libpng: png.o +Only in qte-2.3.7/src/3rdparty/libpng: pngerror.o +Only in qte-2.3.7/src/3rdparty/libpng: pngget.o +Only in qte-2.3.7/src/3rdparty/libpng: pngmem.o +Only in qte-2.3.7/src/3rdparty/libpng: pngpread.o +Only in qte-2.3.7/src/3rdparty/libpng: pngread.o +Only in qte-2.3.7/src/3rdparty/libpng: pngrio.o +Only in qte-2.3.7/src/3rdparty/libpng: pngrtran.o +Only in qte-2.3.7/src/3rdparty/libpng: pngrutil.o +Only in qte-2.3.7/src/3rdparty/libpng: pngset.o +Only in qte-2.3.7/src/3rdparty/libpng: pngtrans.o +Only in qte-2.3.7/src/3rdparty/libpng: pngwio.o +Only in qte-2.3.7/src/3rdparty/libpng: pngwrite.o +Only in qte-2.3.7/src/3rdparty/libpng: pngwtran.o +Only in qte-2.3.7/src/3rdparty/libpng: pngwutil.o +Only in qte-2.3.7/src/3rdparty/tools: qbig5codec.o +Only in qte-2.3.7/src/3rdparty/tools: qeucjpcodec.o +Only in qte-2.3.7/src/3rdparty/tools: qeuckrcodec.o +Only in qte-2.3.7/src/3rdparty/tools: qgbkcodec.o +Only in qte-2.3.7/src/3rdparty/tools: qjiscodec.o +Only in qte-2.3.7/src/3rdparty/tools: qjpunicode.o +Only in qte-2.3.7/src/3rdparty/tools: qrtlcodec.o +Only in qte-2.3.7/src/3rdparty/tools: qsjiscodec.o +Only in qte-2.3.7/src/3rdparty/tools: qtsciicodec.o +Only in qte-2.3.7/src/3rdparty/zlib: Makefile +Only in qte-2.3.7/src/3rdparty/zlib: adler32.o +Only in qte-2.3.7/src/3rdparty/zlib: compress.o +Only in qte-2.3.7/src/3rdparty/zlib: crc32.o +Only in qte-2.3.7/src/3rdparty/zlib: deflate.o +Only in qte-2.3.7/src/3rdparty/zlib: gzio.o +Only in qte-2.3.7/src/3rdparty/zlib: infblock.o +Only in qte-2.3.7/src/3rdparty/zlib: infcodes.o +Only in qte-2.3.7/src/3rdparty/zlib: inffast.o +Only in qte-2.3.7/src/3rdparty/zlib: inflate.o +Only in qte-2.3.7/src/3rdparty/zlib: inftrees.o +Only in qte-2.3.7/src/3rdparty/zlib: infutil.o +Only in qte-2.3.7/src/3rdparty/zlib: trees.o +Only in qte-2.3.7/src/3rdparty/zlib: uncompr.o +Only in qte-2.3.7/src/3rdparty/zlib: zutil.o +Only in qte-2.3.7/src: Makefile +Only in qte-2.3.7/src: allmoc.cpp +Only in qte-2.3.7/src: allmoc.o +Only in qte-2.3.7/src/canvas: qcanvas.o +Only in qte-2.3.7/src/dialogs: qcolordialog.moc +Only in qte-2.3.7/src/dialogs: qcolordialog.o +Only in qte-2.3.7/src/dialogs: qfiledialog.moc +Only in qte-2.3.7/src/dialogs: qfiledialog.o +Only in qte-2.3.7/src/dialogs: qfontdialog.o +Only in qte-2.3.7/src/dialogs: qinputdialog.o +Only in qte-2.3.7/src/dialogs: qmessagebox.o +Only in qte-2.3.7/src/dialogs: qprintdialog.o +Only in qte-2.3.7/src/dialogs: qprogressdialog.o +Only in qte-2.3.7/src/dialogs: qtabdialog.o +Only in qte-2.3.7/src/dialogs: qwizard.o +Only in qte-2.3.7/src/iconview: qiconview.o +Only in qte-2.3.7/src/kernel: qabstractlayout.o +Only in qte-2.3.7/src/kernel: qaccel.o +diff -ru qte-2.3.7_orig/src/kernel/qapplication.cpp qte-2.3.7/src/kernel/qapplication.cpp +--- qte-2.3.7_orig/src/kernel/qapplication.cpp Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qapplication.cpp Mon Oct 27 14:21:28 2003 +@@ -35,6 +35,8 @@ + ** + **********************************************************************/ + ++#define QT_WEAK_SYMBOL __attribute__(( weak )) ++ + #include "qobjectlist.h" + #include "qobjectdict.h" + #include "qapplication.h" +@@ -933,11 +935,16 @@ + #ifndef QT_NO_STYLE + void QApplication::setStyle( QStyle *style ) + { ++ setStyle_NonWeak ( style ); ++} ++ ++void QApplication::setStyle_NonWeak( QStyle *style ) ++{ + QStyle* old = app_style; +- app_style = style; + + if ( startingUp() ) { + delete old; ++ app_style = style; + return; + } + +@@ -958,6 +965,8 @@ + old->unPolish( qApp ); + } + ++ app_style = style; ++ + // take care of possible palette requirements of certain gui + // styles. Do it before polishing the application since the style + // might call QApplication::setStyle() itself +@@ -1184,13 +1193,30 @@ + \sa QWidget::setPalette(), palette(), QStyle::polish() + */ + +-void QApplication::setPalette( const QPalette &palette, bool informWidgets, ++void QApplication::setPalette ( const QPalette &palette, bool informWidgets, ++ const char* className ) ++{ ++ setPalette_NonWeak ( palette, informWidgets, className ); ++} ++ ++void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets, + const char* className ) + { + QPalette pal = palette; + #ifndef QT_NO_STYLE +- if ( !startingUp() ) ++ if ( !startingUp() ) { + qApp->style().polish( pal ); // NB: non-const reference ++ if ( className ) { ++ // if we just polished a class specific palette (this normally ++ // only called by qt_fix_tooltips - see below), we better re- ++ // polish the global palette. Some styles like liquid can get ++ // confused, because they can not detect if the polished palette ++ // is the global one or only a class specific one. ++ // (liquid uses this palette to calculate blending pixmaps) ++ QPalette p = qApp-> palette ( ); ++ qApp->style().polish ( p ); ++ } ++ } + #endif + bool all = FALSE; + if ( !className ) { +@@ -1273,6 +1299,12 @@ + */ + + void QApplication::setFont( const QFont &font, bool informWidgets, ++ const char* className ) ++{ ++ setFont_NonWeak ( font, informWidgets, className ); ++} ++ ++void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets, + const char* className ) + { + bool all = FALSE; +diff -ru qte-2.3.7_orig/src/kernel/qapplication.h qte-2.3.7/src/kernel/qapplication.h +--- qte-2.3.7_orig/src/kernel/qapplication.h Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qapplication.h Mon Oct 27 14:21:28 2003 +@@ -61,6 +61,10 @@ + class QSemaphore; + #endif + ++#if !defined( QT_WEAK_SYMBOL ) ++#define QT_WEAK_SYMBOL ++#endif ++ + // REMOVE IN 3.0 (just here for moc source compatibility) + #define QNonBaseApplication QApplication + +@@ -85,7 +89,10 @@ + + #ifndef QT_NO_STYLE + static QStyle &style(); +- static void setStyle( QStyle* ); ++ static void setStyle( QStyle* ) QT_WEAK_SYMBOL; ++private: ++ static void setStyle_NonWeak( QStyle* ); ++public: + #endif + #if 1 /* OBSOLETE */ + enum ColorMode { NormalColors, CustomColors }; +@@ -106,11 +113,19 @@ + #ifndef QT_NO_PALETTE + static QPalette palette( const QWidget* = 0 ); + static void setPalette( const QPalette &, bool informWidgets=FALSE, ++ const char* className = 0 ) QT_WEAK_SYMBOL; ++private: ++ static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, + const char* className = 0 ); ++public: + #endif + static QFont font( const QWidget* = 0 ); + static void setFont( const QFont &, bool informWidgets=FALSE, ++ const char* className = 0 ) QT_WEAK_SYMBOL; ++private: ++ static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, + const char* className = 0 ); ++public: + static QFontMetrics fontMetrics(); + + QWidget *mainWidget() const; +@@ -207,7 +222,10 @@ + void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); + #ifndef QT_NO_QWS_MANAGER + static QWSDecoration &qwsDecoration(); +- static void qwsSetDecoration( QWSDecoration *); ++ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; ++private: ++ static void qwsSetDecoration_NonWeak( QWSDecoration *); ++public: + #endif + #endif + +Only in qte-2.3.7/src/kernel: qapplication.o +diff -ru qte-2.3.7_orig/src/kernel/qapplication_qws.cpp qte-2.3.7/src/kernel/qapplication_qws.cpp +--- qte-2.3.7_orig/src/kernel/qapplication_qws.cpp Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qapplication_qws.cpp Mon Oct 27 14:21:28 2003 +@@ -2804,6 +2804,11 @@ + */ + void QApplication::qwsSetDecoration( QWSDecoration *d ) + { ++ qwsSetDecoration_NonWeak ( d ); ++} ++ ++void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d ) ++{ + if ( d ) { + delete qws_decoration; + qws_decoration = d; +Only in qte-2.3.7/src/kernel: qapplication_qws.cpp~ +Only in qte-2.3.7/src/kernel: qapplication_qws.o +Only in qte-2.3.7/src/kernel: qasyncimageio.o +Only in qte-2.3.7/src/kernel: qasyncio.o +Only in qte-2.3.7/src/kernel: qbitmap.o +Only in qte-2.3.7/src/kernel: qclipboard.o +Only in qte-2.3.7/src/kernel: qclipboard_qws.o +Only in qte-2.3.7/src/kernel: qcolor.o +Only in qte-2.3.7/src/kernel: qcolor_p.o +Only in qte-2.3.7/src/kernel: qcolor_qws.o +Only in qte-2.3.7/src/kernel: qconnection.o +Only in qte-2.3.7/src/kernel: qcopchannel_qws.moc +Only in qte-2.3.7/src/kernel: qcopchannel_qws.o +Only in qte-2.3.7/src/kernel: qcursor.o +Only in qte-2.3.7/src/kernel: qcursor_qws.o +Only in qte-2.3.7/src/kernel: qdialog.o +Only in qte-2.3.7/src/kernel: qdirectpainter_qws.o +Only in qte-2.3.7/src/kernel: qdnd_qws.o +Only in qte-2.3.7/src/kernel: qdragobject.o +Only in qte-2.3.7/src/kernel: qdrawutil.o +Only in qte-2.3.7/src/kernel: qdropsite.o +Only in qte-2.3.7/src/kernel: qevent.o +Only in qte-2.3.7/src/kernel: qfocusdata.o +Only in qte-2.3.7/src/kernel: qfont.o +Only in qte-2.3.7/src/kernel: qfont_qws.o +diff -ru qte-2.3.7_orig/src/kernel/qfontdatabase.cpp qte-2.3.7/src/kernel/qfontdatabase.cpp +--- qte-2.3.7_orig/src/kernel/qfontdatabase.cpp Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qfontdatabase.cpp Mon Oct 27 14:21:28 2003 +@@ -35,6 +35,8 @@ + ** + **********************************************************************/ + ++#define QT_WEAK_SYMBOL __attribute__(( weak )) ++ + #include "qfontdatabase.h" + + #ifndef QT_NO_FONTDATABASE +@@ -2421,6 +2423,13 @@ + */ + + QValueList<int> QFontDatabase::pointSizes( const QString &family, ++ const QString &style, ++ const QString &charSet ) ++{ ++ return pointSizes_NonWeak ( family, style, charSet ); ++} ++ ++QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family, + const QString &style, + const QString &charSet ) + { +diff -ru qte-2.3.7_orig/src/kernel/qfontdatabase.h qte-2.3.7/src/kernel/qfontdatabase.h +--- qte-2.3.7_orig/src/kernel/qfontdatabase.h Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qfontdatabase.h Mon Oct 27 14:21:28 2003 +@@ -59,6 +59,10 @@ + class QDiskFont; + #endif + ++#if !defined( QT_WEAK_SYMBOL ) ++#define QT_WEAK_SYMBOL ++#endif ++ + class QFontDatabasePrivate; + + class Q_EXPORT QFontDatabase +@@ -67,9 +71,16 @@ + QFontDatabase(); + + QStringList families( bool onlyForLocale = TRUE ) const; ++ ++ + QValueList<int> pointSizes( const QString &family, + const QString &style = QString::null, +- const QString &charSet = QString::null ); ++ const QString &charSet = QString::null ) QT_WEAK_SYMBOL; ++private: ++ QValueList<int> pointSizes_NonWeak( const QString &family, ++ const QString &style, ++ const QString &charSet ); ++public: + QStringList styles( const QString &family, + const QString &charSet = QString::null ) const; + QStringList charSets( const QString &familyName, +Only in qte-2.3.7/src/kernel: qfontdatabase.o +Only in qte-2.3.7/src/kernel: qfontfactorybdf_qws.o +Only in qte-2.3.7/src/kernel: qfontfactoryttf_qws.o +Only in qte-2.3.7/src/kernel: qfontmanager_qws.o +diff -ru qte-2.3.7_orig/src/kernel/qgfx_qws.cpp qte-2.3.7/src/kernel/qgfx_qws.cpp +--- qte-2.3.7_orig/src/kernel/qgfx_qws.cpp Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qgfx_qws.cpp Mon Oct 27 14:27:25 2003 +@@ -32,7 +32,7 @@ + #include "qgfx_qws.h" + + #include <stdio.h> +-#include <dlfcn.h> ++//#include <dlfcn.h> + #include <sys/types.h> + #include <dirent.h> + #include <stdlib.h> +Only in qte-2.3.7/src/kernel: qgfx_qws.o +diff -ru qte-2.3.7_orig/src/kernel/qgfxraster_qws.cpp qte-2.3.7/src/kernel/qgfxraster_qws.cpp +--- qte-2.3.7_orig/src/kernel/qgfxraster_qws.cpp Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qgfxraster_qws.cpp Mon Oct 27 14:27:25 2003 +@@ -75,7 +75,11 @@ + # if __BYTE_ORDER == __BIG_ENDIAN + # define QWS_BIG_ENDIAN + # endif ++#elif defined(__APPLE__) ++# define QWS_BIG_ENDIAN + #endif ++// AJ: the above (test for __APPLE__) is very hacky, but I can't ++// think of something better at the moment. + + // Pull this private function in from qglobal.cpp + extern unsigned int qt_int_sqrt( unsigned int n ); +@@ -3770,6 +3774,19 @@ + b = srcval & 0xff; + + unsigned char * tmp=(unsigned char *)&alphabuf[loopc]; ++# ifdef QWS_BIG_ENDIAN ++ if(av==255) { ++ // Do nothing - we already have source values in r,g,b ++ } else if(av==0) { ++ r = *(tmp+1); ++ g = *(tmp+2); ++ b = *(tmp+3); ++ } else { ++ r = ((r-*(tmp+1)) * av) / 256 + *(tmp+1); ++ g = ((g-*(tmp+2)) * av) / 256 + *(tmp+2); ++ b = ((b-*(tmp+3)) * av) / 256 + *(tmp+3); ++ } ++# else + if(av==255) { + // Do nothing - we already have source values in r,g,b + } else if(av==0) { +@@ -3781,6 +3798,7 @@ + g = ((g-*(tmp+1)) * av) / 256 + *(tmp+1); + b = ((b-*(tmp+0)) * av) / 256 + *(tmp+0); + } ++# endif + *(alphaptr++) = (r << 16) | (g << 8) | b; + } + +@@ -4204,7 +4222,7 @@ + + } else if ( depth == 1 ) { + if (srctype==SourceImage) { +- static int warn; ++ static int warn = 0; + if ( warn++ < 5 ) + qDebug( "bitmap alpha-image not implemented" ); + hImageLineUnclipped( x1, x2, l, srcdata, FALSE ); +@@ -4237,7 +4255,7 @@ + setAlphaType(IgnoreAlpha); + if ( w <= 0 || h <= 0 || !ncliprect ) return; + GFX_START(QRect(rx+xoffs, ry+yoffs, w+1, h+1)) +-#ifdef QWS_EXPERIMENTAL_FASTPATH ++#if 0 // def QWS_EXPERIMENTAL_FASTPATH !! this is crashing HancomWord on OZ !! + // ### fix for 8bpp + // This seems to be reliable now, at least for 16bpp + +Only in qte-2.3.7/src/kernel: qgfxraster_qws.cpp~ +Only in qte-2.3.7/src/kernel: qgfxraster_qws.o +Only in qte-2.3.7/src/kernel: qguardedptr.o +Only in qte-2.3.7/src/kernel: qiconset.o +Only in qte-2.3.7/src/kernel: qimage.o +Only in qte-2.3.7/src/kernel: qinputcontext_qws.o +Only in qte-2.3.7/src/kernel: qjpegio.o +diff -ru qte-2.3.7_orig/src/kernel/qkeyboard_qws.cpp qte-2.3.7/src/kernel/qkeyboard_qws.cpp +--- qte-2.3.7_orig/src/kernel/qkeyboard_qws.cpp Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qkeyboard_qws.cpp Mon Oct 27 14:42:11 2003 +@@ -69,7 +69,7 @@ + #if !defined(_OS_QNX6_) + + #include <termios.h> +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + #include <sys/kd.h> + #include <sys/vt.h> + #endif +@@ -468,10 +468,12 @@ + void QWSPC101KeyboardHandler::restoreLeds() + { + char leds; ++#if !defined(_OS_MACX_) + ioctl(0, KDGETLED, &leds); + leds = leds & ~LED_CAP; + if ( caps ) leds |= LED_CAP; + ioctl(0, KDSETLED, leds); ++#endif + } + + class QWSTtyKeyboardHandler : public QWSPC101KeyboardHandler +@@ -547,7 +549,7 @@ + + static void vtSwitchHandler(int /*sig*/) + { +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + if (vtActive) { + qwsServer->enablePainting(false); + qt_screen->save(); +@@ -880,7 +882,7 @@ + if (term && !release) { + ctrl = false; + alt = false; +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + ioctl(kbdFD, VT_ACTIVATE, term); + #endif + return; +@@ -1031,7 +1033,7 @@ + struct termios termdata; + tcgetattr( kbdFD, &termdata ); + +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + ioctl(kbdFD, KDSKBMODE, K_RAW); + #endif + +@@ -1047,7 +1049,7 @@ + + signal(VTSWITCHSIG, vtSwitchHandler); + +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + struct vt_mode vtMode; + ioctl(kbdFD, VT_GETMODE, &vtMode); + +@@ -1068,7 +1070,7 @@ + { + if (kbdFD >= 0) + { +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + ioctl(kbdFD, KDSKBMODE, K_XLATE); + #endif + tcsetattr(kbdFD, TCSANOW, &origTermData); +Only in qte-2.3.7/src/kernel: qkeyboard_qws.cpp.rej +Only in qte-2.3.7/src/kernel: qkeyboard_qws.cpp~ +Only in qte-2.3.7/src/kernel: qkeyboard_qws.moc +Only in qte-2.3.7/src/kernel: qkeyboard_qws.o +Only in qte-2.3.7/src/kernel: qlayout.o +Only in qte-2.3.7/src/kernel: qlayoutengine.o +Only in qte-2.3.7/src/kernel: qlocalfs.o +diff -ru qte-2.3.7_orig/src/kernel/qlock_qws.cpp qte-2.3.7/src/kernel/qlock_qws.cpp +--- qte-2.3.7_orig/src/kernel/qlock_qws.cpp Thu Jul 17 03:20:25 2003 ++++ qte-2.3.7/src/kernel/qlock_qws.cpp Mon Oct 27 14:27:25 2003 +@@ -38,7 +38,7 @@ + #include <errno.h> + + #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) \ +- || defined _OS_FREEBSD_ ++ || defined(_OS_FREEBSD_) || defined(_OS_MACX_) + /* union semun is defined by including <sys/sem.h> */ + #else + /* according to X/OPEN we have to define it ourselves */ +Only in qte-2.3.7/src/kernel: qlock_qws.o +Only in qte-2.3.7/src/kernel: qmemorymanager_qws.o +Only in qte-2.3.7/src/kernel: qmetaobject.o +Only in qte-2.3.7/src/kernel: qmime.o +Only in qte-2.3.7/src/kernel: qmngio.o +Only in qte-2.3.7/src/kernel: qmovie.moc +Only in qte-2.3.7/src/kernel: qmovie.o +Only in qte-2.3.7/src/kernel: qnetworkprotocol.o +Only in qte-2.3.7/src/kernel: qobject.o +Only in qte-2.3.7/src/kernel: qpaintdevice_qws.o +Only in qte-2.3.7/src/kernel: qpaintdevicemetrics.o +Only in qte-2.3.7/src/kernel: qpainter.o +Only in qte-2.3.7/src/kernel: qpainter_qws.o +Only in qte-2.3.7/src/kernel: qpalette.o +Only in qte-2.3.7/src/kernel: qpicture.o +Only in qte-2.3.7/src/kernel: qpixmap.o +Only in qte-2.3.7/src/kernel: qpixmap_qws.o +Only in qte-2.3.7/src/kernel: qpixmapcache.o +Only in qte-2.3.7/src/kernel: qpngio.o +Only in qte-2.3.7/src/kernel: qpoint.o +Only in qte-2.3.7/src/kernel: qprinter.o +Only in qte-2.3.7/src/kernel: qprinter_qws.o +Only in qte-2.3.7/src/kernel: qpsprinter.o +Only in qte-2.3.7/src/kernel: qrect.o +Only in qte-2.3.7/src/kernel: qregion.o +Only in qte-2.3.7/src/kernel: qrichtext.o +Only in qte-2.3.7/src/kernel: qsemimodal.o +Only in qte-2.3.7/src/kernel: qsharedmemory.o +Only in qte-2.3.7/src/kernel: qsignal.o +Only in qte-2.3.7/src/kernel: qsignalmapper.o +Only in qte-2.3.7/src/kernel: qsimplerichtext.o +Only in qte-2.3.7/src/kernel: qsize.o +Only in qte-2.3.7/src/kernel: qsizegrip.o +Only in qte-2.3.7/src/kernel: qsocketnotifier.o +Only in qte-2.3.7/src/kernel: qsound.o +Only in qte-2.3.7/src/kernel: qsound_qws.o +Only in qte-2.3.7/src/kernel: qsoundqss_qws.moc +Only in qte-2.3.7/src/kernel: qsoundqss_qws.o +Only in qte-2.3.7/src/kernel: qstyle.o +Only in qte-2.3.7/src/kernel: qstylesheet.o +Only in qte-2.3.7/src/kernel: qthread_unix.moc +Only in qte-2.3.7/src/kernel: qthread_unix.o +Only in qte-2.3.7/src/kernel: qtimer.o +Only in qte-2.3.7/src/kernel: qtranslator.o +Only in qte-2.3.7/src/kernel: qurl.o +Only in qte-2.3.7/src/kernel: qurlinfo.o +Only in qte-2.3.7/src/kernel: qurloperator.o +Only in qte-2.3.7/src/kernel: qvariant.o +Only in qte-2.3.7/src/kernel: qwidget.o +Only in qte-2.3.7/src/kernel: qwidget_qws.o +diff -ru qte-2.3.7_orig/src/kernel/qwindowsystem_qws.cpp qte-2.3.7/src/kernel/qwindowsystem_qws.cpp +--- qte-2.3.7_orig/src/kernel/qwindowsystem_qws.cpp Thu Jul 17 03:20:26 2003 ++++ qte-2.3.7/src/kernel/qwindowsystem_qws.cpp Mon Oct 27 14:27:25 2003 +@@ -844,6 +844,18 @@ + { + } + ++static void catchSegvSignal( int ) ++{ ++#ifndef QT_NO_QWS_KEYBOARD ++ if ( qwsServer ) ++ qwsServer->closeKeyboard(); ++#endif ++ QWSServer::closedown(); ++ fprintf(stderr, "Segmentation fault.\n"); ++ exit(1); ++} ++ ++ + /*! + \class QWSServer qwindowsystem_qws.h + \brief Server-specific functionality in Qt/Embedded +@@ -936,6 +948,7 @@ + } + + signal(SIGPIPE, ignoreSignal); //we get it when we read ++ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash + #endif + focusw = 0; + mouseGrabber = 0; +@@ -950,7 +963,7 @@ + + #ifndef QT_NO_QWS_MULTIPROCESS + if ( !geteuid() ) { +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + if( mount(0, "/var/shm", "shm", 0, 0) ) { + /* This just confuses people with 2.2 kernels + if ( errno != EBUSY ) +Only in qte-2.3.7/src/kernel: qwindowsystem_qws.cpp~ +Only in qte-2.3.7/src/kernel: qwindowsystem_qws.o +Only in qte-2.3.7/src/kernel: qwmatrix.o +Only in qte-2.3.7/src/kernel: qwsbeosdecoration_qws.o +Only in qte-2.3.7/src/kernel: qwscommand_qws.o +Only in qte-2.3.7/src/kernel: qwscursor_qws.o +Only in qte-2.3.7/src/kernel: qwsdecoration_qws.o +Only in qte-2.3.7/src/kernel: qwsdefaultdecoration_qws.o +Only in qte-2.3.7/src/kernel: qwsevent_qws.o +Only in qte-2.3.7/src/kernel: qwshydrodecoration_qws.o +Only in qte-2.3.7/src/kernel: qwskde2decoration_qws.o +Only in qte-2.3.7/src/kernel: qwskdedecoration_qws.o +Only in qte-2.3.7/src/kernel: qwsmanager_qws.o +diff -ru qte-2.3.7_orig/src/kernel/qwsmouse_qws.cpp qte-2.3.7/src/kernel/qwsmouse_qws.cpp +--- qte-2.3.7_orig/src/kernel/qwsmouse_qws.cpp Thu Jul 17 03:20:26 2003 ++++ qte-2.3.7/src/kernel/qwsmouse_qws.cpp Mon Oct 27 14:27:25 2003 +@@ -336,7 +336,7 @@ + tty.c_oflag = 0; + tty.c_lflag = 0; + tty.c_cflag = f | CREAD | CLOCAL | HUPCL; +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + tty.c_line = 0; + #endif + tty.c_cc[VTIME] = 0; +@@ -889,7 +889,7 @@ + tty.c_iflag = IGNBRK | IGNPAR; + tty.c_oflag = 0; + tty.c_lflag = 0; +-#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) ++#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) + tty.c_line = 0; + #endif // _OS_FREEBSD_ + tty.c_cc[VTIME] = 0; +Only in qte-2.3.7/src/kernel: qwsmouse_qws.moc +Only in qte-2.3.7/src/kernel: qwsmouse_qws.o +Only in qte-2.3.7/src/kernel: qwsproperty_qws.o +Only in qte-2.3.7/src/kernel: qwsregionmanager_qws.o +Only in qte-2.3.7/src/kernel: qwssocket_qws.o +Only in qte-2.3.7/src/kernel: qwswindowsdecoration_qws.o +Only in qte-2.3.7/src/moc: Makefile +Only in qte-2.3.7/src/moc: moc +Only in qte-2.3.7/src/moc: mocgen.o +Only in qte-2.3.7/src/moc: qbuffer.o +Only in qte-2.3.7/src/moc: qcollection.o +Only in qte-2.3.7/src/moc: qcstring.o +Only in qte-2.3.7/src/moc: qdatastream.o +Only in qte-2.3.7/src/moc: qdatetime.o +Only in qte-2.3.7/src/moc: qfile.o +Only in qte-2.3.7/src/moc: qfile_unix.o +Only in qte-2.3.7/src/moc: qgarray.o +Only in qte-2.3.7/src/moc: qgdict.o +Only in qte-2.3.7/src/moc: qglist.o +Only in qte-2.3.7/src/moc: qglobal.o +Only in qte-2.3.7/src/moc: qgvector.o +Only in qte-2.3.7/src/moc: qiodevice.o +Only in qte-2.3.7/src/moc: qregexp.o +Only in qte-2.3.7/src/moc: qstring.o +Only in qte-2.3.7/src/moc: qtextcodec.o +Only in qte-2.3.7/src/moc: qtextstream.o +Only in qte-2.3.7/src/moc: qutfcodec.o +Only in qte-2.3.7/src/network: qdns.o +Only in qte-2.3.7/src/network: qftp.o +Only in qte-2.3.7/src/network: qhostaddress.o +Only in qte-2.3.7/src/network: qnetwork.o +Only in qte-2.3.7/src/network: qserversocket.o +Only in qte-2.3.7/src/network: qsocket.o +Only in qte-2.3.7/src/network: qsocketdevice.o +Only in qte-2.3.7/src/network: qsocketdevice_unix.o +Only in qte-2.3.7/src/table: qtable.o +Only in qte-2.3.7/src/tools: qbitarray.o +Only in qte-2.3.7/src/tools: qbuffer.o +Only in qte-2.3.7/src/tools: qcollection.o +Only in qte-2.3.7/src/tools: qconfig-qpe.h +Only in qte-2.3.7/src/tools: qconfig-qpe.h~ +diff -ru qte-2.3.7_orig/src/tools/qconfig.h qte-2.3.7/src/tools/qconfig.h +--- qte-2.3.7_orig/src/tools/qconfig.h Fri Jan 26 14:43:06 2001 ++++ qte-2.3.7/src/tools/qconfig.h Wed Oct 29 22:13:16 2003 +@@ -1,3 +1,26 @@ ++// Copied from qconfig-qpe.h ++/********************************************************************** ++** Copyright (C) 2000 Trolltech AS. All rights reserved. ++** ++** This file is part of Qtopia Environment. ++** ++** This file may be distributed and/or modified under the terms of the ++** GNU General Public License version 2 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. ++** ++** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ++** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ++** ++** See http://www.trolltech.com/gpl/ for GPL licensing information. ++** ++** Contact info@trolltech.com if any conditions of this licensing are ++** not clear to you. ++** ++**********************************************************************/ ++#ifndef QT_H ++#endif // QT_H ++ + // Empty leaves all features enabled. See doc/html/features.html for choices. + + // Note that disabling some features will produce a libqt that is not +@@ -8,3 +31,69 @@ + #ifndef QT_DLL + #define QT_DLL // Internal + #endif ++ ++#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) ++# define QT_NO_QWS_CURSOR ++# define QT_NO_QWS_MOUSE_AUTO ++#endif ++#ifndef QT_NO_CODECS ++#define QT_NO_CODECS ++#endif ++#define QT_NO_UNICODETABLES ++//#define QT_NO_IMAGEIO_BMP ++#define QT_NO_IMAGEIO_PPM ++//#define QT_NO_ASYNC_IO ++//#define QT_NO_ASYNC_IMAGE_IO ++#define QT_NO_FREETYPE ++#define QT_NO_BDF ++//#define QT_NO_FONTDATABASE ++#define QT_NO_DRAGANDDROP ++//#define QT_NO_CLIPBOARD ++#define QT_NO_PROPERTIES ++#define QT_NO_NETWORKPROTOCOL ++ ++#define QT_NO_IMAGE_TEXT ++ ++//#define QT_NO_TOOLTIP ++#define QT_NO_COLORNAMES ++#define QT_NO_TRANSFORMATIONS ++#define QT_NO_TRANSLATION_BUILDER ++#define QT_NO_COMPLEXTEXT ++#define QT_NO_PRINTER ++#define QT_NO_PICTURE ++//#define QT_NO_ICONVIEW ++#define QT_NO_DIAL ++#define QT_NO_SIZEGRIP ++#define QT_NO_WORKSPACE ++//#define QT_NO_TABLE ++//#define QT_NO_ACTION ++//#define QT_NO_SETTINGS ++#define QT_NO_STYLE_POCKETPC ++#ifndef QT_NO_STYLE_AQUA ++# define QT_NO_STYLE_AQUA ++#endif ++#define QT_NO_STYLE_MOTIF ++#define QT_NO_STYLE_PLATINUM ++#define QT_NO_FILEDIALOG ++#define QT_NO_FONTDIALOG ++#define QT_NO_PRINTDIALOG ++#define QT_NO_COLORDIALOG ++#define QT_NO_INPUTDIALOG ++//#define QT_NO_MESSAGEBOX ++#define QT_NO_PROGRESSDIALOG ++//#define QT_NO_TABDIALOG ++#define QT_NO_WIZARD ++#define QT_NO_EFFECTS ++//#define QT_NO_COMPONENT ++#define QT_NO_DOM ++#define QT_NO_SEMIMODAL ++//#define QT_NO_PROGRESSBAR ++#define QT_NO_SPLITTER ++ ++//#define QT_NO_QWS_SAVEFONTS ++//#define QT_NO_QWS_PROPERTIES ++ ++#define QT_NO_QWS_BEOS_WM_STYLE ++#define QT_NO_QWS_KDE2_WM_STYLE ++#define QT_NO_QWS_KDE_WM_STYLE ++#define QT_NO_QWS_WINDOWS_WM_STYLE +Only in qte-2.3.7/src/tools: qconfig.h~ +Only in qte-2.3.7/src/tools: qcstring.o +Only in qte-2.3.7/src/tools: qdatastream.o +Only in qte-2.3.7/src/tools: qdatetime.o +Only in qte-2.3.7/src/tools: qdir.o +Only in qte-2.3.7/src/tools: qdir_unix.o +Only in qte-2.3.7/src/tools: qfile.o +Only in qte-2.3.7/src/tools: qfile_unix.o +Only in qte-2.3.7/src/tools: qfileinfo.o +Only in qte-2.3.7/src/tools: qfileinfo_unix.o +Only in qte-2.3.7/src/tools: qgarray.o +Only in qte-2.3.7/src/tools: qgcache.o +Only in qte-2.3.7/src/tools: qgdict.o +Only in qte-2.3.7/src/tools: qglist.o +Only in qte-2.3.7/src/tools: qglobal.o +Only in qte-2.3.7/src/tools: qgvector.o +Only in qte-2.3.7/src/tools: qiodevice.o +Only in qte-2.3.7/src/tools: qmap.o +diff -ru qte-2.3.7_orig/src/tools/qmodules.h qte-2.3.7/src/tools/qmodules.h +--- qte-2.3.7_orig/src/tools/qmodules.h Fri Aug 31 17:00:56 2001 ++++ qte-2.3.7/src/tools/qmodules.h Wed Oct 29 21:57:53 2003 +@@ -1,14 +1,12 @@ +-#ifndef QT_H +-#endif // QT_H +- ++// These modules are licensed to you + #define QT_MODULE_TOOLS + #define QT_MODULE_KERNEL + #define QT_MODULE_WIDGETS + #define QT_MODULE_DIALOGS +- + #define QT_MODULE_ICONVIEW + #define QT_MODULE_WORKSPACE +-#define QT_MODULE_TABLE ++#define QT_MODULE_NETWORK + #define QT_MODULE_CANVAS ++#define QT_MODULE_TABLE + #define QT_MODULE_XML +-#define QT_MODULE_NETWORK ++#define QT_MODULE_OPENGL +Only in qte-2.3.7/src/tools: qregexp.o +Only in qte-2.3.7/src/tools: qstring.o +Only in qte-2.3.7/src/tools: qstringlist.o +Only in qte-2.3.7/src/tools: qtextcodec.o +Only in qte-2.3.7/src/tools: qtextstream.o +Only in qte-2.3.7/src/tools: qutfcodec.o +Only in qte-2.3.7/src/widgets: qaction.o +Only in qte-2.3.7/src/widgets: qbutton.o +Only in qte-2.3.7/src/widgets: qbuttongroup.o +Only in qte-2.3.7/src/widgets: qcdestyle.o +Only in qte-2.3.7/src/widgets: qcheckbox.o +Only in qte-2.3.7/src/widgets: qcombobox.o +diff -ru qte-2.3.7_orig/src/widgets/qcommonstyle.cpp qte-2.3.7/src/widgets/qcommonstyle.cpp +--- qte-2.3.7_orig/src/widgets/qcommonstyle.cpp Thu Jul 17 03:20:26 2003 ++++ qte-2.3.7/src/widgets/qcommonstyle.cpp Mon Oct 27 14:21:28 2003 +@@ -566,7 +566,7 @@ + bool enabled, bool active ) + { + #ifndef QT_NO_MENUBAR +-#ifndef QT_NO_STYLE_SGI ++#if 1 // #ifndef QT_NO_STYLE_SGI + if (draw_menu_bar_impl != 0) { + QDrawMenuBarItemImpl impl = draw_menu_bar_impl; + (this->*impl)(p, x, y, w, h, mi, g, enabled, active); +Only in qte-2.3.7/src/widgets: qcommonstyle.o +Only in qte-2.3.7/src/widgets: qcompactstyle.o +Only in qte-2.3.7/src/widgets: qdial.o +Only in qte-2.3.7/src/widgets: qeffects.moc +Only in qte-2.3.7/src/widgets: qeffects.o +Only in qte-2.3.7/src/widgets: qframe.o +Only in qte-2.3.7/src/widgets: qgrid.o +Only in qte-2.3.7/src/widgets: qgroupbox.o +Only in qte-2.3.7/src/widgets: qhbox.o +Only in qte-2.3.7/src/widgets: qhbuttongroup.o +Only in qte-2.3.7/src/widgets: qheader.o +Only in qte-2.3.7/src/widgets: qhgroupbox.o +Only in qte-2.3.7/src/widgets: qinterlacestyle.o +Only in qte-2.3.7/src/widgets: qlabel.o +Only in qte-2.3.7/src/widgets: qlcdnumber.o +Only in qte-2.3.7/src/widgets: qlineedit.o +Only in qte-2.3.7/src/widgets: qlistbox.o +diff -ru qte-2.3.7_orig/src/widgets/qlistview.cpp qte-2.3.7/src/widgets/qlistview.cpp +--- qte-2.3.7_orig/src/widgets/qlistview.cpp Thu Jul 17 03:20:26 2003 ++++ qte-2.3.7/src/widgets/qlistview.cpp Mon Oct 27 14:21:28 2003 +@@ -4968,9 +4968,9 @@ + l = l->childItem ? l->childItem : l->siblingItem; + + if ( l && l->height() ) +- s.setHeight( s.height() + 10 * l->height() ); +- else +- s.setHeight( s.height() + 140 ); ++ s.setHeight( s.height() + 4 /*10*/ * l->height() ); ++ else // ^v much too big for handhelds ++ s.setHeight( s.height() + 30 /*140*/ ); + + if ( s.width() > s.height() * 3 ) + s.setHeight( s.width() / 3 ); +Only in qte-2.3.7/src/widgets: qlistview.o +Only in qte-2.3.7/src/widgets: qmainwindow.moc +Only in qte-2.3.7/src/widgets: qmainwindow.o +Only in qte-2.3.7/src/widgets: qmenubar.o +Only in qte-2.3.7/src/widgets: qmenudata.o +Only in qte-2.3.7/src/widgets: qmotifplusstyle.o +Only in qte-2.3.7/src/widgets: qmotifstyle.o +Only in qte-2.3.7/src/widgets: qmultilineedit.o +Only in qte-2.3.7/src/widgets: qplatinumstyle.o +Only in qte-2.3.7/src/widgets: qpopupmenu.o +Only in qte-2.3.7/src/widgets: qprogressbar.o +Only in qte-2.3.7/src/widgets: qpushbutton.o +Only in qte-2.3.7/src/widgets: qradiobutton.o +Only in qte-2.3.7/src/widgets: qrangecontrol.o +Only in qte-2.3.7/src/widgets: qscrollbar.o +Only in qte-2.3.7/src/widgets: qscrollview.o +Only in qte-2.3.7/src/widgets: qsgistyle.o +Only in qte-2.3.7/src/widgets: qslider.o +Only in qte-2.3.7/src/widgets: qspinbox.o +Only in qte-2.3.7/src/widgets: qsplitter.o +Only in qte-2.3.7/src/widgets: qstatusbar.o +Only in qte-2.3.7/src/widgets: qtabbar.o +Only in qte-2.3.7/src/widgets: qtableview.o +Only in qte-2.3.7/src/widgets: qtabwidget.o +Only in qte-2.3.7/src/widgets: qtextbrowser.o +Only in qte-2.3.7/src/widgets: qtextview.o +Only in qte-2.3.7/src/widgets: qtoolbar.moc +Only in qte-2.3.7/src/widgets: qtoolbar.o +diff -ru qte-2.3.7_orig/src/widgets/qtoolbutton.cpp qte-2.3.7/src/widgets/qtoolbutton.cpp +--- qte-2.3.7_orig/src/widgets/qtoolbutton.cpp Thu Jul 17 03:20:27 2003 ++++ qte-2.3.7/src/widgets/qtoolbutton.cpp Mon Oct 27 14:21:28 2003 +@@ -230,7 +230,7 @@ + else + QToolTip::add( this, textLabel ); + } +-#endif ++#endif + } + + +@@ -324,12 +324,12 @@ + QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); + w = pm.width(); + h = pm.height(); +- if ( w < 32 ) +- w = 32; +- if ( h < 32 ) +- h = 32; ++ if ( w < 24 ) ++ w = 24; ++ if ( h < 24 ) ++ h = 24; + } else { +- w = h = 16; ++ w = h = 14; + QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); + w = pm.width(); + h = pm.height(); +Only in qte-2.3.7/src/widgets: qtoolbutton.o +Only in qte-2.3.7/src/widgets: qtooltip.moc +Only in qte-2.3.7/src/widgets: qtooltip.o +Only in qte-2.3.7/src/widgets: qvalidator.o +Only in qte-2.3.7/src/widgets: qvbox.o +Only in qte-2.3.7/src/widgets: qvbuttongroup.o +Only in qte-2.3.7/src/widgets: qvgroupbox.o +Only in qte-2.3.7/src/widgets: qwhatsthis.moc +Only in qte-2.3.7/src/widgets: qwhatsthis.o +Only in qte-2.3.7/src/widgets: qwidgetstack.o +Only in qte-2.3.7/src/widgets: qwindowsstyle.o +Only in qte-2.3.7/src/workspace: qworkspace.moc +Only in qte-2.3.7/src/workspace: qworkspace.o +Only in qte-2.3.7/src/xml: qdom.o +Only in qte-2.3.7/src/xml: qxml.o +Only in qte-2.3.7: src-mt.mk +Only in qte-2.3.7: stamp-headers +Only in qte-2.3.7/tools: Makefile +Only in qte-2.3.7/tools/designer: Makefile +Only in qte-2.3.7/tools/designer/designer: Makefile +Only in qte-2.3.7/tools/designer/examples/walkthrough: Makefile +Only in qte-2.3.7/tools/designer/integration/rc2ui: Makefile +Only in qte-2.3.7/tools/designer/tools/createcw: Makefile +Only in qte-2.3.7/tools/designer/uic: Makefile +Only in qte-2.3.7/tools/designer/util: Makefile +Only in qte-2.3.7/tools/makeqpf: Makefile +Only in qte-2.3.7/tools/mergetr: Makefile +Only in qte-2.3.7/tools/msg2qm: Makefile +Only in qte-2.3.7/tools/qconfig: Makefile +Only in qte-2.3.7/tools/qembed: Makefile +Only in qte-2.3.7/tools/qvfb: Makefile +Only in qte-2.3.7/tutorial: Makefile +Only in qte-2.3.7/tutorial/t1: Makefile +Only in qte-2.3.7/tutorial/t10: Makefile +Only in qte-2.3.7/tutorial/t11: Makefile +Only in qte-2.3.7/tutorial/t12: Makefile +Only in qte-2.3.7/tutorial/t13: Makefile +Only in qte-2.3.7/tutorial/t14: Makefile +Only in qte-2.3.7/tutorial/t2: Makefile +Only in qte-2.3.7/tutorial/t3: Makefile +Only in qte-2.3.7/tutorial/t4: Makefile +Only in qte-2.3.7/tutorial/t5: Makefile +Only in qte-2.3.7/tutorial/t6: Makefile +Only in qte-2.3.7/tutorial/t7: Makefile +Only in qte-2.3.7/tutorial/t8: Makefile +Only in qte-2.3.7/tutorial/t9: Makefile diff --git a/rsync/config_linux.h b/rsync/config_linux.h index e5ff3e4..f488b78 100644 --- a/rsync/config_linux.h +++ b/rsync/config_linux.h @@ -1,90 +1,90 @@ /* config.h. Generated automatically by configure. */ /* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define to empty if the keyword does not work. */ /* #undef const */ /* Define to `long' if <sys/types.h> doesn't define. */ /* #undef off_t */ /* Define to `unsigned' if <sys/types.h> doesn't define. */ /* #undef size_t */ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define this if your sockaddr structure contains sin_len */ /* #undef HAVE_SOCK_SIN_LEN */ /* How many bits would you like to have in an off_t? */ #define _FILE_OFFSET_BITS 64 /* Define to include GNU C library extensions. */ #define _GNU_SOURCE 1 /* GNU extension of saving argv[0] to program_invocation_short_name */ -#define HAVE_PROGRAM_INVOCATION_NAME 1 +/* #define HAVE_PROGRAM_INVOCATION_NAME 1 */ /* Define to a replacement type if intmax_t is not a builtin, or in sys/types.h or stdlib.h or stddef.h */ /* #undef intmax_t */ /* The number of bytes in a int. */ #define SIZEOF_INT 4 /* The number of bytes in a long. */ #define SIZEOF_LONG 4 /* The number of bytes in a off_t. */ #define SIZEOF_OFF_T 8 /* The number of bytes in a short. */ #define SIZEOF_SHORT 2 /* The number of bytes in a size_t. */ #define SIZEOF_SIZE_T 4 /* The number of bytes in a unsigned char. */ #define SIZEOF_UNSIGNED_CHAR 1 /* The number of bytes in a unsigned int. */ #define SIZEOF_UNSIGNED_INT 4 /* The number of bytes in a unsigned long. */ #define SIZEOF_UNSIGNED_LONG 4 /* The number of bytes in a unsigned short. */ #define SIZEOF_UNSIGNED_SHORT 2 /* Define if you have the mtrace function. */ #define HAVE_MTRACE 1 /* Define if you have the snprintf function. */ #define HAVE_SNPRINTF 1 /* Define if you have the strerror function. */ #define HAVE_STRERROR 1 /* Define if you have the vsnprintf function. */ #define HAVE_VSNPRINTF 1 /* Define if you have the <alloca.h> header file. */ #define HAVE_ALLOCA_H 1 /* Define if you have the <bzlib.h> header file. */ #define HAVE_BZLIB_H 1 /* Define if you have the <config.h> header file. */ /* #undef HAVE_CONFIG_H */ /* Define if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 /* Define if you have the <libintl.h> header file. */ #define HAVE_LIBINTL_H 1 /* Define if you have the <mcheck.h> header file. */ #define HAVE_MCHECK_H 1 /* Define if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 diff --git a/rsync/trace.h b/rsync/trace.h index 60a6477..2bb8552 100644 --- a/rsync/trace.h +++ b/rsync/trace.h @@ -1,122 +1,112 @@ /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- * * librsync -- generate and apply network deltas * $Id$ * * Copyright (C) 2000, 2001 by Martin Pool <mbp@samba.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * TODO: A function like perror that includes strerror output. Apache * does this by adding flags as well as the severity level which say * whether such information should be included. */ /* * trace may be turned off. * * error is always on, but you can return and continue in some way * * fatal terminates the whole process */ -void rs_fatal0(char const *s, ...); -void rs_error0(char const *s, ...); -void rs_trace0(char const *s, ...); - -void rs_log0_nofn(int level, char const *fmt, ...); - -#ifdef __GNUC__ +#if defined(HAVE_VARARG_MACROS) && defined(__GNUC__) +/* + * TODO: Don't assume this is a gcc thing; rather test in autoconf for + * support for __FUNCTION__. One simple way might just be to try compiling + * the definition of one of these functions! + * + * TODO: Also look for the C9X predefined identifier `_function', or + * whatever it's called. + */ void rs_log0(int level, char const *fn, char const *fmt, ...) __attribute__ ((format(printf, 3, 4))); #ifdef DO_RS_TRACE # define rs_trace(fmt, arg...) \ do { rs_log0(RS_LOG_DEBUG, __FUNCTION__, fmt , ##arg); \ } while (0) #else -# define rs_trace(s, str...) +# define rs_trace(fmt, arg...) #endif /* !DO_RS_TRACE */ -/* - * TODO: Don't assume this is a gcc thing; rather test in autoconf for - * support for __FUNCTION__ and varargs macros. One simple way might - * just be to try compiling the definition of one of these functions! - * - * TODO: Also look for the C9X predefined identifier `_function', or - * whatever it's called. - */ - #define rs_log(l, s, str...) do { \ rs_log0((l), __FUNCTION__, (s) , ##str); \ } while (0) #define rs_error(s, str...) do { \ rs_log0(RS_LOG_ERR, __FUNCTION__, (s) , ##str); \ } while (0) #define rs_fatal(s, str...) do { \ rs_log0(RS_LOG_CRIT, __FUNCTION__, \ (s) , ##str); \ abort(); \ } while (0) #else /************************* ! __GNUC__ */ - +# define rs_trace rs_trace0 # define rs_fatal rs_fatal0 # define rs_error rs_error0 # define rs_log rs_log0_nofn - -# ifdef DO_RS_TRACE -# define rs_trace rs_trace0 -# endif /* DO_RS_TRACE */ #endif /* ! __GNUC__ */ - +void rs_trace0(char const *s, ...); +void rs_fatal0(char const *s, ...); +void rs_error0(char const *s, ...); void rs_log0(int level, char const *fn, char const *fmt, ...); - +void rs_log0_nofn(int level, char const *fmt, ...); enum { RS_LOG_PRIMASK = 7, /**< Mask to extract priority part. \internal */ RS_LOG_NONAME = 8 /**< \b Don't show function name in message. */ }; - /** * \macro rs_trace_enabled() * * Call this before putting too much effort into generating trace * messages. */ extern int rs_trace_level; #ifdef DO_RS_TRACE # define rs_trace_enabled() ((rs_trace_level & RS_LOG_PRIMASK) >= RS_LOG_DEBUG) #else # define rs_trace_enabled() 0 #endif diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h index 97c7917..e438bd8 100644 --- a/scripts/kconfig/lkc_proto.h +++ b/scripts/kconfig/lkc_proto.h @@ -1,39 +1,39 @@ /* confdata.c */ P(conf_parse,void,(const char *name)); P(conf_read,int,(const char *name)); P(conf_write,int,(const char *name)); /* menu.c */ -P(rootmenu,struct menu,); +extern struct menu rootmenu; P(menu_is_visible,bool,(struct menu *menu)); P(menu_get_prompt,const char *,(struct menu *menu)); P(menu_get_root_menu,struct menu *,(struct menu *menu)); P(menu_get_parent_menu,struct menu *,(struct menu *menu)); /* symbol.c */ P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); -P(sym_change_count,int,); +extern int sym_change_count; P(sym_lookup,struct symbol *,(const char *name, int isconst)); P(sym_find,struct symbol *,(const char *name)); P(sym_type_name,const char *,(enum symbol_type type)); P(sym_calc_value,void,(struct symbol *sym)); P(sym_get_type,enum symbol_type,(struct symbol *sym)); P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); P(sym_is_changable,bool,(struct symbol *sym)); P(sym_get_choice_prop,struct property *,(struct symbol *sym)); P(sym_get_default_prop,struct property *,(struct symbol *sym)); P(sym_get_string_value,const char *,(struct symbol *sym)); P(prop_get_type_name,const char *,(enum prop_type type)); /* expr.c */ P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)); |