summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--include.pro14
-rw-r--r--libopie2/opiecore/opiecore.pro3
-rw-r--r--library/qlibrary_unix.cpp2
-rw-r--r--library/qpeapplication.cpp2
4 files changed, 11 insertions, 10 deletions
diff --git a/include.pro b/include.pro
index f32786a..dd388f2 100644
--- a/include.pro
+++ b/include.pro
@@ -1,136 +1,136 @@
include( $(OPIEDIR)/gen.pro )
# base opie install path
# prefix = /opt/QtPalmtop ??? Why here (eilers) ???
prefix = $(OPIEDIR)
contains( CONFIG, quick-app-lib ) {
TEMPLATE = lib
CONFIG += plugin # "plugin" will be removed automatically later if not MacOSX ! (eilers)
DESTDIR = $(OPIEDIR)/plugins/application
DEFINES += OPIE_APP_INTERFACE
DEFINES += QUICKAPP_NAME="\"$${TARGET}\""
!contains( TARGET, launcher ) {
message( Linking $$TARGET to quicklauncher )
system( rm -f $$(OPIEDIR)/bin/$$TARGET )
system( ln -sf $$QUICKLAUNCH_PATH $$(OPIEDIR)/bin/$$TARGET )
}
}
contains ( CONFIG, quick-app-bin ) {
TEMPLATE = app
DESTDIR = $(OPIEDIR)/bin
DEFINES -= OPIE_APP_INTERFACE
DEFINES += QUICKAPP_NAME="\"$${TARGET}\""
message( Touching plugins/application/lib$${TARGET}.so.0 )
system( touch $$(OPIEDIR)/plugins/application/lib$${TARGET}.so.0 )
}
contains( TEMPLATE, lib ) {
target.path = $$prefix/lib
}
!contains( TEMPLATE, lib ) {
target.path = $$prefix/bin
}
INSTALLS += target
# ipkg control files
control.path = /CONTROL
control.files = control postinst prerm postrm preinst conffiles
INSTALLS += control
# images, default is $$prefix/pics/$$TARGET
pics.path = $$prefix/pics/$$TARGET
pics.files = pics/*
INSTALLS += pics
# sounds, default path is $$prefix/sounds/$$TARGET
sounds.path = $$prefix/sounds/$$TARGET
sounds.files = sounds/*
INSTALLS += sounds
# init scripts, default path is /etc/init.d
init.path = /etc/init.d
init.files = init.d/*
INSTALLS += init
# data, default path is /usr/share/$$TARGET
data.path = /usr/share/$$TARGET
data.files = share/*
INSTALLS += data
etc.path = $$prefix/etc/
etc.files = etc/*
INSTALLS += etc
apps.path = $$prefix/apps/
apps.files = apps/*
INSTALLS += apps
# sounds, default path is $$prefix/sounds/$$TARGET
sounds.path = $$prefix/sounds/$$TARGET
sounds.files = sounds/*
INSTALLS += sounds
# anything in nonstandard paths
root.path = /
root.files = root/*
INSTALLS += root
# new targets
opie-lupdate.target = opie-lupdate
opie-lupdate.commands = opie-lupdate $(PRO)
opie-lrelease.target = opie-lrelease
opie-lrelease.commands = opie-lrelease $(PRO)
lupdate.target = lupdate
lupdate.commands = lupdate -noobsolete $(PRO)
lrelease.target = lrelease
lrelease.commands = lrelease $(PRO)
# new message target to get all strings from the apps with and without tr
messages.target = messages
messages.commands = xgettext -C -n -ktr -kQT_TRANSLATE_NOOP $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-tr.po' && xgettext -C -n -a $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-allstrings.po'
ipk.target = ipk
ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; )
QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk opie-lupdate opie-lrelease messages
CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
contains( CONFTEST, y ){
QMAKE_LFLAGS += -Wl
LIBS -= -ldl
LIBS -= -lcrypt
LIBS -= -lm
# Manual including indirect referenced libraries which are not loaded
# by the mac-linker automatically
# IF YOU COMPILE FOR THE FIRST TIME, COMMENT OUT ONE OF THE FOLLOWING
# (regarding whether you activate SQL) and the last one (-lopiecore2)
- CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND )
- contains( CONFTEST, y ){
- LIBS += -lopiedb2 -lqpe
- } else {
- LIBS += -lqpe
- }
- LIBS += -lopiecore2
+ #CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND )
+ #contains( CONFTEST, y ){
+ # LIBS += -lopiedb2 -lqpe
+ #} else {
+ # LIBS += -lqpe
+ #}
+ #LIBS += -lopiecore2
}
else {
QMAKE_LFLAGS += -Wl,-rpath-link,$$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
}
LIBS += -L$(OPIEDIR)/lib
MOC_DIR=.moc/$(PLATFORM)
OBJECTS_DIR=.obj/$(PLATFORM)
#was here now at thetop
#include( $(OPIEDIR)/gen.pro )
diff --git a/libopie2/opiecore/opiecore.pro b/libopie2/opiecore/opiecore.pro
index cbb7e04..3406b8f 100644
--- a/libopie2/opiecore/opiecore.pro
+++ b/libopie2/opiecore/opiecore.pro
@@ -1,59 +1,60 @@
TEMPLATE = lib
CONFIG += qt warn_on
DESTDIR = $(OPIEDIR)/lib
HEADERS = oapplication.h \
oconfig.h \
odebug.h \
oglobal.h \
oglobalsettings.h \
okeyconfigmanager.h \
okeyfilter.h \
opluginloader.h \
oprocess.h \
oprocctrl.h \
oresource.h \
osharedpointer.h \
osmartpointer.h \
ostorageinfo.h \
xmltree.h
SOURCES = oapplication.cpp \
oconfig.cpp \
odebug.cpp \
oglobal.cpp \
oglobalsettings.cpp \
okeyconfigmanager.cpp \
okeyfilter.cpp \
opluginloader.cpp \
oprocess.cpp \
oprocctrl.cpp \
oresource.cpp \
osmartpointer.cpp \
ostorageinfo.cpp \
xmltree.cpp
# Disable Linux-only subsystems for MAC build
-!contains( CONFIG_TARGET_MACOSX, y ) {
+CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
+!contains( CONFTEST, y ) {
include ( linux/linux.pro )
} else {
message( "disabling linux-only subsystems for MAC build" )
}
include( device/device.pro )
INTERFACES =
TARGET = opiecore2
VERSION = 1.9.4
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
!contains( platform, x11 ) {
LIBS = -lqpe
include( $(OPIEDIR)/include.pro )
}
contains( platform, x11 ) {
LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
}
diff --git a/library/qlibrary_unix.cpp b/library/qlibrary_unix.cpp
index 2181153..fee73c2 100644
--- a/library/qlibrary_unix.cpp
+++ b/library/qlibrary_unix.cpp
@@ -1,243 +1,243 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "qlibrary_p.h"
#ifndef QT_NO_COMPONENT
/*
The platform dependent implementations of
- loadLibrary
- freeLibrary
- resolveSymbol
It's not too hard to guess what the functions do.
*/
#if defined(Q_OS_HPUX)
// for HP-UX < 11.x and 32 bit
#include <dl.h>
bool QLibraryPrivate::loadLibrary()
{
if ( pHnd )
return TRUE;
QString filename = library->library();
pHnd = (void*)shl_load( filename.latin1(), BIND_DEFERRED | BIND_NONFATAL | DYNAMIC_PATH, 0 );
#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
if ( !pHnd )
qDebug( "Failed to load library %s!", filename.latin1() );
#endif
return pHnd != 0;
}
bool QLibraryPrivate::freeLibrary()
{
if ( !pHnd )
return TRUE;
if ( !shl_unload( (shl_t)pHnd ) ) {
pHnd = 0;
return TRUE;
}
return FALSE;
}
void* QLibraryPrivate::resolveSymbol( const char* symbol )
{
if ( !pHnd )
return 0;
void* address = 0;
if ( shl_findsym( (shl_t*)&pHnd, symbol, TYPE_UNDEFINED, address ) < 0 ) {
#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
qDebug( "Couldn't resolve symbol \"%s\"", symbol );
#endif
return 0;
}
return address;
}
#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);
+ 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()" );
}
#endif
return pHnd == 0;
}
void* QLibraryPrivate::resolveSymbol( const char* symbol )
{
//qDebug("QLibraryPrivate::resolveSymbol\n");
//return FALSE;
if ( !pHnd )
return 0;
DyldLibDesc* desc = (DyldLibDesc*) pHnd;
NSSymbol sym = NSLookupSymbolInModule(desc->mod, symbol);
void* address = 0;
if (sym != 0) {
address = NSAddressOfSymbol(sym);
}
#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
if ( address == 0 )
qWarning( "Cannot find symbol: %s", symbol );
#endif
return address;
}
#else
// Something else, assuming POSIX
#include <dlfcn.h>
bool QLibraryPrivate::loadLibrary()
{
if ( pHnd )
return TRUE;
QString filename = library->library();
pHnd = dlopen( filename.latin1() , RTLD_LAZY );
// #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
if ( !pHnd )
qWarning( "%s", dlerror() );
// #endif
return pHnd != 0;
}
bool QLibraryPrivate::freeLibrary()
{
if ( !pHnd )
return TRUE;
int ec = dlclose( pHnd );
if ( !ec )
pHnd = 0;
#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
else {
const char* error = dlerror();
if ( error )
qWarning( "%s", error );
}
#endif
return pHnd == 0;
}
void* QLibraryPrivate::resolveSymbol( const char* f )
{
if ( !pHnd )
return 0;
void* address = dlsym( pHnd, f );
#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
const char* error = dlerror();
if ( error )
qWarning( "%s", error );
#endif
return address;
}
#endif // POSIX
#endif // QT_NO_COMPONENT
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 19e99f2..dcc1001 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1826,465 +1826,465 @@ void QPEApplication::internalSetStyle( const QString &style )
}
else if ( style == "QPE" ) {
setStyle( new QPEStyle );
}
else if ( style == "Light" ) {
setStyle( new LightStyle );
}
#ifndef QT_NO_STYLE_PLATINUM
else if ( style == "Platinum" ) {
setStyle( new QPlatinumStyle );
}
#endif
#ifndef QT_NO_STYLE_MOTIF
else if ( style == "Motif" ) {
setStyle( new QMotifStyle );
}
#endif
#ifndef QT_NO_STYLE_MOTIFPLUS
else if ( style == "MotifPlus" ) {
setStyle( new QMotifPlusStyle );
}
#endif
else {
QStyle *sty = 0;
QString path = QPEApplication::qpeDir ( ) + "plugins/styles/";
#ifdef Q_OS_MACX
if ( style. find ( ".dylib" ) > 0 )
path += style;
else
path = path + "lib" + style. lower ( ) + ".dylib"; // compatibility
#else
if ( style. find ( ".so" ) > 0 )
path += style;
else
path = path + "lib" + style. lower ( ) + ".so"; // compatibility
#endif
static QLibrary *lastlib = 0;
static StyleInterface *lastiface = 0;
QLibrary *lib = new QLibrary ( path );
StyleInterface *iface = 0;
if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface )
sty = iface-> style ( );
if ( sty ) {
setStyle ( sty );
if ( lastiface )
lastiface-> release ( );
lastiface = iface;
if ( lastlib ) {
lastlib-> unload ( );
delete lastlib;
}
lastlib = lib;
}
else {
if ( iface )
iface-> release ( );
delete lib;
setStyle ( new LightStyle ( ));
}
}
#endif
}
/*!
\internal
*/
void QPEApplication::prepareForTermination( bool willrestart )
{
if ( willrestart ) {
QLabel *lblWait = new QLabel( tr( "Please wait..." ), 0, "wait hack", QWidget::WStyle_Customize |
QWidget::WStyle_NoBorder | QWidget::WStyle_Tool );
lblWait->setAlignment( QWidget::AlignCenter );
lblWait->show();
lblWait->showMaximized();
}
{ QCopEnvelope envelope( "QPE/System", "forceQuit()" );
}
processEvents(); // ensure the message goes out.
}
/*!
\internal
*/
void QPEApplication::shutdown()
{
// Implement in server's QPEApplication subclass
}
/*!
\internal
*/
void QPEApplication::restart()
{
// Implement in server's QPEApplication subclass
}
static QPtrDict<void>* stylusDict = 0;
static void createDict()
{
if ( !stylusDict )
stylusDict = new QPtrDict<void>;
}
/*!
Returns the current StylusMode for widget \a w.
\sa setStylusOperation() StylusMode
*/
QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget* w )
{
if ( stylusDict )
return ( StylusMode ) ( int ) stylusDict->find( w );
return LeftOnly;
}
/*!
\enum QPEApplication::StylusMode
\value LeftOnly the stylus only generates LeftButton
events (the default).
\value RightOnHold the stylus generates RightButton events
if the user uses the press-and-hold gesture.
\sa setStylusOperation() stylusOperation()
*/
/*!
Causes widget \a w to receive mouse events according to the stylus
\a mode.
\sa stylusOperation() StylusMode
*/
void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode )
{
createDict();
if ( mode == LeftOnly ) {
stylusDict->remove
( w );
w->removeEventFilter( qApp );
}
else {
stylusDict->insert( w, ( void* ) mode );
connect( w, SIGNAL( destroyed() ), qApp, SLOT( removeSenderFromStylusDict() ) );
w->installEventFilter( qApp );
}
}
/*!
\reimp
*/
bool QPEApplication::eventFilter( QObject *o, QEvent *e )
{
if ( !o->isWidgetType() )
return FALSE;
if ( stylusDict && e->type() >= QEvent::MouseButtonPress && e->type() <= QEvent::MouseMove ) {
QMouseEvent * me = ( QMouseEvent* ) e;
StylusMode mode = (StylusMode)(int)stylusDict->find(o);
switch (mode) {
case RightOnHold:
switch ( me->type() ) {
case QEvent::MouseButtonPress:
if ( me->button() == LeftButton ) {
static long Pref = 500; // #### pref.
d->presswidget = (QWidget*)o;
d->presspos = me->pos();
d->rightpressed = FALSE;
#ifdef OPIE_WITHROHFEEDBACK
if( ! d->RoH )
d->RoH = new Opie::Internal::RoHFeedback;
d->RoH->init( me->globalPos(), d->presswidget );
Pref = d->RoH->delay();
#endif
if (!d->presstimer )
d->presstimer = startTimer( Pref ); // #### pref.
}
break;
case QEvent::MouseMove:
if (d->presstimer && (me->pos() - d->presspos).manhattanLength() > 8) {
killTimer(d->presstimer);
#ifdef OPIE_WITHROHFEEDBACK
d->RoH->stop();
#endif
d->presstimer = 0;
}
break;
case QEvent::MouseButtonRelease:
if ( me->button() == LeftButton ) {
if ( d->presstimer ) {
killTimer(d->presstimer);
#ifdef OPIE_WITHROHFEEDBACK
d->RoH->stop( );
#endif
d->presstimer = 0;
}
if ( d->rightpressed && d->presswidget ) {
printf( "Send ButtonRelease\n" );
// Right released
postEvent( d->presswidget,
new QMouseEvent( QEvent::MouseButtonRelease, me->pos(),
RightButton, LeftButton + RightButton ) );
// Left released, off-widget
postEvent( d->presswidget,
new QMouseEvent( QEvent::MouseMove, QPoint( -1, -1),
LeftButton, LeftButton ) );
postEvent( d->presswidget,
new QMouseEvent( QEvent::MouseButtonRelease, QPoint( -1, -1),
LeftButton, LeftButton ) );
d->rightpressed = FALSE;
return TRUE; // don't send the real Left release
}
}
break;
default:
break;
}
break;
default:
;
}
}
else if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) {
QKeyEvent *ke = (QKeyEvent *)e;
if ( ke->key() == Key_Enter ) {
if ( o->isA( "QRadioButton" ) || o->isA( "QCheckBox" ) ) {
postEvent( o, new QKeyEvent( e->type(), Key_Space, ' ',
ke->state(), " ", ke->isAutoRepeat(), ke->count() ) );
return TRUE;
}
}
}
return FALSE;
}
/*!
\reimp
*/
void QPEApplication::timerEvent( QTimerEvent *e )
{
if ( e->timerId() == d->presstimer && d->presswidget ) {
// Right pressed
postEvent( d->presswidget,
new QMouseEvent( QEvent::MouseButtonPress, d->presspos,
RightButton, LeftButton ) );
killTimer( d->presstimer );
d->presstimer = 0;
d->rightpressed = TRUE;
#ifdef OPIE_WITHROHFEEDBACK
d->RoH->stop();
#endif
}
}
void QPEApplication::removeSenderFromStylusDict()
{
stylusDict->remove
( ( void* ) sender() );
if ( d->presswidget == sender() )
d->presswidget = 0;
}
/*!
\internal
*/
bool QPEApplication::keyboardGrabbed() const
{
return d->kbgrabbed;
}
/*!
Reverses the effect of grabKeyboard(). This is called automatically
on program exit.
*/
void QPEApplication::ungrabKeyboard()
{
((QPEApplication *) qApp )-> d-> kbgrabbed = false;
}
/*!
Grabs the physical keyboard keys, e.g. the application's launching
keys. Instead of launching applications when these keys are pressed
the signals emitted are sent to this application instead. Some games
programs take over the launch keys in this way to make interaction
easier.
\sa ungrabKeyboard()
*/
void QPEApplication::grabKeyboard()
{
((QPEApplication *) qApp )-> d-> kbgrabbed = true;
}
/*!
\reimp
*/
int QPEApplication::exec()
{
d->qcopQok = true;
#ifndef QT_NO_COP
d->sendQCopQ();
if ( !d->keep_running )
processEvents(); // we may have received QCop messages in the meantime.
#endif
if ( d->keep_running )
//|| d->qpe_main_widget && d->qpe_main_widget->isVisible() )
return QApplication::exec();
#ifndef QT_NO_COP
{
QCopEnvelope e( "QPE/System", "closing(QString)" );
e << d->appName;
}
#endif
processEvents();
return 0;
}
/*!
\internal
External request for application to quit. Quits if possible without
loosing state.
*/
void QPEApplication::tryQuit()
{
if ( activeModalWidget() )
return ; // Inside modal loop or konsole. Too hard to save state.
#ifndef QT_NO_COP
{
QCopEnvelope e( "QPE/System", "closing(QString)" );
e << d->appName;
}
#endif
if ( d->keep_running )
d->store_widget_rect(d->qpe_main_widget, d->appName);
processEvents();
quit();
}
/*!
\internal
User initiated quit. Makes the window 'Go Away'. If preloaded this means
hiding the window. If not it means quitting the application.
As this is user initiated we don't need to check state.
*/
void QPEApplication::hideOrQuit()
{
if ( d->keep_running )
d->store_widget_rect(d->qpe_main_widget, d->appName);
processEvents();
// If we are a preloaded application we don't actually quit, so emit
// a System message indicating we're quasi-closing.
if ( d->preloaded && d->qpe_main_widget )
#ifndef QT_NO_COP
{
QCopEnvelope e("QPE/System", "fastAppHiding(QString)" );
e << d->appName;
d->qpe_main_widget->hide();
}
#endif
else
quit();
}
-#if (__GNUC__ > 2 )
+#if (__GNUC__ > 2 ) && !defined(_OS_MACX_)
extern "C" void __cxa_pure_virtual();
void __cxa_pure_virtual()
{
fprintf( stderr, "Pure virtual called\n");
abort();
}
#endif
#if defined(OPIE_NEW_MALLOC)
// The libraries with the skiff package (and possibly others) have
// completely useless implementations of builtin new and delete that
// use about 50% of your CPU. Here we revert to the simple libc
// functions.
void* operator new[]( size_t size )
{
return malloc( size );
}
void* operator new( size_t size )
{
return malloc( size );
}
void operator delete[]( void* p )
{
if ( p )
free( p );
}
void operator delete[]( void* p, size_t /*size*/ )
{
if ( p )
free( p );
}
void operator delete( void* p )
{
if ( p )
free( p );
}
void operator delete( void* p, size_t /*size*/ )
{
if ( p )
free( p );
}
#endif
#if ( QT_VERSION <= 230 ) && !defined(SINGLE_APP)
#include <qwidgetlist.h>
#ifdef QWS
#include <qgfx_qws.h>
extern QRect qt_maxWindowRect;
void qt_setMaxWindowRect(const QRect& r )
{
qt_maxWindowRect = qt_screen->mapFromDevice( r,
qt_screen->mapToDevice( QSize( qt_screen->width(), qt_screen->height() ) ) );
// Re-resize any maximized windows
QWidgetList* l = QApplication::topLevelWidgets();
if ( l ) {
QWidget * w = l->first();
while ( w ) {
if ( w->isVisible() && w->isMaximized() ) {
w->showMaximized();
}
w = l->next();
}
delete l;
}
}
#endif
#endif