From 632d3e87a7e2cf6efecb676987d622e937ecafb8 Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 16 Apr 2005 22:00:51 +0000 Subject: Opie/X11: Minor updates to build a recent Opie version for usage with the X Window System --- (limited to 'x11') diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp index 73e7ce4..c49f3ad 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.cpp +++ b/x11/libqpe-x11/qpe/qpeapplication.cpp @@ -415,7 +415,7 @@ void QPEApplication::applyStyle() { int QPEApplication::defaultRotation() { return 0; } -void QPEApplication::setDefaultRotation(int r ) { +void QPEApplication::setDefaultRotation(int) { } void QPEApplication::grabKeyboard() { @@ -449,6 +449,14 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool m) { d->show(mw, m ); } void QPEApplication::showDialog( QDialog* d, bool nomax ) { + showWidget( d, nomax ); +} +int QPEApplication::execDialog( QDialog* d, bool nomax) { + showDialog(d,nomax); + return d->exec(); +} + +void QPEApplication::showWidget( QWidget* d, bool nomax ) { QSize sh = d->sizeHint(); int w = QMAX(sh.width(),d->width()); int h = QMAX(sh.height(),d->height()); @@ -456,16 +464,13 @@ void QPEApplication::showDialog( QDialog* d, bool nomax ) { && ( w > qApp->desktop()->width()*3/4 || h > qApp->desktop()->height()*3/4 ) ) { - d->showMaximized(); + d->showMaximized(); } else { - d->resize(w,h); - d->show(); + d->resize(w,h); + d->show(); } } -int QPEApplication::execDialog( QDialog* d, bool nomax) { - showDialog(d,nomax); - return d->exec(); -} + void QPEApplication::setKeepRunning() { if ( qApp && qApp->inherits( "QPEApplication" ) ) { QPEApplication * qpeApp = ( QPEApplication* ) qApp; @@ -757,6 +762,7 @@ int QPEApplication::x11ClientMessage(QWidget* w, XEvent* event, bool b ) { #define KeyRelease XKeyRelease #if defined(OPIE_NEW_MALLOC) +#define likely(x) x // The libraries with the skiff package (and possibly others) have // completely useless implementations of builtin new and delete that @@ -775,21 +781,25 @@ void* operator new( size_t size ) void operator delete[]( void* p ) { + if ( likely(p) ) free( p ); } void operator delete[]( void* p, size_t /*size*/ ) { + if ( likely(p) ) free( p ); } void operator delete( void* p ) { + if ( likely(p) ) free( p ); } void operator delete( void* p, size_t /*size*/ ) { + if ( likely(p) ) free( p ); } diff --git a/x11/libqpe-x11/qpe/qpeapplication.h b/x11/libqpe-x11/qpe/qpeapplication.h index b1fc074..5521998 100644 --- a/x11/libqpe-x11/qpe/qpeapplication.h +++ b/x11/libqpe-x11/qpe/qpeapplication.h @@ -7,8 +7,9 @@ #include #include - -#include +#include +#include +#include class QCopChannel; class QPEApplication : public QApplication { @@ -46,7 +47,8 @@ public: void showMainDocumentWidget( QWidget*, bool nomax = FALSE ); static void showDialog( QDialog*, bool nomax = FALSE ); - static int execDialog( QDialog*, bool nomax = FALSE ); + static int execDialog ( QDialog*, bool nomax = FALSE ); + static void showWidget( QWidget*, bool nomax = FALSE ); static void setKeepRunning(); bool keepRunning()const; diff --git a/x11/libqpe-x11/qt/qwindowsystem_qws.h b/x11/libqpe-x11/qt/qwindowsystem_qws.h index 88902c8..42470cd 100644 --- a/x11/libqpe-x11/qt/qwindowsystem_qws.h +++ b/x11/libqpe-x11/qt/qwindowsystem_qws.h @@ -10,6 +10,9 @@ QWSServer(){} ~QWSServer(){} static void sendKeyEvent(int, int, int, bool, bool ) { } struct KeyboardFilter { + bool filter(int,int,int,bool,bool) { + return false; + } }; static void setKeyboardFilter( KeyboardFilter* ) { -- cgit v0.9.0.2