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
@@ -36,2 +36,5 @@ ifdef CONFIG_TARGET_YOPY endif +ifdef CONFIG_TARGET_MACOSX + PLATFORM=macx-darwin +endif @@ -14,2 +14,5 @@ choice + config TARGET_MACOSX + boolean "Mac OS X (DARWIN)" + config TARGET_SHARP @@ -64,2 +67,3 @@ config SPECFILE default "qws/linux-yopy-g++" if TARGET_YOPY && (! X11) + default "qws/macx-generic-g++" if TARGET_MACOSX && (! X11) 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = battery.h batterystatus.h batteryappletimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = cardmon.h cardmonimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = clipboard.h clipboardappletimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = clock.h clockappletimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = home.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = irda.h irdaappletimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = logout.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = restart.h restartappletimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = restart.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugn warn_on release HEADERS = rotate.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = screenshot.h inputDialog.h screenshotappletimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = suspend.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = vmemo.h vmemoimpl.h adpcm.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = volume.h volumeappletimpl.h oledbox.h 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 @@ -548,3 +548,7 @@ bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRais #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] ); 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 @@ -229,3 +229,7 @@ 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(); 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 @@ -38,3 +38,7 @@ IrServer::IrServer( QObject *parent, const char *name ) 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(); 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 @@ -278,3 +278,5 @@ int initApplication( int argc, char ** argv ) +#ifndef Q_OS_MACX ODevice::inst()->setSoftSuspend( false ); +#endif 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,5 +1,5 @@ /********************************************************************** -** 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. ** @@ -21,15 +21,36 @@ #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 ); @@ -37,5 +58,6 @@ PackageSlave::PackageSlave( QObject *parent, char* name ) 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 ) { @@ -47,4 +69,3 @@ void PackageSlave::qcopMessage( const QCString &msg, const QByteArray &data ) installPackage( file ); - } - else if ( msg == "removePackage(QString)" ) { + } else if ( msg == "removePackage(QString)" ) { QString file; @@ -52,2 +73,23 @@ void PackageSlave::qcopMessage( const QCString &msg, const QByteArray &data ) 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 ); } @@ -55,15 +97,197 @@ void PackageSlave::qcopMessage( const QCString &msg, const QByteArray &data ) -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)"); @@ -71,18 +295,14 @@ void PackageSlave::installPackage( const QString &package ) 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)"); @@ -90,8 +310,32 @@ void PackageSlave::removePackage( const QString &package ) 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 @@ -52,2 +52,5 @@ +#ifdef Q_OS_MACX +#include <sys/time.h> +#endif #include <sys/resource.h> 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 @@ -117,3 +117,8 @@ TARGET = qpe -LIBS += -lcrypt -lqpe -lopie +CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) +contains( CONFTEST, y ){ + LIBS += -lqpe -lopie +}else{ + LIBS += -lcrypt -lqpe -lopie +} 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 @@ -258,3 +258,7 @@ void StartMenu::loadApplets() 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(); 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 @@ -104,3 +104,7 @@ void SysTray::addApplets() 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(); @@ -112,2 +116,3 @@ void SysTray::addApplets() continue; + qWarning( "Found Applet: %s", (*it).latin1() ); TaskbarAppletInterface *iface = 0; 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 @@ -30,4 +30,7 @@ #include <time.h> + +#ifndef Q_OS_MACX #include <shadow.h> #include <crypt.h> +#endif /* Q_OS_MACX */ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = wavplugin.h wavpluginimpl.h 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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release 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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release # Input 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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release 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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release 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 @@ -176,3 +176,8 @@ void Today::loadPlugins() { 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 @@ -181,2 +186,4 @@ void Today::loadPlugins() { + qWarning("Found: %d entries !", list.count() ); + QMap<QString, TodayPlugin> tempList; 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 @@ -25,3 +25,6 @@ #include <time.h> + +#ifndef Q_OS_MACX #include <shadow.h> +#endif /* Q_OS_MACX */ @@ -31,2 +34,7 @@ #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 @@ -38,2 +46,4 @@ extern "C" +#endif + #endif // not defined linux @@ -42,2 +52,4 @@ extern "C" #include <shadow.h> +#elif defined(Q_OS_MACX) +#include <stdlib.h> #endif @@ -93,11 +105,11 @@ struct UidGen }; -#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_) /* @@ -116,2 +128,9 @@ QString UidGen::uuid() } +#else +QString UidGen::uuid() +{ + uuid_t uuid; + ::uuid_generate( uuid ); + return QUUid( uuid ).toString(); +} #endif 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 @@ -81,3 +81,7 @@ void MenuSettings::init ( ) 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 */ 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 @@ -77,3 +77,7 @@ void TaskbarSettings::init ( ) 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 */ @@ -84,5 +88,8 @@ void TaskbarSettings::init ( ) + 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" ); @@ -99,3 +106,5 @@ void TaskbarSettings::init ( ) } + qWarning("<3>"); if ( !iface ) { + qWarning("<4>"); lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); @@ -103,4 +112,10 @@ void TaskbarSettings::init ( ) 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 ) @@ -114,4 +129,6 @@ void TaskbarSettings::init ( ) } + qWarning("<6>"); if ( iface ) { + qWarning("<7>"); QCheckListItem *item; 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,4 +1,4 @@ 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 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 @@ -3,3 +3,4 @@ include ( $(OPIEDIR)/gen.pro ) # base opie install path -prefix = /opt/QtPalmtop +# prefix = /opt/QtPalmtop ??? Why here (eilers) ??? +prefix = $(OPIEDIR) @@ -97,3 +98,12 @@ ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_RO 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 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = dvorak.h \ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = qimpenchar.h \ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = pickboard.h pickboardcfg.h pickboardimpl.h pickboardpicks.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = unikeyboard.h unikeyboardimpl.h diff --git a/libopie/libopie.pro b/libopie/libopie.pro index 0398775..bf6b78f 100644 --- a/libopie/libopie.pro +++ b/libopie/libopie.pro @@ -95,6 +95,2 @@ DESTDIR = $(OPIEDIR)/lib$(PROJMAK) -# The following is just for my Notebook ! -# It should never be committed !! (eilers) -# QMAKE_CXXFLAGS += -DQT_NO_SOUND - LIBS += -lqpe diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 3edf8e7..fef623a 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -25,3 +25,5 @@ #include <sys/time.h> +#ifndef QT_NO_SOUND #include <linux/soundcard.h> +#endif #include <math.h> diff --git a/library/filemanager.cpp b/library/filemanager.cpp index cc657fa..91986a0 100644 --- a/library/filemanager.cpp +++ b/library/filemanager.cpp @@ -33,3 +33,12 @@ #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> @@ -218,2 +227,4 @@ bool FileManager::copyFile( const AppLnk &src, const AppLnk &dest ) + + bool FileManager::copyFile( const QString & src, const QString & dest ) { @@ -240,13 +251,45 @@ bool FileManager::copyFile( const QString & src, const QString & dest ) { 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()); diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp index c7a5211..2ad8e95 100644 --- a/library/fontdatabase.cpp +++ b/library/fontdatabase.cpp @@ -172,3 +172,7 @@ void FontDatabase::loadRenderers() QString path = QPEApplication::qpeDir() + "/plugins/fontfactories"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif diff --git a/library/global.cpp b/library/global.cpp index 90954fe..05d23ac 100644 --- a/library/global.cpp +++ b/library/global.cpp @@ -606,3 +606,7 @@ void Global::invoke(const QString &c) #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() ); diff --git a/library/library.pro b/library/library.pro index ab1f451..5acfc0c 100644 --- a/library/library.pro +++ b/library/library.pro @@ -126,3 +126,3 @@ 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 diff --git a/library/network.cpp b/library/network.cpp index 3568809..991e11a 100644 --- a/library/network.cpp +++ b/library/network.cpp @@ -420,3 +420,7 @@ NetworkInterface* Network::loadPlugin(const QString& 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); 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 @@ -78,3 +78,114 @@ void* QLibraryPrivate::resolveSymbol( const char* symbol ) -#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 diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index d4734ae..a97efc0 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -22,3 +22,5 @@ #include <unistd.h> +#ifndef Q_OS_MACX #include <linux/limits.h> // needed for some toolchains (PATH_MAX) +#endif #include <qfile.h> @@ -91,4 +93,5 @@ #include <sys/ioctl.h> +#ifndef QT_NO_SOUND #include <sys/soundcard.h> - +#endif #include "qt_override_p.h" @@ -235,3 +238,7 @@ public: QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif QStringList list; @@ -260,3 +267,7 @@ public: QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; +#ifdef Q_OS_MACX + QDir dir( path, "lib*.dylib" ); +#else QDir dir( path, "lib*.so" ); +#endif QStringList list; @@ -342,2 +353,3 @@ static void setVolume( int t = 0, int percent = -1 ) percent = cfg.readNumEntry( "VolumePercent", 50 ); +#ifndef QT_NO_SOUND int fd = 0; @@ -350,2 +362,3 @@ static void setVolume( int t = 0, int percent = -1 ) } +#endif } @@ -364,2 +377,3 @@ static void setMic( int t = 0, int percent = -1 ) +#ifndef QT_NO_SOUND int fd = 0; @@ -370,2 +384,3 @@ static void setMic( int t = 0, int percent = -1 ) } +#endif } @@ -385,2 +400,3 @@ static void setBass( int t = 0, int percent = -1 ) +#ifndef QT_NO_SOUND int fd = 0; @@ -391,2 +407,3 @@ static void setBass( int t = 0, int percent = -1 ) } +#endif } @@ -406,2 +423,3 @@ static void setTreble( int t = 0, int percent = -1 ) +#ifndef QT_NO_SOUND int fd = 0; @@ -412,2 +430,3 @@ static void setTreble( int t = 0, int percent = -1 ) } +#endif } @@ -1651,2 +1670,8 @@ void QPEApplication::internalSetStyle( const QString &style ) +#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 ) @@ -1655,3 +1680,3 @@ void QPEApplication::internalSetStyle( const QString &style ) path = path + "lib" + style. lower ( ) + ".so"; // compatibility - +#endif static QLibrary *lastlib = 0; 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 @@ -514,3 +514,7 @@ void QPEDecoration::init ( const QString &plugin ) +#ifdef Q_OS_MACX + if ( plugin.find( ".dylib" ) > 0 ) { +#else if ( plugin.find( ".so" ) > 0 ) { +#endif // full library name supplied @@ -518,3 +522,7 @@ void QPEDecoration::init ( const QString &plugin ) } else { +#ifdef Q_OS_MACX + path += "lib" + plugin.lower() + ".dylib"; // compatibility +#else path += "lib" + plugin.lower() + ".so"; // compatibility +#endif } diff --git a/library/sound.cpp b/library/sound.cpp index c8704f9..5b67995 100644 --- a/library/sound.cpp +++ b/library/sound.cpp @@ -30,3 +30,6 @@ #include <sys/ioctl.h> + +#ifndef QT_NO_SOUND #include <sys/soundcard.h> +#endif diff --git a/library/storage.cpp b/library/storage.cpp index dc5cc22..f8b75d0 100644 --- a/library/storage.cpp +++ b/library/storage.cpp @@ -31,3 +31,3 @@ -#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) +#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <sys/vfs.h> @@ -36,6 +36,15 @@ +#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> @@ -44,2 +53,4 @@ static bool isCF(const QString& m) { + +#ifndef Q_OS_MACX FILE* f = fopen("/var/run/stab", "r"); @@ -63,2 +74,3 @@ static bool isCF(const QString& m) } +#endif /* Q_OS_MACX */ return FALSE; @@ -206,4 +218,21 @@ void StorageInfo::update() 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; @@ -220,2 +249,5 @@ bool deviceTab( const char *device) { endmntent( mntfp ); +#endif /* Q_OS_MACX */ + + return hasDevice; 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 @@ -26,3 +26,3 @@ 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 @@ -60,2 +60,3 @@ QMAKE_LIBS_X11SM = QMAKE_LIBS_QT = -lqte +#QMAKE_LIBS_QT = libqte.dylib QMAKE_LIBS_QT_THREAD = -lqte-mt 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = networkapplet.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = notes.h notesappletimpl.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = wireless.h wirelessappletimpl.h networkinfo.h mgraph.h advancedconfig.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = flat.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG = qt embedded release warn_on +CONFIG = qt plugin embedded release warn_on SOURCES = liquid.cpp 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = polished.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = bluezapplet.h bluezappletimpl.h 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 @@ -3,4 +3,4 @@ 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 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 @@ -3,4 +3,4 @@ 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 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = flat.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS = fresh.h 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,3 +1,3 @@ TEMPLATE = lib -CONFIG = qt embedded release warn_on +CONFIG = qt plugin embedded release warn_on SOURCES = liquid.cpp \ 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,3 +1,3 @@ TEMPLATE = lib -CONFIG = qt embedded release warn_on +CONFIG = qt plugin embedded release warn_on SOURCES = metal.cpp plugin.cpp 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,3 +1,3 @@ TEMPLATE = lib -CONFIG = qt embedded debug warn_on +CONFIG = qt plugin embedded debug warn_on SOURCES = ogfxeffect.cpp \ 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 @@ -2,3 +2,3 @@ TEMPLATE = lib #CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release 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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release 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 @@ -2,3 +2,3 @@ TEMPLATE = lib #CONFIG -= moc -CONFIG += qt release +CONFIG += qt plugin release 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,3 +1,3 @@ TEMPLATE = lib -CONFIG += qt warn_on release +CONFIG += qt plugin warn_on release HEADERS += bend.h \ diff --git a/plugins/Makefile b/plugins/Makefile index 4863bd0..2515903 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1,3 +1,7 @@ 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 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 @@ -156,3 +156,10 @@ #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 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 @@ -25,3 +25,3 @@ /* GNU extension of saving argv[0] to program_invocation_short_name */ -#define HAVE_PROGRAM_INVOCATION_NAME 1 +/* #define HAVE_PROGRAM_INVOCATION_NAME 1 */ diff --git a/rsync/trace.h b/rsync/trace.h index 60a6477..2bb8552 100644 --- a/rsync/trace.h +++ b/rsync/trace.h @@ -38,9 +38,11 @@ -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. + */ @@ -54,14 +56,5 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) #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 { \ @@ -84,3 +77,3 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) #else /************************* ! __GNUC__ */ - +# define rs_trace rs_trace0 # define rs_fatal rs_fatal0 @@ -88,11 +81,9 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) # 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, ...); @@ -107,3 +98,2 @@ enum { - /** 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 @@ -7,3 +7,3 @@ P(conf_write,int,(const char *name)); /* menu.c */ -P(rootmenu,struct menu,); +extern struct menu rootmenu; @@ -16,3 +16,3 @@ P(menu_get_parent_menu,struct menu *,(struct menu *menu)); P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); -P(sym_change_count,int,); +extern int sym_change_count; |