summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/patch_capabilities.pl3
-rw-r--r--demos/symbianpkgrules.pri4
-rw-r--r--examples/symbianpkgrules.pri5
-rw-r--r--src/3rdparty/phonon/mmf/videowidget.cpp2
-rw-r--r--src/gui/kernel/qwidget.cpp40
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp3
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp24
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h2
-rw-r--r--tools/qtestlib/wince/cetest/activesyncconnection.cpp2
-rw-r--r--tools/qtestlib/wince/cetest/main.cpp2
-rw-r--r--tools/qvfb/qvfb.cpp2
-rw-r--r--tools/runonphone/symbianutils/tcftrkdevice.h2
-rw-r--r--tools/runonphone/symbianutils/tcftrkmessage.h2
-rw-r--r--util/normalize/main.cpp2
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.cpp2
16 files changed, 80 insertions, 18 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 06ab116..5230480 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -269,6 +269,9 @@ if (@ARGV)
if (@capabilitiesSpecified)
{
$commandToExecute = sprintf($baseCommandToExecute, join(" ", @capabilitiesSpecified));
+ $executeNeeded = 1;
+ my $capString = join(" ", @capabilitiesSpecified);
+ print ("Patching: Patching the the Vendor ID to 0 and the capabilities used to: \"$capString\" in \"$binaryBaseName\".\n");
} else {
# Test which capabilities are present and then restrict them to the allowed set.
# This avoid raising the capabilities of apps that already have none.
diff --git a/demos/symbianpkgrules.pri b/demos/symbianpkgrules.pri
index d42f188..c9cc492 100644
--- a/demos/symbianpkgrules.pri
+++ b/demos/symbianpkgrules.pri
@@ -13,4 +13,6 @@ vendorinfo = \
demos_deployment.pkg_prerules += vendorinfo
DEPLOYMENT += demos_deployment
-contains(TEMPLATE,app):isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") {
+ ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+}
diff --git a/examples/symbianpkgrules.pri b/examples/symbianpkgrules.pri
index b22ca85..0f615c7 100644
--- a/examples/symbianpkgrules.pri
+++ b/examples/symbianpkgrules.pri
@@ -13,4 +13,7 @@ vendorinfo = \
examples_deployment.pkg_prerules += vendorinfo
DEPLOYMENT += examples_deployment
-contains(TEMPLATE,app):isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") {
+ ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg
+}
+
diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp
index 122094e..d59e82a 100644
--- a/src/3rdparty/phonon/mmf/videowidget.cpp
+++ b/src/3rdparty/phonon/mmf/videowidget.cpp
@@ -65,6 +65,8 @@ MMF::VideoWidget::VideoWidget(QWidget *parent)
TRACE_CONTEXT(VideoWidget::VideoWidget, EVideoApi);
TRACE_ENTRY_0();
+ parent->setProperty("_q_DummyWindowSurface", true);
+
TRACE_EXIT_0();
}
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 9b44f15..e22ec55 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -236,6 +236,17 @@ void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w)
}
}
+/*!
+ \internal
+ Recursively remove widget and all of its descendents.
+ */
+void QWidgetBackingStoreTracker::unregisterWidgetSubtree(QWidget *widget)
+{
+ unregisterWidget(widget);
+ foreach (QObject *child, widget->children())
+ if (QWidget *childWidget = qobject_cast<QWidget *>(child))
+ unregisterWidgetSubtree(childWidget);
+}
QWidgetPrivate::QWidgetPrivate(int version)
: QObjectPrivate(version)
@@ -326,15 +337,27 @@ QWidgetPrivate::~QWidgetPrivate()
#endif //QT_NO_GRAPHICSEFFECT
}
+class QDummyWindowSurface : public QWindowSurface
+{
+public:
+ QDummyWindowSurface(QWidget *window) : QWindowSurface(window) {}
+ QPaintDevice *paintDevice() { return window(); }
+ void flush(QWidget *, const QRegion &, const QPoint &) {}
+};
+
QWindowSurface *QWidgetPrivate::createDefaultWindowSurface()
{
Q_Q(QWidget);
QWindowSurface *surface;
- if (QApplicationPrivate::graphicsSystem())
- surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q);
- else
- surface = createDefaultWindowSurface_sys();
+ if (q->property("_q_DummyWindowSurface").toBool()) {
+ surface = new QDummyWindowSurface(q);
+ } else {
+ if (QApplicationPrivate::graphicsSystem())
+ surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q);
+ else
+ surface = createDefaultWindowSurface_sys();
+ }
return surface;
}
@@ -10031,7 +10054,16 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
if (newParent && isAncestorOf(focusWidget()))
focusWidget()->clearFocus();
+ QTLWExtra *oldTopExtra = window()->d_func()->maybeTopData();
+ QWidgetBackingStoreTracker *oldBsTracker = oldTopExtra ? &oldTopExtra->backingStore : 0;
+
d->setParent_sys(parent, f);
+
+ QTLWExtra *topExtra = window()->d_func()->maybeTopData();
+ QWidgetBackingStoreTracker *bsTracker = topExtra ? &topExtra->backingStore : 0;
+ if (oldBsTracker && oldBsTracker != bsTracker)
+ oldBsTracker->unregisterWidgetSubtree(this);
+
if (desktopWidget)
parent = 0;
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 6c89659..ca1e3fc 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -122,6 +122,7 @@ public:
void registerWidget(QWidget *w);
void unregisterWidget(QWidget *w);
+ void unregisterWidgetSubtree(QWidget *w);
inline QWidgetBackingStore* data()
{
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 031892d..cf4bdf1 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -709,7 +709,8 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
// old_winid may not have received a 'not visible' visibility
// changed event before being destroyed; make sure that it is
// removed from the backing store's list of visible windows.
- S60->controlVisibilityChanged(old_winid, false);
+ if (old_winid)
+ S60->controlVisibilityChanged(old_winid, false);
setWinId(0);
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 2f221d2..09af941 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -9718,14 +9718,25 @@ void tst_QWidget::destroyBackingStoreWhenHidden()
child.setAutoFillBackground(true);
child.setPalette(Qt::blue);
+ QWidget grandChild(&child);
+ grandChild.setAutoFillBackground(true);
+ grandChild.setPalette(Qt::yellow);
+
QVBoxLayout layout(&parent);
layout.setContentsMargins(10, 10, 10, 10);
layout.addWidget(&child);
parent.setLayout(&layout);
- child.winId();
+ QVBoxLayout childLayout(&child);
+ childLayout.setContentsMargins(10, 10, 10, 10);
+ childLayout.addWidget(&grandChild);
+ child.setLayout(&childLayout);
+
+ // Ensure that this widget and all its ancestors are native
+ grandChild.winId();
parent.show();
+
QTest::qWaitForWindowShown(&parent);
// Check that child window does not obscure parent window
@@ -9734,18 +9745,24 @@ void tst_QWidget::destroyBackingStoreWhenHidden()
// Native child widget should share parent's backing store
QVERIFY(0 != backingStore(parent));
QVERIFY(0 == backingStore(child));
+ QVERIFY(0 == backingStore(grandChild));
// Make child widget full screen
child.setWindowFlags((child.windowFlags() | Qt::Window) ^ Qt::SubWindow);
child.setWindowState(child.windowState() | Qt::WindowFullScreen);
child.show();
+
+ // Paint into the child to ensure that it gets a backing store
+ QPainter painter(&child);
+ painter.fillRect(QRect(0, 0, 90, 90), Qt::white);
+
QTest::qWaitForWindowShown(&child);
// Ensure that 'window hidden' event is received by parent
qApp->processEvents();
// Check that child window obscures parent window
- QVERIFY(parent.visibleRegion().subtracted(child.visibleRegion()).isEmpty());
+ QVERIFY(parent.visibleRegion().subtracted(child.visibleRegion() + grandChild.visibleRegion()).isEmpty());
// Now that extent of child widget goes beyond parent's extent,
// a new backing store should be created for the child widget.
@@ -9761,11 +9778,12 @@ void tst_QWidget::destroyBackingStoreWhenHidden()
QTest::qWaitForWindowShown(&child);
// Check that parent is now visible again
- QVERIFY(!parent.visibleRegion().subtracted(child.visibleRegion()).isEmpty());
+ QVERIFY(!parent.visibleRegion().subtracted(child.visibleRegion() + grandChild.visibleRegion()).isEmpty());
// Native child widget should once again share parent's backing store
QVERIFY(0 != backingStore(parent));
QVERIFY(0 == backingStore(child));
+ QVERIFY(0 == backingStore(grandChild));
}
// 6. Partial reveal followed by full reveal
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
index 2bb75eb..2baacbb 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
@@ -147,7 +147,7 @@ public:
//! Destroys an EGL shared image.
/*!
Destroys an EGLSharedImage previously created with an ::imageToEGLSharedImage call.
- Returns true if the image was found and the destruction was successfull. Notice that
+ Returns true if the image was found and the destruction was successful. Notice that
this destroys the image for all processes using it.
*/
static bool destroyEGLSharedImage(Qt::HANDLE handle);
diff --git a/tools/qtestlib/wince/cetest/activesyncconnection.cpp b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
index 98062ed..812ed47 100644
--- a/tools/qtestlib/wince/cetest/activesyncconnection.cpp
+++ b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
@@ -247,7 +247,7 @@ bool ActiveSyncConnection::copyFileFromDevice(const QString &deviceSource, const
wprintf(L"\n");
if (!readUntilEnd) {
- debugOutput(QString::fromLatin1(" an error occured during copy"), 2);
+ debugOutput(QString::fromLatin1(" an error occurred during copy"), 2);
return false;
}
diff --git a/tools/qtestlib/wince/cetest/main.cpp b/tools/qtestlib/wince/cetest/main.cpp
index 4272a83..ec62af1 100644
--- a/tools/qtestlib/wince/cetest/main.cpp
+++ b/tools/qtestlib/wince/cetest/main.cpp
@@ -283,7 +283,7 @@ int main(int argc, char **argv)
cout << "Error: Can only test executables!" << endl;
return -1;
}
- // Check wether the project is still in debug/release mode after reading
+ // Check whether the project is still in debug/release mode after reading
// If .pro specifies to be one mode only, we need to accept this
if (project.isActiveConfig("debug") && !project.isActiveConfig("release")) {
TestConfiguration::testDebug = true;
diff --git a/tools/qvfb/qvfb.cpp b/tools/qvfb/qvfb.cpp
index b4ccebc..a3b1964 100644
--- a/tools/qvfb/qvfb.cpp
+++ b/tools/qvfb/qvfb.cpp
@@ -1038,7 +1038,7 @@ void AnimationSaveWidget::convertToMpeg(QString filename)
// ### can't use QProcess, not in Qt 2.3
// ### but it's certainly in Qt 4! use it?
- // Execute the ppmtompeg command as a seperate process to do the encoding
+ // Execute the ppmtompeg command as a separate process to do the encoding
pid_t pid = ::fork();
if ( !pid ) {
// Child process
diff --git a/tools/runonphone/symbianutils/tcftrkdevice.h b/tools/runonphone/symbianutils/tcftrkdevice.h
index 67955e5..f56a86e 100644
--- a/tools/runonphone/symbianutils/tcftrkdevice.h
+++ b/tools/runonphone/symbianutils/tcftrkdevice.h
@@ -65,7 +65,7 @@ struct Breakpoint;
/* Command error handling in TCF:
* 1) 'Severe' errors (JSON format, parameter format): Trk emits a
- * nonstandard message (\3\2 error paramaters) and closes the connection.
+ * nonstandard message (\3\2 error parameters) and closes the connection.
* 2) Protocol errors: 'N' without error message is returned.
* 3) Errors in command execution: 'R' with a TCF error hash is returned
* (see TcfTrkCommandError). */
diff --git a/tools/runonphone/symbianutils/tcftrkmessage.h b/tools/runonphone/symbianutils/tcftrkmessage.h
index 510b485..929a9e6 100644
--- a/tools/runonphone/symbianutils/tcftrkmessage.h
+++ b/tools/runonphone/symbianutils/tcftrkmessage.h
@@ -123,7 +123,7 @@ struct SYMBIANUTILS_EXPORT RunControlContext {
QByteArray parentId; // Parent process id of a thread.
};
-// Module load information occuring with 'RunControl contextSuspended' events
+// Module load information occurring with 'RunControl contextSuspended' events
struct SYMBIANUTILS_EXPORT ModuleLoadEventInfo {
ModuleLoadEventInfo();
void clear();
diff --git a/util/normalize/main.cpp b/util/normalize/main.cpp
index 4658b5e..65b8d51 100644
--- a/util/normalize/main.cpp
+++ b/util/normalize/main.cpp
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
printf("usage: normalize [--modify] <path>\n");
printf(" <path> can be a single file or a directory (default: look for *.cpp recursively)");
printf(" Outputs all filenames that contain non-normalized SIGNALs and SLOTs\n");
- printf(" with --modify: fix all occurences of non-normalized SIGNALs and SLOTs\n");
+ printf(" with --modify: fix all occurrences of non-normalized SIGNALs and SLOTs\n");
return 1;
}
diff --git a/util/s60pixelmetrics/pm_mapperapp.cpp b/util/s60pixelmetrics/pm_mapperapp.cpp
index d68a0b0..b0c4eaf 100644
--- a/util/s60pixelmetrics/pm_mapperapp.cpp
+++ b/util/s60pixelmetrics/pm_mapperapp.cpp
@@ -299,7 +299,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
TInt height = screenRect.Height();
TInt width = screenRect.Width();
TBuf16<32> tgt;
- // HEIGTH
+ // HEIGHT
tgt.Append(_L("height: \t"));
tgt.AppendNum(height, EDecimal); // put max height into text file
ShowL( tgt, last );