summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp26
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.h8
-rw-r--r--x11/libqpe-x11/qt/qwindowsystem_qws.h3
3 files changed, 26 insertions, 11 deletions
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
@@ -416,5 +416,5 @@ int QPEApplication::defaultRotation() {
return 0;
}
-void QPEApplication::setDefaultRotation(int r ) {
+void QPEApplication::setDefaultRotation(int) {
}
@@ -450,4 +450,12 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool 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());
@@ -457,14 +465,11 @@ void QPEApplication::showDialog( QDialog* d, bool nomax ) {
|| 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" ) ) {
@@ -758,4 +763,5 @@ int QPEApplication::x11ClientMessage(QWidget* w, XEvent* event, bool b ) {
#if defined(OPIE_NEW_MALLOC)
+#define likely(x) x
// The libraries with the skiff package (and possibly others) have
@@ -776,4 +782,5 @@ void* operator new( size_t size )
void operator delete[]( void* p )
{
+ if ( likely(p) )
free( p );
}
@@ -781,4 +788,5 @@ void operator delete[]( void* p )
void operator delete[]( void* p, size_t /*size*/ )
{
+ if ( likely(p) )
free( p );
}
@@ -786,4 +794,5 @@ void operator delete[]( void* p, size_t /*size*/ )
void operator delete( void* p )
{
+ if ( likely(p) )
free( p );
}
@@ -791,4 +800,5 @@ void operator delete( void* 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
@@ -8,6 +8,7 @@
#include <qapplication.h>
#include <qevent.h>
-
-#include <qpe/timestring.h>
+#include <qtopia/timestring.h>
+#include <unistd.h>
+#include <stdlib.h>
class QCopChannel;
@@ -47,5 +48,6 @@ public:
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();
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
@@ -11,4 +11,7 @@ QWSServer(){}
static void sendKeyEvent(int, int, int, bool, bool ) { }
struct KeyboardFilter {
+ bool filter(int,int,int,bool,bool) {
+ return false;
+ }
};
static void setKeyboardFilter( KeyboardFilter* ) {