aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Kapusta <dominik.kapusta@teleca.com>2010-03-25 12:22:35 +0100
committerDaniel d'Andrada <daniel.dandrada@nokia.com>2010-03-28 16:34:21 +0300
commitdc768466e0fbf445c8de5a6e719e2f278c2038e5 (patch)
treed752362efe365e7cf17eee729cf430061d14d4cc
parent1a365621765d4f5a09577c8e7ae56fada93318c6 (diff)
Changes: Remove appearNow(), disappearNow() and dismissNow() from DuiSceneWindow API.
RevBy: Daniel d'Andrada Details: From now on, to appear/disappear/dismiss a scene window without animations one would have to use DuiSceneManager's API: DuiSceneManager::appearSceneWindowNow() DuiSceneManager::disappearSceneWindowNow() DuiSceneManager::dismissSceneWindowNow()
-rw-r--r--benchmarks/pt_minimalduiapplication/pt_minimalduiapplication.cpp3
-rw-r--r--demos/applicationextension/main.cpp3
-rw-r--r--demos/widgetsgallery/main.cpp3
-rw-r--r--demos/widgetsgallery/timedemo.cpp8
-rw-r--r--doc/src/news.dox2
-rw-r--r--src/animation/scene/duipageswitchanimation.cpp16
-rw-r--r--src/animation/scene/duipageswitchanimation.h3
-rw-r--r--src/animation/scene/duipageswitchanimation_p.h2
-rw-r--r--src/events/duidismissevent.h4
-rw-r--r--src/scene/duiscenemanager.cpp8
-rw-r--r--src/scene/duiscenemanager.h9
-rw-r--r--src/widgets/duiapplicationpage.h12
-rw-r--r--src/widgets/duiapplicationwindow.cpp16
-rw-r--r--src/widgets/duicompleter.cpp19
-rw-r--r--src/widgets/duicompleter.h5
-rw-r--r--src/widgets/duidialog.cpp44
-rw-r--r--src/widgets/duidialog.h32
-rw-r--r--src/widgets/duidialog_p.h2
-rw-r--r--src/widgets/duiscenewindow.cpp93
-rw-r--r--src/widgets/duiscenewindow.h51
-rw-r--r--src/widgets/duiscenewindow_p.h7
-rw-r--r--tests/stubs/duiscenewindowprivate_stub.h14
-rw-r--r--tests/ut_duiapplicationpage/ut_duiapplicationpage.cpp5
-rw-r--r--tests/ut_duiapplicationwindow/ut_duiapplicationwindow.cpp18
-rw-r--r--tests/ut_duiscenemanager/ut_duiscenemanager.cpp8
-rw-r--r--tests/ut_duiscenewindow/ut_duiscenewindow.cpp48
-rw-r--r--tests/ut_duiscenewindow/ut_duiscenewindow.h2
-rw-r--r--tests/ut_duitextedit/ut_duitextedit.cpp2
28 files changed, 139 insertions, 300 deletions
diff --git a/benchmarks/pt_minimalduiapplication/pt_minimalduiapplication.cpp b/benchmarks/pt_minimalduiapplication/pt_minimalduiapplication.cpp
index fe188e38..6c1b4d8b 100644
--- a/benchmarks/pt_minimalduiapplication/pt_minimalduiapplication.cpp
+++ b/benchmarks/pt_minimalduiapplication/pt_minimalduiapplication.cpp
@@ -23,6 +23,7 @@
#include <DuiApplication>
#include <DuiApplicationWindow>
#include <DuiApplicationPage>
+#include <DuiSceneManager>
#include <DuiLocale>
#include <QProcess>
@@ -92,7 +93,7 @@ void Pt_minimalduiapplication::pageAppear()
if (appearType == "appear") {
MY_QBENCHMARK_ONCE(page->appear();)
} else {
- MY_QBENCHMARK_ONCE(page->appearNow();)
+ MY_QBENCHMARK_ONCE(window->sceneManager()->appearSceneWindowNow(page);)
}
}
diff --git a/demos/applicationextension/main.cpp b/demos/applicationextension/main.cpp
index dbfbc576..34ce5a95 100644
--- a/demos/applicationextension/main.cpp
+++ b/demos/applicationextension/main.cpp
@@ -22,6 +22,7 @@
#include <DuiApplicationWindow>
#include <DuiApplicationPage>
#include <DuiButton>
+#include <DuiSceneManager>
#include <DuiSlider>
#include <DuiLabel>
#include <duiapplicationextensionarea.h>
@@ -105,7 +106,7 @@ int main(int argc, char **argv)
DuiApplicationWindow window;
DemoPage page;
window.show();
- page.appearNow();
+ window.sceneManager()->appearSceneWindowNow(&page);
return app.exec();
}
diff --git a/demos/widgetsgallery/main.cpp b/demos/widgetsgallery/main.cpp
index bfc09d9c..8dee1c77 100644
--- a/demos/widgetsgallery/main.cpp
+++ b/demos/widgetsgallery/main.cpp
@@ -29,6 +29,7 @@
#include <DuiAction>
#include <DuiLocale>
#include <DuiGConfItem>
+#include <DuiSceneManager>
#include "timingscene.h"
#include "listpage.h"
@@ -99,7 +100,7 @@ int main(int argc, char **argv)
mainLoopHelper.triggerTermination(EmptyMainLoopHelper::QuitOnEmpty);
}
- listPage.appearNow();
+ window.sceneManager()->appearSceneWindowNow(&listPage);
int exitCode = application.exec();
delete timedemo;
diff --git a/demos/widgetsgallery/timedemo.cpp b/demos/widgetsgallery/timedemo.cpp
index 36e01769..2b26af30 100644
--- a/demos/widgetsgallery/timedemo.cpp
+++ b/demos/widgetsgallery/timedemo.cpp
@@ -24,6 +24,9 @@
#include "templatepage.h"
+#include <DuiApplication>
+#include <DuiWindow>
+#include <DuiSceneManager>
#include <DuiApplicationPage>
#include <QApplication>
@@ -161,7 +164,10 @@ void Timedemo::showNextPage()
if (currentPage == m_pFrontPage) {
// FIXME: the front page needs a special invitation.
// otherwise it does not show up again
- demoPages[m_currentPageIndex]->appearNow();
+ if (DuiApplication::activeWindow()) {
+ // FIXME: why appearSceneWindowNow() and not appear()?
+ DuiApplication::activeWindow()->sceneManager()->appearSceneWindowNow(demoPages[m_currentPageIndex]);
+ }
}
beginBenchmark();
} else {
diff --git a/doc/src/news.dox b/doc/src/news.dox
index a213ee53..67d20f3f 100644
--- a/doc/src/news.dox
+++ b/doc/src/news.dox
@@ -111,6 +111,8 @@
- ...
Use the supplied libdui/tools/migration-scripts/migrate_duiappletmessagetype
script for automatic replacement.
+- DuiSceneWindow::appearNow(), DuiSceneWindow::disappearNow(), DuiSceneWindow::dismissNow() -
+ use DuiSceneManager API to forcibly have scene window transitions without animations.
\section v0190
diff --git a/src/animation/scene/duipageswitchanimation.cpp b/src/animation/scene/duipageswitchanimation.cpp
index 52c8f3f3..81b650d1 100644
--- a/src/animation/scene/duipageswitchanimation.cpp
+++ b/src/animation/scene/duipageswitchanimation.cpp
@@ -22,6 +22,13 @@
#include "duipageswitchanimation.h"
#include "duipageswitchanimation_p.h"
#include "duiscenewindow.h"
+#include "duiscenemanager.h"
+
+void DuiPageSwitchAnimationPrivate::_q_animationFinished()
+{
+ if (oldPage && oldPage->sceneManager())
+ oldPage->sceneManager()->disappearSceneWindowNow(oldPage);
+}
DuiPageSwitchAnimation::DuiPageSwitchAnimation(QObject *parent) :
DuiParallelAnimationGroup(new DuiPageSwitchAnimationPrivate, parent)
@@ -44,6 +51,8 @@ DuiPageSwitchAnimation::DuiPageSwitchAnimation(QObject *parent) :
d->positionOldPageAnimation->setDuration(style()->duration());
d->positionOldPageAnimation->setStartValue(QPointF(0, 0));
addAnimation(d->positionOldPageAnimation);
+
+ connect(this, SIGNAL(finished()), SLOT(_q_animationFinished()));
}
DuiPageSwitchAnimation::DuiPageSwitchAnimation(DuiPageSwitchAnimationPrivate *dd, QObject *parent) :
@@ -55,6 +64,11 @@ void DuiPageSwitchAnimation::setNewPage(DuiSceneWindow *newPage)
{
Q_D(DuiPageSwitchAnimation);
+ if (d->newPage)
+ disconnect(this, SIGNAL(finished()), d->newPage, SIGNAL(appeared()));
+
+ connect(this, SIGNAL(finished()), newPage, SIGNAL(appeared()));
+
d->newPage = newPage;
}
@@ -98,3 +112,5 @@ void DuiPageSwitchAnimation::updateState(QAbstractAnimation::State newState,
d->positionOldPageAnimation->setEndValue(QPointF(d->oldPage->boundingRect().width(), 0));
}
}
+
+#include "moc_duipageswitchanimation.cpp"
diff --git a/src/animation/scene/duipageswitchanimation.h b/src/animation/scene/duipageswitchanimation.h
index 0d95d02e..cca6d130 100644
--- a/src/animation/scene/duipageswitchanimation.h
+++ b/src/animation/scene/duipageswitchanimation.h
@@ -53,6 +53,9 @@ protected:
virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+private:
+ Q_PRIVATE_SLOT(d_func(), void _q_animationFinished())
+
};
//! \internal_end
diff --git a/src/animation/scene/duipageswitchanimation_p.h b/src/animation/scene/duipageswitchanimation_p.h
index 7db03c9e..09aa427a 100644
--- a/src/animation/scene/duipageswitchanimation_p.h
+++ b/src/animation/scene/duipageswitchanimation_p.h
@@ -33,6 +33,8 @@ class DuiPageSwitchAnimationPrivate : public DuiParallelAnimationGroupPrivate
public:
DuiSceneWindow *sceneWindow;
+ void _q_animationFinished();
+
protected:
QPointer<DuiSceneWindow> newPage;
QPointer<DuiSceneWindow> oldPage;
diff --git a/src/events/duidismissevent.h b/src/events/duidismissevent.h
index 69628dc1..f7fb68a0 100644
--- a/src/events/duidismissevent.h
+++ b/src/events/duidismissevent.h
@@ -48,8 +48,8 @@ class DuiDismissEventPrivate;
* animation will take place).
*
* If you want the scene window to be deleted after it disappears, pass
- * DuiSceneWindow::DestroyWhenDone when calling DuiSceneWindow::appear() or
- * DuiSceneWindow::appearNow(). This is very useful for independent scene windows.
+ * DuiSceneWindow::DestroyWhenDone when calling DuiSceneWindow::appear().
+ * This is very useful for independent scene windows.
*
* QObjects emits the destroyed() signal when they are deleted.
*
diff --git a/src/scene/duiscenemanager.cpp b/src/scene/duiscenemanager.cpp
index 7066140d..7d344cd9 100644
--- a/src/scene/duiscenemanager.cpp
+++ b/src/scene/duiscenemanager.cpp
@@ -818,12 +818,6 @@ void DuiSceneManagerPrivate::startPageSwitchAnimation(DuiSceneWindow *newPage,
pageSwitchAnimation->setOldPage(oldPage);
pageSwitchAnimation->setPageTransitionDirection(direction);
- pageSwitchAnimation->disconnect(SIGNAL(finished()));
-
- QObject::connect(pageSwitchAnimation, SIGNAL(finished()), newPage, SIGNAL(appeared()));
- if (oldPage)
- QObject::connect(pageSwitchAnimation, SIGNAL(finished()), oldPage, SLOT(disappearNow()));
-
pageSwitchAnimation->start();
freezeUIForAnimationDuration(pageSwitchAnimation);
}
@@ -927,7 +921,7 @@ void DuiSceneManagerPrivate::appearSceneWindow(DuiSceneWindow *window,
} else {
// Animation needs to be fast forwarded to the end,
// even if not played, to ensure that window is in correct state
- // to be shown with appearNow()
+ // to be shown with appearSceneWindowNow()
// - Maciej Jablonski
if(window->showAnimation())
window->showAnimation()->setCurrentTime(
diff --git a/src/scene/duiscenemanager.h b/src/scene/duiscenemanager.h
index bcbc2c17..52d425ff 100644
--- a/src/scene/duiscenemanager.h
+++ b/src/scene/duiscenemanager.h
@@ -181,9 +181,6 @@ public Q_SLOTS:
/*!
* Attaches a \a sceneWindow to the scene manager and makes it appear without animations (instantly).
* According to the given \a policy, a scene window can be kept or destroyed after disappearing.
- *
- * \note Normally you don't have to call this method explicitly. DuiSceneWindow::appearNow()
- * calls this method for you.
*/
void appearSceneWindowNow(DuiSceneWindow *sceneWindow, DuiSceneWindow::DeletionPolicy policy = DuiSceneWindow::KeepWhenDone);
@@ -205,9 +202,6 @@ public Q_SLOTS:
/*!
* Makes a \a sceneWindow disappear without animations (instantly) and detaches it from the scene manager.
- *
- * \note Normally you don't have to call this method explicitly. DuiSceneWindow::disappearNow()
- * calls this method for you.
*/
void disappearSceneWindowNow(DuiSceneWindow *sceneWindow);
@@ -221,9 +215,6 @@ public Q_SLOTS:
/*!
* Dismisses a \a sceneWindow without animations (instantly) and detaches it from the scene manager.
- *
- * \note Normally you don't have to call this method explicitly. DuiSceneWindow::dismissNow()
- * calls this method for you.
*/
void dismissSceneWindowNow(DuiSceneWindow *sceneWindow);
diff --git a/src/widgets/duiapplicationpage.h b/src/widgets/duiapplicationpage.h
index 23d337ac..05056b13 100644
--- a/src/widgets/duiapplicationpage.h
+++ b/src/widgets/duiapplicationpage.h
@@ -38,9 +38,9 @@ class DuiPannableViewport;
By default the page creates a pannable viewport where a user can place his component by using
centralWidget() or setCentralWidget(DuiWidget *).
- There are two functions to show the page on the screen:
- \li appear() shows the page with the associated animation.
- \li appearNow() shows the page immediately on the screen.
+ The page can be shown on the screen using appear() method. A call to appear() involves running
+ the assiciated show animation for the page. If you want to show a page instantly, refer to
+ DuiSceneManager API.
A page can contain actions, which will be shown in the navigation bar or on a view menu.
@@ -158,7 +158,7 @@ public:
/*!
* Returns true if the page is expected to rememeber its pannable viewport
- * position when hidden and restore it when shown again using appear() or appearNow().
+ * position when hidden and restore it when shown again using appear().
* \sa setRememberPosition()
*/
bool rememberPosition() const;
@@ -186,7 +186,7 @@ public:
/*!
* Convenience function that returns a pointer to the application window into
- * which the application page is shown or a null pointer if appear() or appearNow()
+ * which the application page is shown or a null pointer if appear()
* hasn't been called yet. When you call appear() and the application window
* specified as a parameter exists, this method will return it.
*
@@ -288,7 +288,7 @@ public Q_SLOTS:
/*!
* Sets whether the page should remember its pannable viewport position when
* hidden. Default value is true. Set it to false to have the viewport
- * scrolled to the top with every call to appear() or appearNow(). The scrolling
+ * scrolled to the top with every call to appear(). The scrolling
* is immediate, i.e. it's not animated at all.
* \sa rememberPosition()
*/
diff --git a/src/widgets/duiapplicationwindow.cpp b/src/widgets/duiapplicationwindow.cpp
index f97cb89b..dac8ca21 100644
--- a/src/widgets/duiapplicationwindow.cpp
+++ b/src/widgets/duiapplicationwindow.cpp
@@ -120,20 +120,20 @@ void DuiApplicationWindowPrivate::init()
q, SLOT(_q_menuDisappeared()));
if (!DuiApplication::fullScreen()) {
- statusBar->appearNow(q);
+ sceneManager->appearSceneWindowNow(statusBar);
showingStatusBar = true;
}
- navigationBar->appearNow(q);
- homeButtonPanel->appearNow(q);
- escapeButtonPanel->appearNow(q);
+ sceneManager->appearSceneWindowNow(navigationBar);
+ sceneManager->appearSceneWindowNow(homeButtonPanel);
+ sceneManager->appearSceneWindowNow(escapeButtonPanel);
// Initialize escape button to close mode.
escapeButtonPanel->setEscapeMode(DuiEscapeButtonPanelModel::CloseMode);
QObject::connect(escapeButtonPanel, SIGNAL(buttonClicked()), q, SLOT(close()));
if (q->orientation() == Dui::Portrait) {
- dockWidget->appearNow(q);
+ sceneManager->appearSceneWindowNow(dockWidget);
}
_q_placeToolBar(q->orientation());
@@ -421,7 +421,7 @@ void DuiApplicationWindowPrivate::setComponentDisplayMode(
// Dock widget is a special guy.
updateDockWidgetVisibility();
} else {
- component->appearNow(q);
+ sceneManager->appearSceneWindowNow(component);
}
} else {
component->disappear();
@@ -476,9 +476,9 @@ void DuiApplicationWindowPrivate::updateDockWidgetVisibility()
if (toolbarHasVisibleActions) {
//TODO: no animation until appear/disappear starts working properly
- dockWidget->appearNow(q);
+ sceneManager->appearSceneWindowNow(dockWidget);
} else {
- dockWidget->disappearNow();
+ sceneManager->disappearSceneWindowNow(dockWidget);
}
}
diff --git a/src/widgets/duicompleter.cpp b/src/widgets/duicompleter.cpp
index e03863a7..f6b4a355 100644
--- a/src/widgets/duicompleter.cpp
+++ b/src/widgets/duicompleter.cpp
@@ -457,40 +457,23 @@ void DuiCompleter::queryAll()
d->match(-1);
}
-void DuiCompleter::appear(DuiApplicationWindow *window, DuiSceneWindow::DeletionPolicy policy)
+void DuiCompleter::appear(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
{
DuiSceneWindow::appear(window, policy);
model()->setActive(true);
}
-void DuiCompleter::appearNow(DuiApplicationWindow *window, DuiSceneWindow::DeletionPolicy policy)
-{
- DuiSceneWindow::appearNow(window, policy);
- model()->setActive(true);
-}
-
void DuiCompleter::appear(DuiSceneWindow::DeletionPolicy policy)
{
appear(0, policy);
}
-void DuiCompleter::appearNow(DuiSceneWindow::DeletionPolicy policy)
-{
- appearNow(0, policy);
-}
-
void DuiCompleter::disappear()
{
DuiSceneWindow::disappear();
model()->setActive(false);
}
-void DuiCompleter::disappearNow()
-{
- DuiSceneWindow::disappearNow();
- model()->setActive(false);
-}
-
bool DuiCompleter::eventFilter(QObject *object, QEvent *e)
{
Q_D(DuiCompleter);
diff --git a/src/widgets/duicompleter.h b/src/widgets/duicompleter.h
index 86504eb3..b176849f 100644
--- a/src/widgets/duicompleter.h
+++ b/src/widgets/duicompleter.h
@@ -292,12 +292,9 @@ public Q_SLOTS:
protected Q_SLOTS:
//! \reimp
- virtual void appear(DuiApplicationWindow *window, DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
- virtual void appearNow(DuiApplicationWindow *window, DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
+ virtual void appear(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
virtual void appear(DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
- virtual void appearNow(DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
virtual void disappear();
- virtual void disappearNow();
virtual bool eventFilter(QObject *, QEvent *);
//! \reimp_end
diff --git a/src/widgets/duidialog.cpp b/src/widgets/duidialog.cpp
index 487dd87a..52e697bd 100644
--- a/src/widgets/duidialog.cpp
+++ b/src/widgets/duidialog.cpp
@@ -76,27 +76,19 @@ void DuiDialogPrivate::init()
q->setFocusPolicy(Qt::ClickFocus);
}
-void DuiDialogPrivate::appear(bool now, DuiSceneWindow::DeletionPolicy policy)
+void DuiDialogPrivate::appear(DuiSceneWindow::DeletionPolicy policy)
{
Q_Q(DuiDialog);
DuiWindow *window;
if (q->isSystemModal()) {
if (prepareStandAloneAppearance(policy)) {
- if (now) {
- q->appearNow(standAloneWindow);
- } else {
- q->appear(standAloneWindow);
- }
+ q->appear(standAloneWindow);
}
} else {
window = DuiApplication::activeWindow();
if (window) {
- if (now) {
- q->appearNow(window, policy);
- } else {
- q->appear(window, policy);
- }
+ q->appear(window, policy);
} else {
duiWarning("DuiDialog") << "Cannot appear. No DuiWindow currently active.";
}
@@ -138,7 +130,7 @@ void DuiDialogPrivate::updateStandAloneHomeButtonVisibility()
if (homeButtonPanel) {
if (homeButtonPanel->scene() != 0) {
Q_ASSERT(homeButtonPanel->scene() == standAloneWindow->scene());
- homeButtonPanel->disappearNow();
+ standAloneWindow->sceneManager()->disappearSceneWindowNow(homeButtonPanel);
}
delete homeButtonPanel;
@@ -151,7 +143,7 @@ void DuiDialogPrivate::updateStandAloneHomeButtonVisibility()
standAloneWindow->connect(homeButtonPanel,
SIGNAL(buttonClicked()), SLOT(showMinimized()));
- homeButtonPanel->appearNow(standAloneWindow);
+ standAloneWindow->sceneManager()->appearSceneWindowNow(homeButtonPanel);
}
}
@@ -173,7 +165,8 @@ void DuiDialogPrivate::_q_onStandAloneDialogDisappeared()
}
if (homeButtonPanel) {
- homeButtonPanel->disappearNow();
+ if (homeButtonPanel->sceneManager())
+ homeButtonPanel->sceneManager()->disappearSceneWindowNow(homeButtonPanel);
delete homeButtonPanel;
homeButtonPanel = 0;
}
@@ -211,7 +204,7 @@ bool DuiDialogPrivate::prepareStandAloneAppearance(DuiSceneWindow::DeletionPolic
// Check whether the dialog is already present in some scene manager
if (shown) {
if (q->sceneManager() != standAloneWindow->sceneManager()) {
- q->disappearNow();
+ q->sceneManager()->disappearSceneWindowNow(q);
} else {
ok = false;
}
@@ -406,7 +399,7 @@ Dui::StandardButton DuiDialog::standardButton(DuiButtonModel *buttonModel) const
void DuiDialog::appear(DuiSceneWindow::DeletionPolicy policy)
{
Q_D(DuiDialog);
- d->appear(false, policy);
+ d->appear(policy);
}
void DuiDialog::appear(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
@@ -416,24 +409,7 @@ void DuiDialog::appear(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
if (window) {
DuiSceneWindow::appear(window, policy);
} else {
- d->appear(false, policy);
- }
-}
-
-void DuiDialog::appearNow(DuiSceneWindow::DeletionPolicy policy)
-{
- Q_D(DuiDialog);
- d->appear(true, policy);
-}
-
-void DuiDialog::appearNow(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
-{
- Q_D(DuiDialog);
-
- if (window) {
- DuiSceneWindow::appearNow(window, policy);
- } else {
- d->appear(true, policy);
+ d->appear(policy);
}
}
diff --git a/src/widgets/duidialog.h b/src/widgets/duidialog.h
index 3e156e7f..7f2a2940 100644
--- a/src/widgets/duidialog.h
+++ b/src/widgets/duidialog.h
@@ -52,7 +52,7 @@ class DuiDismissEvent;
Can be hidden when central widget is customized.
DuiDialog may be application modal or system modal. When displayed inside a given
- DuiWindow (by supplying a window parameter to appear(), appearNow() or exec())
+ DuiWindow (by supplying a window parameter to appear() or exec())
it will ignore the systemModal property and will be application modal. If
no window is supplied and systemModal is set to true it will be displayed in its own
separate top-level DuiWindow and will be system modal. The home button is not accessible
@@ -313,7 +313,7 @@ public:
/*!
* \brief Defines whether the dialog should be displayed as system modal.
*
- * Changing this property will affect only subsequent calls to appear(), appearNow()
+ * Changing this property will affect only subsequent calls to appear()
* and exec(). I.e., if called between an appear() and a disappear() it won't affect
* the modality of the ongoing appearance.
*
@@ -422,7 +422,7 @@ public Q_SLOTS:
*
* \param policy Deletion policy, defines the ownership for this window
*
- * \sa appearNow(), setSystemModal()
+ * \sa setSystemModal()
*/
virtual void appear(DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
@@ -437,35 +437,11 @@ public Q_SLOTS:
* \param window The window on which the dialog is going to be shown.
* \param policy Deletion policy, defines the ownership for this dialog
*
- * \sa appear(), appearNow(window, policy)
+ * \sa setSystemModal()
*/
virtual void appear(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
/*!
- * \brief Shows the dialog immediately, without an animated transition.
- *
- * Same as appear(), but it won't use an animation to show the dialog.
- *
- * \sa appear()
- */
- virtual void appearNow(DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
-
- /*!
- * Shows the dialog on the window specified by \a window and registers
- * it in the associated DuiSceneManager. Doesn't use an animation to show the dialog.
- *
- * If \a window is 0, it functions just like appearNow() (without window parameter).
- * Otherwise it ignores the systemModal property and is displayed as application
- * modal.
- *
- * \param window The window on which the dialog is going to be shown.
- * \param policy Deletion policy, defines the ownership for this dialog
- *
- * \sa appearNow(), appear(window, policy)
- */
- virtual void appearNow(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
-
- /*!
* \brief Dismisses the modal dialog and sets the result code to Accepted.
*
* Equals to done(Accepted).
diff --git a/src/widgets/duidialog_p.h b/src/widgets/duidialog_p.h
index bdc94bda..169426d7 100644
--- a/src/widgets/duidialog_p.h
+++ b/src/widgets/duidialog_p.h
@@ -36,7 +36,7 @@ public:
DuiDialogPrivate();
~DuiDialogPrivate();
void init();
- void appear(bool now, DuiSceneWindow::DeletionPolicy policy);
+ void appear(DuiSceneWindow::DeletionPolicy policy);
void addStandardButtons(Dui::StandardButtons standardButtons);
void updateStandAloneHomeButtonVisibility();
void _q_onStandAloneDialogDisappeared();
diff --git a/src/widgets/duiscenewindow.cpp b/src/widgets/duiscenewindow.cpp
index e529346f..1407add5 100644
--- a/src/widgets/duiscenewindow.cpp
+++ b/src/widgets/duiscenewindow.cpp
@@ -43,27 +43,6 @@ DuiSceneWindowPrivate::DuiSceneWindowPrivate()
windowType = DuiSceneWindow::PlainSceneWindow;
}
-void DuiSceneWindowPrivate::appear(bool now, DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
-{
- Q_Q(DuiSceneWindow);
-
- if (!window) {
- window = DuiApplication::activeWindow();
- if (!window) {
- // TODO: Create and show() a Dui[Application]Window on the fly?
- duiWarning("DuiSceneWindow")
- << "Construct and show DuiWindow before showing a scene window";
- return;
- }
- }
-
- if (now) {
- window->sceneManager()->appearSceneWindowNow(q, policy);
- } else {
- window->sceneManager()->appearSceneWindow(q, policy);
- }
-}
-
DuiSceneWindow::DuiSceneWindow(QGraphicsItem *parent) :
DuiWidgetController(new DuiSceneWindowPrivate, new DuiSceneWindowModel, parent)
{
@@ -72,28 +51,6 @@ DuiSceneWindow::DuiSceneWindow(QGraphicsItem *parent) :
d->windowType = PlainSceneWindow;
}
-bool DuiSceneWindowPrivate::dismiss(bool now)
-{
- Q_Q(DuiSceneWindow);
-
- DuiDismissEvent dismissEvent;
- QApplication::sendEvent(q, &dismissEvent);
-
- if (!dismissEvent.isAccepted()) {
- return false;
- }
-
- if (q->sceneManager()) {
- if (now) {
- q->sceneManager()->dismissSceneWindowNow(q);
- } else {
- q->sceneManager()->dismissSceneWindow(q);
- }
- }
-
- return true;
-}
-
DuiSceneWindow::DuiSceneWindow(DuiSceneWindowPrivate *dd, DuiSceneWindowModel *model, DuiSceneWindow::WindowType windowType, const QString &viewType, QGraphicsItem *parent) :
DuiWidgetController(dd, model, parent)
@@ -136,26 +93,22 @@ void DuiSceneWindow::setManagedManually(bool managedManually)
void DuiSceneWindow::appear(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
{
- Q_D(DuiSceneWindow);
- d->appear(false, window, policy);
-}
+ if (!window) {
+ window = DuiApplication::activeWindow();
+ if (!window) {
+ // TODO: Create and show() a Dui[Application]Window on the fly?
+ duiWarning("DuiSceneWindow")
+ << "Construct and show DuiWindow before showing a scene window";
+ return;
+ }
+ }
-void DuiSceneWindow::appearNow(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
-{
- Q_D(DuiSceneWindow);
- d->appear(true, window, policy);
+ window->sceneManager()->appearSceneWindow(this, policy);
}
void DuiSceneWindow::appear(DuiSceneWindow::DeletionPolicy policy)
{
- Q_D(DuiSceneWindow);
- d->appear(false, 0, policy);
-}
-
-void DuiSceneWindow::appearNow(DuiSceneWindow::DeletionPolicy policy)
-{
- Q_D(DuiSceneWindow);
- d->appear(true, 0, policy);
+ appear(0, policy);
}
void DuiSceneWindow::disappear()
@@ -164,12 +117,6 @@ void DuiSceneWindow::disappear()
sceneManager()->disappearSceneWindow(this);
}
-void DuiSceneWindow::disappearNow()
-{
- if (sceneManager())
- sceneManager()->disappearSceneWindowNow(this);
-}
-
Qt::Alignment DuiSceneWindow::alignment() const
{
Qt::Alignment result = 0;
@@ -216,14 +163,18 @@ QPointF DuiSceneWindow::offset() const
bool DuiSceneWindow::dismiss()
{
- Q_D(DuiSceneWindow);
- return d->dismiss(false);
-}
+ DuiDismissEvent dismissEvent;
+ QApplication::sendEvent(this, &dismissEvent);
-bool DuiSceneWindow::dismissNow()
-{
- Q_D(DuiSceneWindow);
- return d->dismiss(true);
+ if (!dismissEvent.isAccepted()) {
+ return false;
+ }
+
+ if (sceneManager()) {
+ sceneManager()->dismissSceneWindow(this);
+ }
+
+ return true;
}
void DuiSceneWindow::dismissEvent(DuiDismissEvent *event)
diff --git a/src/widgets/duiscenewindow.h b/src/widgets/duiscenewindow.h
index 87e5b162..d9555bb2 100644
--- a/src/widgets/duiscenewindow.h
+++ b/src/widgets/duiscenewindow.h
@@ -54,7 +54,7 @@ class DUI_EXPORT DuiSceneWindow : public DuiWidgetController
public:
/*!
- * This enum defines how to handle scene window after hiding it using disappear() or disappearNow().
+ * This enum defines how to handle scene window after hiding it using disappear() or dismiss().
*/
enum DeletionPolicy {
KeepWhenDone, //!< Window is kept alive after being dismissed or disappeared
@@ -105,55 +105,24 @@ public Q_SLOTS:
* it in the associated DuiSceneManager. Uses animation to show the window.
* \param window The window on which the scene window is going to be shown.
* \param policy Deletion policy, defines the ownership for this window
- *
- * \sa appearNow()
*/
virtual void appear(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
/*!
- * Shows the scene window on the window specified by \a window and registers
- * it in the associated DuiSceneManager. Doesn't use the animation to show the window.
- * \param window The window on which the scene window is going to be shown.
- * \param policy Deletion policy, defines the ownership for this window
- *
- * \sa appear()
- */
- virtual void appearNow(DuiWindow *window, DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
-
- /*!
* Shows the scene window on the currently active window and registers
* it in the associated DuiSceneManager. Uses the animation to show the window.
* \param policy Deletion policy, defines the ownership for this window
*
- * \sa appearNow(), DuiApplication::activeWindow()
+ * \sa DuiApplication::activeWindow()
*/
virtual void appear(DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
/*!
- * Shows the scene window on the currently active window and registers
- * it in the associated DuiSceneManager. Doesn't use the animation to show the window.
- * \param policy Deletion policy, defines the ownership for this window
- *
- * \sa appear(), DuiApplication::activeWindow()
- */
- virtual void appearNow(DuiSceneWindow::DeletionPolicy policy = KeepWhenDone);
-
- /*!
* Hides this window and unregisters it from the DuiSceneManager.
* Uses the associated animation to hide the window.
- *
- * \sa disappearNow()
*/
virtual void disappear();
- /*!
- * Hides this window and unregisters it from the DuiSceneManager.
- * Doesn't use the animation to hide the window.
- *
- * \sa disappear()
- */
- virtual void disappearNow();
-
/* !
* \brief Dismisses the scene window.
*
@@ -162,7 +131,7 @@ public Q_SLOTS:
* not accept the event. If the event was ignored, nothing happens. If the event
* was accepted, it will disappear() the scene window.
*
- * If DestroyWhenDone was used on the last appear() or appearNow() call and
+ * If DestroyWhenDone was used on the last appear() call and
* the event was accepted, the scene window will be deleted after its
* disappearance is finished.
*
@@ -172,16 +141,6 @@ public Q_SLOTS:
*/
bool dismiss();
- /* !
- * \brief Dismisses the scene window immediately.
- *
- * Same as dismiss() differing only that it will cause disappearNow() to be called
- * if event is accepted instead of disappear()
- *
- * \sa dismiss(), disappearNow()
- */
- bool dismissNow();
-
public:
/*!
* Returns the currently active deletion policy of this window.
@@ -220,13 +179,13 @@ public:
Q_SIGNALS:
/*!
\brief Emitted when the scene window has finished its appearance transition.
- \sa appear(), appearNow()
+ \sa appear()
*/
void appeared();
/*!
\brief Emitted when the scene window has finished its disappearance transition.
- \sa disappear(), disappearNow()
+ \sa disappear()
*/
void disappeared();
diff --git a/src/widgets/duiscenewindow_p.h b/src/widgets/duiscenewindow_p.h
index 6ee45b3e..7fac0710 100644
--- a/src/widgets/duiscenewindow_p.h
+++ b/src/widgets/duiscenewindow_p.h
@@ -33,13 +33,6 @@ class DuiSceneWindowPrivate : public DuiWidgetControllerPrivate
public:
DuiSceneWindowPrivate();
- // helper function for the public appear() and appearNow()
- // since both are very similar
- void appear(bool now, DuiWindow *window, DuiSceneWindow::DeletionPolicy policy);
-
- // helper function for the public dismiss() and dismissNow()
- bool dismiss(bool now);
-
DuiSceneWindow::WindowType windowType;
DuiSceneWindow::DeletionPolicy policy;
diff --git a/tests/stubs/duiscenewindowprivate_stub.h b/tests/stubs/duiscenewindowprivate_stub.h
index 020b5dd1..6ce6fafc 100644
--- a/tests/stubs/duiscenewindowprivate_stub.h
+++ b/tests/stubs/duiscenewindowprivate_stub.h
@@ -30,7 +30,6 @@ class DuiSceneWindowPrivateStub : public StubBase
{
public:
virtual void DuiSceneWindowPrivateConstructor();
- virtual void appear(bool now, DuiWindow *window, DuiSceneWindow::DeletionPolicy policy);
DuiSceneWindow::WindowType windowType ;
DuiSceneWindow::DeletionPolicy policy ;
Qt::Alignment alignment ;
@@ -45,14 +44,6 @@ void DuiSceneWindowPrivateStub::DuiSceneWindowPrivateConstructor()
{
}
-void DuiSceneWindowPrivateStub::appear(bool now, DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
-{
- QList<ParameterBase *> params;
- params.append(new Parameter<bool >(now));
- params.append(new Parameter<DuiWindow * >(window));
- params.append(new Parameter<DuiSceneWindow::DeletionPolicy >(policy));
- stubMethodEntered("appear", params);
-}
@@ -67,10 +58,5 @@ DuiSceneWindowPrivate::DuiSceneWindowPrivate()
gDuiSceneWindowPrivateStub->DuiSceneWindowPrivateConstructor();
}
-void DuiSceneWindowPrivate::appear(bool now, DuiWindow *window, DuiSceneWindow::DeletionPolicy policy)
-{
- gDuiSceneWindowPrivateStub->appear(now, window, policy);
-}
-
#endif
diff --git a/tests/ut_duiapplicationpage/ut_duiapplicationpage.cpp b/tests/ut_duiapplicationpage/ut_duiapplicationpage.cpp
index 9898f1aa..d4d595b8 100644
--- a/tests/ut_duiapplicationpage/ut_duiapplicationpage.cpp
+++ b/tests/ut_duiapplicationpage/ut_duiapplicationpage.cpp
@@ -22,6 +22,7 @@
#include <DuiApplicationWindow>
#include <DuiApplication>
#include "duiapplicationpage_p.h"
+#include <DuiSceneManager>
#include <DuiPannableViewport>
#include <DuiAction>
@@ -147,7 +148,7 @@ void Ut_DuiApplicationPage::testRememberPosition()
{
m_subject->setRememberPosition(true);
m_subject->d_func()->pannableViewPort->setPosition(QPointF(0, 10));
- m_subject->appearNow();
+ appWin->sceneManager()->appearSceneWindowNow(m_subject);
QCOMPARE(m_subject->d_func()->pannableViewPort->position() + QPointF(10, 10), QPointF(10, 20));
QCOMPARE(m_subject->d_func()->pannableViewPort->physics()->position() + QPointF(10, 10), QPointF(10, 20));
}
@@ -156,7 +157,7 @@ void Ut_DuiApplicationPage::testForgetPosition()
{
m_subject->setRememberPosition(false);
m_subject->d_func()->pannableViewPort->setPosition(QPointF(0, 10));
- m_subject->appearNow();
+ appWin->sceneManager()->appearSceneWindowNow(m_subject);
QCOMPARE(m_subject->d_func()->pannableViewPort->position() + QPointF(10, 10), QPointF(10, 10));
QCOMPARE(m_subject->d_func()->pannableViewPort->physics()->position() + QPointF(10, 10), QPointF(10, 10));
}
diff --git a/tests/ut_duiapplicationwindow/ut_duiapplicationwindow.cpp b/tests/ut_duiapplicationwindow/ut_duiapplicationwindow.cpp
index f62e53f5..58798694 100644
--- a/tests/ut_duiapplicationwindow/ut_duiapplicationwindow.cpp
+++ b/tests/ut_duiapplicationwindow/ut_duiapplicationwindow.cpp
@@ -185,7 +185,7 @@ void Ut_DuiApplicationWindow::testIsOnDisplay()
QVERIFY(page2->isOnDisplay() == false);
// Window is not visible => page should not become visible
- page2->appearNow();
+ m_subject->sceneManager()->appearSceneWindowNow(page2);
QVERIFY(page1->isOnDisplay() == false);
QVERIFY(page2->isOnDisplay() == false);
@@ -252,8 +252,8 @@ void Ut_DuiApplicationWindow::testPageChanged()
QSignalSpy spy(m_subject, SIGNAL(pageChanged(DuiApplicationPage *)));
DuiApplicationPage *page = new DuiApplicationPage;
DuiApplicationPage *page2 = new DuiApplicationPage;
- page->appearNow(m_subject);
- page2->appearNow(m_subject);
+ m_subject->sceneManager()->appearSceneWindowNow(page);
+ m_subject->sceneManager()->appearSceneWindowNow(page2);
QCOMPARE(spy.count(), 2);
QCOMPARE(spy.at(0).at(0).value<DuiApplicationPage *>(), page);
@@ -298,15 +298,15 @@ void Ut_DuiApplicationWindow::testPageEscapeAuto()
QVERIFY(escapeButtonPanel != 0);
- firstPage->appearNow(m_subject);
+ m_subject->sceneManager()->appearSceneWindowNow(firstPage);
QCOMPARE(escapeButtonPanel->escapeMode(), DuiEscapeButtonPanelModel::CloseMode);
- secondPage->appearNow(m_subject);
+ m_subject->sceneManager()->appearSceneWindowNow(secondPage);
QCOMPARE(escapeButtonPanel->escapeMode(), DuiEscapeButtonPanelModel::BackMode);
- secondPage->dismissNow();
+ m_subject->sceneManager()->dismissSceneWindowNow(secondPage);
QCOMPARE(escapeButtonPanel->escapeMode(), DuiEscapeButtonPanelModel::CloseMode);
}
@@ -320,7 +320,7 @@ void Ut_DuiApplicationWindow::testPageEscapeAutoWhenAddingPageHistory()
QVERIFY(escapeButtonPanel != 0);
- secondPage->appearNow(m_subject);
+ m_subject->sceneManager()->appearSceneWindowNow(secondPage);
QCOMPARE(escapeButtonPanel->escapeMode(), DuiEscapeButtonPanelModel::CloseMode);
@@ -339,8 +339,8 @@ void Ut_DuiApplicationWindow::testPageEscapeAutoWhenClearingPageHistory()
QVERIFY(escapeButtonPanel != 0);
- firstPage->appearNow(m_subject);
- secondPage->appearNow(m_subject);
+ m_subject->sceneManager()->appearSceneWindowNow(firstPage);
+ m_subject->sceneManager()->appearSceneWindowNow(secondPage);
QCOMPARE(escapeButtonPanel->escapeMode(), DuiEscapeButtonPanelModel::BackMode);
diff --git a/tests/ut_duiscenemanager/ut_duiscenemanager.cpp b/tests/ut_duiscenemanager/ut_duiscenemanager.cpp
index 65103c1f..bc44ef26 100644
--- a/tests/ut_duiscenemanager/ut_duiscenemanager.cpp
+++ b/tests/ut_duiscenemanager/ut_duiscenemanager.cpp
@@ -234,8 +234,8 @@ void Ut_DuiSceneManager::testSceneLayerEffect()
DuiDialog *m = new DuiMessageBox("test");
DuiNavigationBar *n = new DuiNavigationBar();
- m->appearNow();
- n->appearNow();
+ sm->appearSceneWindowNow(m);
+ sm->appearSceneWindowNow(n);
QVERIFY(m->parentItem() != 0);
QVERIFY(n->parentItem() == sm->d_ptr->rootElement);
@@ -292,8 +292,8 @@ void Ut_DuiSceneManager::testNavBarDockWidgetVisibility()
DuiNavigationBar *p = new DuiNavigationBar();
DuiDockWidget *d = new DuiDockWidget();
- p->appearNow();
- d->appearNow();
+ sm->appearSceneWindowNow(p);
+ sm->appearSceneWindowNow(d);
int newAngle = sm->orientationAngle() + Dui::Angle90;
newAngle %= 360;
diff --git a/tests/ut_duiscenewindow/ut_duiscenewindow.cpp b/tests/ut_duiscenewindow/ut_duiscenewindow.cpp
index fdf8df57..5997c668 100644
--- a/tests/ut_duiscenewindow/ut_duiscenewindow.cpp
+++ b/tests/ut_duiscenewindow/ut_duiscenewindow.cpp
@@ -181,29 +181,29 @@ void Ut_DuiSceneWindow::testAppearedDisappearedSignals()
QSignalSpy spyAppeared(m_subject, SIGNAL(appeared()));
QSignalSpy spyDisappeared(m_subject, SIGNAL(disappeared()));
- m_subject->appearNow();
+ window->sceneManager()->appearSceneWindowNow(m_subject);
QCOMPARE(spyAppeared.count(), 1);
QCOMPARE(spyDisappeared.count(), 0);
- m_subject->disappearNow();
+ window->sceneManager()->disappearSceneWindowNow(m_subject);
QCOMPARE(spyAppeared.count(), 1);
QCOMPARE(spyDisappeared.count(), 1);
}
-void Ut_DuiSceneWindow::opacityAfterDisappearNow()
-{
- m_subject->setOpacity(0.0);
- m_subject->appearNow();
- m_subject->disappearNow();
- QCOMPARE(m_subject->opacity(), 1.0);
-}
+//void Ut_DuiSceneWindow::opacityAfterDisappearNow()
+//{
+// m_subject->setOpacity(0.0);
+// window->sceneManager()->appearSceneWindowNow(m_subject);
+// window->sceneManager()->disappearSceneWindowNow(m_subject);
+// QCOMPARE(m_subject->opacity(), 1.0);
+//}
void Ut_DuiSceneWindow::opacityAfterDisappear()
{
m_subject->setOpacity(0.0);
- m_subject->appearNow();
+ window->sceneManager()->appearSceneWindowNow(m_subject);
m_subject->disappear();
QCOMPARE(m_subject->opacity(), 1.0);
}
@@ -213,12 +213,12 @@ void Ut_DuiSceneWindow::testDismiss()
MyDuiDismissEventFilter dismissEventFilter;
m_subject->installEventFilter(&dismissEventFilter);
- m_subject->appearNow();
+ window->sceneManager()->appearSceneWindowNow(m_subject);
QSignalSpy spyWindowAppeared(m_subject, SIGNAL(appeared()));
QSignalSpy spyWindowDisappeared(m_subject, SIGNAL(disappeared()));
- m_subject->dismissNow();
+ window->sceneManager()->dismissSceneWindowNow(m_subject);
QCOMPARE(spyWindowAppeared.count(), 0);
QCOMPARE(spyWindowDisappeared.count(), 1);
@@ -227,11 +227,11 @@ void Ut_DuiSceneWindow::testDismiss()
void Ut_DuiSceneWindow::testDestroyWhenDoneCallingDisappear()
{
- m_subject->appearNow(DuiSceneWindow::DestroyWhenDone);
+ window->sceneManager()->appearSceneWindowNow(m_subject, DuiSceneWindow::DestroyWhenDone);
QSignalSpy spyDestroyed(m_subject, SIGNAL(destroyed()));
- m_subject->disappearNow();
+ window->sceneManager()->disappearSceneWindowNow(m_subject);
processPendingEvents();
@@ -242,11 +242,11 @@ void Ut_DuiSceneWindow::testDestroyWhenDoneCallingDisappear()
void Ut_DuiSceneWindow::testDestroyWhenDoneCallingDismiss()
{
- m_subject->appearNow(DuiSceneWindow::DestroyWhenDone);
+ window->sceneManager()->appearSceneWindowNow(m_subject, DuiSceneWindow::DestroyWhenDone);
QSignalSpy spyDestroyed(m_subject, SIGNAL(destroyed()));
- m_subject->dismissNow();
+ window->sceneManager()->dismissSceneWindowNow(m_subject);
processPendingEvents();
@@ -257,11 +257,11 @@ void Ut_DuiSceneWindow::testDestroyWhenDoneCallingDismiss()
void Ut_DuiSceneWindow::testDestroyWhenDismissedCallingDisappear()
{
- m_subject->appearNow(DuiSceneWindow::DestroyWhenDismissed);
+ window->sceneManager()->appearSceneWindowNow(m_subject, DuiSceneWindow::DestroyWhenDismissed);
QSignalSpy spyDestroyed(m_subject, SIGNAL(destroyed()));
- m_subject->disappearNow();
+ window->sceneManager()->disappearSceneWindowNow(m_subject);
processPendingEvents();
@@ -270,11 +270,11 @@ void Ut_DuiSceneWindow::testDestroyWhenDismissedCallingDisappear()
void Ut_DuiSceneWindow::testDestroyWhenDismissedCallingDismiss()
{
- m_subject->appearNow(DuiSceneWindow::DestroyWhenDismissed);
+ window->sceneManager()->appearSceneWindowNow(m_subject, DuiSceneWindow::DestroyWhenDismissed);
QSignalSpy spyDestroyed(m_subject, SIGNAL(destroyed()));
- m_subject->dismissNow();
+ window->sceneManager()->dismissSceneWindowNow(m_subject);
processPendingEvents();
@@ -285,15 +285,15 @@ void Ut_DuiSceneWindow::testDestroyWhenDismissedCallingDismiss()
void Ut_DuiSceneWindow::testDismissedStateReset()
{
- m_subject->appearNow();
- m_subject->dismissNow();
+ window->sceneManager()->appearSceneWindowNow(m_subject);
+ window->sceneManager()->dismissSceneWindowNow(m_subject);
// internal "dismissed" state should be reset to false on next reappearance
// Therefore the disappearance below should not cause self-destruction
- m_subject->appearNow(DuiSceneWindow::DestroyWhenDismissed);
+ window->sceneManager()->appearSceneWindowNow(m_subject, DuiSceneWindow::DestroyWhenDismissed);
QSignalSpy spyDestroyed(m_subject, SIGNAL(destroyed()));
- m_subject->disappearNow();
+ window->sceneManager()->disappearSceneWindowNow(m_subject);
processPendingEvents();
diff --git a/tests/ut_duiscenewindow/ut_duiscenewindow.h b/tests/ut_duiscenewindow/ut_duiscenewindow.h
index e036aef4..4c7eb3af 100644
--- a/tests/ut_duiscenewindow/ut_duiscenewindow.h
+++ b/tests/ut_duiscenewindow/ut_duiscenewindow.h
@@ -43,7 +43,7 @@ private slots:
void testAppearedDisappearedSignals();
- void opacityAfterDisappearNow();
+// void opacityAfterDisappearNow();
void opacityAfterDisappear();
void testDismiss();
diff --git a/tests/ut_duitextedit/ut_duitextedit.cpp b/tests/ut_duitextedit/ut_duitextedit.cpp
index 94a48d6d..f2146c8f 100644
--- a/tests/ut_duitextedit/ut_duitextedit.cpp
+++ b/tests/ut_duitextedit/ut_duitextedit.cpp
@@ -330,7 +330,7 @@ void Ut_DuiTextEdit::testFocusInEvent()
DuiTextEdit *m_subject = new DuiTextEdit(DuiTextEditModel::MultiLine, "");
page->setCentralWidget(m_subject);
- page->appearNow();
+ m_appWindow->sceneManager()->appearSceneWindowNow(page);
// Set up spies on gainedFocus and lostFocus signals
QSignalSpy spyGainedFocus(m_subject, SIGNAL(gainedFocus(Qt::FocusReason)));