diff options
author | Max Waterman <david.waterman@nokia.com> | 2010-06-14 15:48:33 +0300 |
---|---|---|
committer | Max Waterman <david.waterman@nokia.com> | 2010-06-14 18:29:09 +0300 |
commit | e71ba511b246fc2a211ebc5c700c61818127f99d (patch) | |
tree | e2982e74f0ca7bb2e8747884686b3b29636bc3b9 /tools | |
parent | 17cbbfc6754d5eff92d10e55579d55c192e65e2a (diff) | |
parent | 6d083d4b9eecb41670d0739ad91e88e8c9588757 (diff) |
Merge commit 'refs/merge-requests/637' of git@gitorious.org:maemo-6-ui-framework/libdui
Diffstat (limited to 'tools')
-rw-r--r-- | tools/m-servicefwgen.d/m-servicefwgen.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/tools/m-servicefwgen.d/m-servicefwgen.cpp b/tools/m-servicefwgen.d/m-servicefwgen.cpp index 935a618a..52a1308d 100644 --- a/tools/m-servicefwgen.d/m-servicefwgen.cpp +++ b/tools/m-servicefwgen.d/m-servicefwgen.cpp @@ -813,6 +813,8 @@ void processAdaptorCppFile() "#include <MApplicationWindow>\n" \ "#include <MApplicationIfProxy>\n" \ "#include <MEscapeButtonPanel>\n" \ + "#include <MDebug>\n" \ + "\n" \ "#include <QX11Info>\n" \ "#include <X11/Xutil.h>\n" \ "#include <X11/Xlib.h>\n" \ @@ -839,11 +841,20 @@ void processAdaptorCppFile() " MApplicationWindow *appWindow = MApplication::activeApplicationWindow();\n"\ " if (appWindow != 0) {\n"\ " appWindow->setWindowTitle( windowTitle );\n"\ -" appWindow->currentPage()->setEscapeMode( MApplicationPageModel::EscapeManualBack );\n"\ -" // connect to the back button - assumes the above 'showImage' opens a\n"\ -" // new window and so the window referred to below is already the top one\n"\ -" connect(appWindow->currentPage(), SIGNAL(backButtonClicked()),\n"\ +"\n"\ +" MApplicationPage *currentPage = appWindow->currentPage();\n"\ +"\n"\ +" if ( currentPage != 0 ) {\n"\ +" currentPage->setEscapeMode( MApplicationPageModel::EscapeManualBack );\n"\ +" // connect to the back button - assumes the above 'showImage' opens a\n"\ +" // new window and so the window referred to below is already the top one\n"\ +" connect(currentPage, SIGNAL(backButtonClicked()),\n"\ " this, SLOT(goBack()));\n"\ +" } else {\n"\ +" mDebug( __PRETTY_FUNCTION__ ) << \"No currentPage! - broken chain\";\n"\ +" }\n"\ +" } else {\n"\ +" mDebug( __PRETTY_FUNCTION__ ) << \"No activeApplicationWindow! - broken chain\";\n"\ " }\n"\ "\n"\ " // update the X server\n"\ @@ -888,18 +899,16 @@ void processAdaptorCppFile() outS << "void " + w.upperCamelAdaptorName() + "::goBack()\n"\ "{\n" \ -" qDebug() << __PRETTY_FUNCTION__;\n"\ -"\n"\ " bool backServiceRegistered = ( windowId != -1 );\n"\ " if ( backServiceRegistered ) {\n"\ " MApplicationIfProxy mApplicationIfProxy(backServiceName, this);\n"\ "\n"\ " if (mApplicationIfProxy.connection().isConnected()) {\n"\ -" qDebug() << \"Launching \" << backServiceName;\n"\ +" mDebug( __PRETTY_FUNCTION__ ) << \"Launching \" << backServiceName;\n"\ " mApplicationIfProxy.launch();\n"\ " } else {\n"\ -" qWarning() << \"Could not launch\" << backServiceName;\n"\ -" qWarning() << \"DBus not connected?\";\n"\ +" mDebug( __PRETTY_FUNCTION__ ) << \"Could not launch\" << backServiceName;\n"\ +" mDebug( __PRETTY_FUNCTION__ ) << \"DBus not connected?\";\n"\ " }\n"\ "\n"\ " // unhide the chain parent's window\n"\ |