diff options
author | Max Waterman <david.waterman@nokia.com> | 2010-07-14 08:06:28 +0300 |
---|---|---|
committer | Dominik Kapusta <dominik.kapusta@teleca.com> | 2010-08-03 15:40:28 +0200 |
commit | 6e3d8a5cbe4053057845d1d0cb3a531e3fc44370 (patch) | |
tree | 4d789f340190629f344418bf847fec45615f16fd /tools | |
parent | 9a8e7b55f6d1f973e94bab1feae25b3397231d35 (diff) |
Fixes: NB#172283 - There should be proper animation when launching a child application window via task chaining
RevBy: Tomas, Daniel
Details:
Does the framework-side changes required to trigger the compositor to do the transition animation.
Also moved the framework-side code for the task switcher view stacking into the same place.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/m-servicefwgen.d/m-servicefwgen.cpp | 69 |
1 files changed, 4 insertions, 65 deletions
diff --git a/tools/m-servicefwgen.d/m-servicefwgen.cpp b/tools/m-servicefwgen.d/m-servicefwgen.cpp index 93044fb2..90707360 100644 --- a/tools/m-servicefwgen.d/m-servicefwgen.cpp +++ b/tools/m-servicefwgen.d/m-servicefwgen.cpp @@ -820,7 +820,6 @@ void processAdaptorCppFile() QString previousLine; bool inChainTask = false; - bool needGoBackMethod = false; while (!inS.atEnd()) { QString line = inS.readLine(); @@ -846,9 +845,7 @@ void processAdaptorCppFile() if (w.needsMApplication() && line.contains(QRegExp("#include <QtCore/Q(Meta)?Object>"))) { outS << "\n" \ - "#include <MApplication>\n" \ - "#include <MApplicationPage>\n" \ - "#include <MApplicationWindow>\n" \ + "#include <MComponentData>\n" \ "#include <MDebug>\n" \ "\n" \ "#ifdef Q_WS_X11\n" \ @@ -857,45 +854,16 @@ void processAdaptorCppFile() "#endif // Q_WS_X11\n" \ "\n" + line + "\n"; - } else if (w.needsMApplication() && line.contains("QDBusAbstractAdaptor(parent)")) { - outS - << line + "," << endl - << " windowId(-1)" << endl; } else if (inChainTask) { line.remove(w.chainTag()); if (line == "{") { outS << line << endl - << " this->windowId = windowId;" << endl + << " MComponentData::pushChainedWindowId( windowId );" << endl << endl; } else if (line.contains("return") || line == "}") { // match end of function - need to add the connect *before* the return, if there is one - outS << -"\n"\ -" MApplicationWindow *appWindow = MApplication::activeApplicationWindow();\n"\ -" if (appWindow != 0) {\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 method 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"\ -"#ifdef Q_WS_X11\n"\ -" // update the X server\n"\ -" XSetTransientForHint(QX11Info::display(), appWindow->winId(), windowId);\n"\ -"#endif // Q_WS_X11\n"\ -"\n" -+ line + "\n"; inChainTask = false; + outS << line << endl; } else { outS << line << endl; } @@ -911,7 +879,6 @@ void processAdaptorCppFile() outS << line << endl; inChainTask = true; - needGoBackMethod = true; } else if (line.contains("This file was generated by")) { outS << w.generatedByComment() << endl; } else if (line.contains( "Command line was:")) { @@ -924,24 +891,6 @@ void processAdaptorCppFile() previousLine = line; } - if (needGoBackMethod) { - outS << -"void " + w.upperCamelAdaptorName() + "::goBack()\n"\ -"{\n" \ -" bool backServiceRegistered = ( windowId != -1 );\n"\ -" if ( backServiceRegistered ) {\n"\ -" // All we need to do is close the window as it has the WM_TRANSIENT_FOR set\n"\ -" // the compositor should bring out the parent window\n"\ -" MApplicationWindow *appWindow = MApplication::activeApplicationWindow();\n"\ -" if ( appWindow != 0 ) {\n"\ -" appWindow->close();\n"\ -" }\n"\ -" } else {\n"\ -" qWarning() << \"backService is not registered: not going back\";\n"\ -" }\n"\ -"}\n"; - } - if (w.hasNameSpace()) { outS << endl; outS << "}; // namespace" << endl; @@ -1001,17 +950,7 @@ void processAdaptorHeaderFile() } } - if (line.contains("Q_SIGNALS:")) { - if (hasChains) { - newAdaptorHeaderStream - << " void goBack();" << endl - << "" << endl - << "private:" << endl - << " int windowId;" << endl - << "" << endl; - } - newAdaptorHeaderStream << line << endl; - } else if (line.contains(QRegExp("chainTask=\\\\\"\\w+\\\\\"")) || line.contains(QRegExp("asyncTask=\\\\\"\\w+\\\\\""))) { // process comment - remember the backslashes are in the source too, hence so many of them + if (line.contains(QRegExp("chainTask=\\\\\"\\w+\\\\\"")) || line.contains(QRegExp("asyncTask=\\\\\"\\w+\\\\\""))) { // process comment - remember the backslashes are in the source too, hence so many of them // remove asyncTask attribute { QRegExp matchThis("asyncTask=\\\\\"\\w+\\\\\"\\s*"); |