summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-04-25 09:23:09 (UTC)
committer llornkcor <llornkcor>2004-04-25 09:23:09 (UTC)
commita4b1facac26431ddfcb4d31b2e6489a8a9e047b9 (patch) (side-by-side diff)
tree0742ebba7371963c369cbfc03f17eefc605f52d5
parent5d3c80f70109bee75d55db2a11d7112eb7ebaa99 (diff)
downloadopie-a4b1facac26431ddfcb4d31b2e6489a8a9e047b9.zip
opie-a4b1facac26431ddfcb4d31b2e6489a8a9e047b9.tar.gz
opie-a4b1facac26431ddfcb4d31b2e6489a8a9e047b9.tar.bz2
remove embeddedkonsole hack
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 10c6c40..c875ff2 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1105,51 +1105,48 @@ bool QPEApplication::qwsEventFilter( QWSEvent * e )
}
else {
// do the same as with the select key: Map to the default action of the widget:
mapToDefaultAction( ke, Qt::Key_Return );
}
}
}
}
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" ) ) {
HackDialog * d = ( HackDialog * ) active;
d->rejectIt();
return TRUE;
}
- else if ( strcmp( argv() [ 0 ], "embeddedkonsole" ) != 0 ) {
- active->close();
- }
}
}
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,
ch. latin1 ( ),
ke-> simpleData.modifiers,
QString ( ch ),
ke-> simpleData.is_auto_repeat, 1 );
QObject *which = QWidget::keyboardGrabber ( );
if ( !which )
which = QApplication::focusWidget ( );
if ( !which )
which = QApplication::activeWindow ( );
if ( !which )
which = qApp;
@@ -2130,49 +2127,49 @@ int QPEApplication::exec()
#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() || strcmp( argv() [ 0 ], "embeddedkonsole" ) == 0 )
+ 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
*/
void QPEApplication::installTranslation( const QString& baseName ) {
QTranslator* trans = new QTranslator(this);
QString tfn = qpeDir() + "/i18n/"+baseName;
if ( trans->load( tfn ) )
installTranslator( trans );
else