summaryrefslogtreecommitdiff
authorzecke <zecke>2003-10-07 13:03:51 (UTC)
committer zecke <zecke>2003-10-07 13:03:51 (UTC)
commit2ffa87f9e7f7f5c3db3f18880aa1040e870b2ba7 (patch) (side-by-side diff)
tree05d7a3b407325fe71dce9ea23b817decd0403ea4
parent75f35445e9f3ec2f730f779d67f4189296bd9c5e (diff)
downloadopie-2ffa87f9e7f7f5c3db3f18880aa1040e870b2ba7.zip
opie-2ffa87f9e7f7f5c3db3f18880aa1040e870b2ba7.tar.gz
opie-2ffa87f9e7f7f5c3db3f18880aa1040e870b2ba7.tar.bz2
use OPIE_NEW_MALLOC as well
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--x11/libqpe-x11/qpe/qpeapplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/x11/libqpe-x11/qpe/qpeapplication.cpp b/x11/libqpe-x11/qpe/qpeapplication.cpp
index eb01e50..0a98481 100644
--- a/x11/libqpe-x11/qpe/qpeapplication.cpp
+++ b/x11/libqpe-x11/qpe/qpeapplication.cpp
@@ -710,86 +710,86 @@ void QPEApplication::prepareForTermination( bool willrestart )
// Draw a big wait icon, the image can be altered in later revisions
// QWidget *d = QApplication::desktop();
QImage img = Resource::loadImage( "launcher/new_wait" );
QPixmap pix;
pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) );
QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize |
QWidget::WStyle_NoBorder | QWidget::WStyle_Tool );
lblWait->setPixmap( pix );
lblWait->setAlignment( QWidget::AlignCenter );
lblWait->show();
lblWait->showMaximized();
}
#ifndef SINGLE_APP
{ QCopEnvelope envelope( "QPE/System", "forceQuit()" );
}
processEvents(); // ensure the message goes out.
sleep( 1 ); // You have 1 second to comply.
#endif
}
int QPEApplication::x11ClientMessage(QWidget* w, XEvent* event, bool b ) {
qWarning("X11 ClientMessage %d %d", event->type, ClientMessage);
if ( event->type == ClientMessage ) {
if ( (event->xclient.message_type == d->wm_protocols) &&
(event->xclient.data.l[0] == d->wm_context_accept ) ) {
qWarning("accepted!!!");
/*
* I'm not sure if we should use activeWidget
* or activeModalWidget
* a QDialog could be not modal too
*/
if ( w->inherits("QDialog" ) ) {
qWarning("inherits QDialog!!!");
QDialog* dia = (QDialog*)w;
/*
* call it directly or via QTimer::singleShot?
*/
QTimer::singleShot(0, dia, SLOT(accept() ) );
return 0;
}
}
}
return QApplication::x11ClientMessage(w, event, b );
}
#define KeyPress XKeyPress
#define KeyRelease XKeyRelease
-#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
+#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 )
{
free( p );
}
void operator delete[]( void* p, size_t /*size*/ )
{
free( p );
}
void operator delete( void* p )
{
free( p );
}
void operator delete( void* p, size_t /*size*/ )
{
free( p );
}
#endif