summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-07-31 12:31:16 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-07-31 12:31:16 (GMT)
commitae597a532683e5d544400b62497c870cf570b069 (patch)
tree806c1643bab4d0ae4adac3af9a1e5cee2fc9e9d3 /src
parent85b9a2ff7f956d97eb9109ef9c4fef66344a3f8f (diff)
downloadQt-ae597a532683e5d544400b62497c870cf570b069.zip
Qt-ae597a532683e5d544400b62497c870cf570b069.tar.gz
Qt-ae597a532683e5d544400b62497c870cf570b069.tar.bz2
Restored window title after another top-level window was closed.
Task: 249995 The window title in S60 is global entity, i.e. is located in application status pane. When top level window, for example mesage box is closed, the window title has to be restored for window which is getting the focus. This way we don't leave title from destroyed window to title bar. It is also into question, whether the non-maximized dialogs should set title to statuspane at all. For now they will, but things may change if we switch to use native dialogs.
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 2b3dbf4..d860eba 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -765,8 +765,12 @@ void QWidgetPrivate::setWindowTitle_sys(const QString &caption)
if (q->isWindow()) {
Q_ASSERT(q->testAttribute(Qt::WA_WState_Created));
CAknTitlePane* titlePane = S60->titlePane();
- if(titlePane)
- titlePane->SetTextL(qt_QString2TPtrC(caption));
+ if(titlePane) {
+ if(caption.isEmpty())
+ titlePane->SetTextToDefaultL();
+ else
+ titlePane->SetTextL(qt_QString2TPtrC(caption));
+ }
}
#else
Q_UNUSED(caption)
@@ -1113,8 +1117,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
// the next visible window will get keyboard focus
WId wid = CEikonEnv::Static()->AppUi()->TopFocusedControl();
if (wid) {
- QWidget *widget = QWidget::find(wid);
+ QWidget *widget = QWidget::find(wid);
QApplication::setActiveWindow(widget);
+ // Reset global window title for focusing window
+ widget->d_func()->setWindowTitle_sys(widget->windowTitle());
}
}