From b3b5ae13763c97bad4bfcdda539acf8656c34938 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 8 Jun 2009 14:56:21 +0300 Subject: Fixed tst_QTemporaryFile::renameFdLeak test case for Symbian. Test data for Symbian was not deployed correctly. --- tests/auto/qtemporaryfile/qtemporaryfile.pro | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/auto/qtemporaryfile/qtemporaryfile.pro b/tests/auto/qtemporaryfile/qtemporaryfile.pro index a3a3910..0f2a6ea 100644 --- a/tests/auto/qtemporaryfile/qtemporaryfile.pro +++ b/tests/auto/qtemporaryfile/qtemporaryfile.pro @@ -2,4 +2,11 @@ load(qttest_p4) SOURCES += tst_qtemporaryfile.cpp QT = core -!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" + +symbian { + testData.sources = tst_qtemporaryfile.cpp + testData.path = . + DEPLOYMENT += testData +}else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} -- cgit v0.12 From efc999e95a74eee7e282e8d34e681c5b18cb60ad Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Mon, 8 Jun 2009 14:57:34 +0300 Subject: Avoid unnecessary calls to FocusChanged in Symbian. Called setFocus only when the widget does not already have the focus. This should remove unncessary calls to FocusChanged since CCoeControl always calls FocusChanged when SetFocus is called, even there was no changes in focus. --- src/gui/kernel/qwidget_s60.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 11cb974..e32e272 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -319,7 +319,8 @@ void QWidgetPrivate::hide_sys() deactivateWidgetCleanup(); WId id = q->internalWinId(); if (q->isWindow() && id) { - id->SetFocus(false); + if(id->IsFocused()) // Avoid unnecessry calls to FocusChanged() + id->SetFocus(false); id->MakeVisible(false); id->ControlEnv()->AppUi()->RemoveFromStack(id); if (QWidgetBackingStore *bs = maybeBackingStore()) @@ -335,7 +336,8 @@ void QWidgetPrivate::setFocus_sys() { Q_Q(QWidget); if (q->testAttribute(Qt::WA_WState_Created) && q->window()->windowType() != Qt::Popup) - q->effectiveWinId()->SetFocus(true); + if(!q->effectiveWinId()->IsFocused()) // Avoid unnecessry calls to FocusChanged() + q->effectiveWinId()->SetFocus(true); } void QWidgetPrivate::raise_sys() @@ -922,7 +924,8 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) releaseKeyboard(); if (destroyWindow && !(windowType() == Qt::Desktop) && internalWinId()) { WId id = internalWinId(); - id->SetFocus(false); + if(id->IsFocused()) // Avoid unnecessry calls to FocusChanged() + id->SetFocus(false); id->ControlEnv()->AppUi()->RemoveFromStack(id); CBase::Delete(id); -- cgit v0.12