summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorllornkcor <llornkcor>2004-04-25 11:17:38 (UTC)
committer llornkcor <llornkcor>2004-04-25 11:17:38 (UTC)
commit84466242f91283378aec1b1ecda0bb27eb4f6097 (patch) (side-by-side diff)
tree55fd40bfa6dbfbd3cccdb9de51551d7861603b0c /library/qpeapplication.cpp
parentab09b0ec3c7fb83d6438af1e4f9cebedaeab71df (diff)
downloadopie-84466242f91283378aec1b1ecda0bb27eb4f6097.zip
opie-84466242f91283378aec1b1ecda0bb27eb4f6097.tar.gz
opie-84466242f91283378aec1b1ecda0bb27eb4f6097.tar.bz2
remove commented
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index c875ff2..86dbe85 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1032,40 +1032,32 @@ void QPEApplication::mapToDefaultAction( QWSKeyEvent * ke, int key )
// specialised actions for certain widgets. May want to
// add more stuff here.
if ( activePopupWidget() && activePopupWidget() ->inherits( "QListBox" )
&& activePopupWidget() ->parentWidget()
&& activePopupWidget() ->parentWidget() ->inherits( "QComboBox" ) )
key = Qt::Key_Return;
if ( activePopupWidget() && activePopupWidget() ->inherits( "QPopupMenu" ) )
key = Qt::Key_Return;
#ifdef QWS
ke->simpleData.keycode = key;
#endif
}
-// class HackWidget : public QWidget
-// {
-// public:
-// bool needsOk()
-// {
-// return ( getWState() & WState_Reserved1 );
-// }
-// };
/*!
\internal
*/
#ifdef QWS
bool QPEApplication::qwsEventFilter( QWSEvent * e )
{
if ( !d->notbusysent && e->type == QWSEvent::Focus ) {
if ( qApp->type() != QApplication::GuiServer ) {
QCopEnvelope e( "QPE/System", "notBusy(QString)" );
e << d->appName;
}
d->notbusysent = TRUE;
}
if ( type() == GuiServer ) {
@@ -1109,32 +1101,33 @@ bool QPEApplication::qwsEventFilter( QWSEvent * e )
}
}
}
}
else if ( ke->simpleData.keycode == Qt::Key_F30 ) {
// Use special "select" key to do whatever default action a widget has
mapToDefaultAction( ke, Qt::Key_Space );
}
else if ( ke->simpleData.keycode == Qt::Key_Escape &&
ke->simpleData.is_press ) {
// Escape key closes app if focus on toplevel
QWidget * active = activeWindow();
if ( active && active->testWFlags( WType_TopLevel ) &&
( int ) active->winId() == ke->simpleData.window &&
!active->testWFlags( WStyle_Dialog | WStyle_Customize | WType_Popup | WType_Desktop ) ) {
if ( active->inherits( "QDialog" ) ) {
+ qDebug("dialog hack");
HackDialog * d = ( HackDialog * ) active;
d->rejectIt();
return TRUE;
}
}
}
else if ( ke->simpleData.keycode >= Qt::Key_F1 && ke->simpleData.keycode <= Qt::Key_F29 ) {
// this should be if ( ODevice::inst ( )-> buttonForKeycode ( ... ))
// but we cannot access libopie function within libqpe :(
QWidget * active = activeWindow ( );
if ( active && ((int) active-> winId ( ) == ke-> simpleData.window )) {
if ( d-> kbgrabbed ) { // we grabbed the keyboard
QChar ch ( ke-> simpleData.unicode );
QKeyEvent qke ( ke-> simpleData. is_press ? QEvent::KeyPress : QEvent::KeyRelease,
ke-> simpleData.keycode,