Skip to content

Instantly share code, notes, and snippets.

Avatar

Tor Arne Vestbø torarnv

  • The Qt Company
  • Oslo, Norway
View GitHub Profile
View stdin.patch
diff --git i/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp w/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index ff2feda3abd..4e9e7159eb6 100644
--- i/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ w/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -11821,6 +11821,12 @@ void tst_QWidget::closeEvent()
QVERIFY(QTest::qWaitForWindowExposed(&widget2));
widget2.close();
QCOMPARE(widget2.closeCount, 1);
+
+ CloseCountingWidget widget3;
View stdin.patch
diff --git c/src/widgets/kernel/qwidget.cpp i/src/widgets/kernel/qwidget.cpp
index fcb18d7c187..b7db1c56b0c 100644
--- c/src/widgets/kernel/qwidget.cpp
+++ i/src/widgets/kernel/qwidget.cpp
@@ -8488,8 +8488,10 @@ bool QWidgetPrivate::close()
// Close native widgets via QWindow::close() in order to run QWindow
// close code. The QWidget-specific close code in handleClose() will
// in this case be called from the Close event handler in QWidgetWindow.
- if (QWindow *widgetWindow = windowHandle())
- return widgetWindow->close();
View stdin.patch
diff --git i/src/widgets/kernel/qwidget.cpp w/src/widgets/kernel/qwidget.cpp
index fcb18d7c187..133918c27e8 100644
--- i/src/widgets/kernel/qwidget.cpp
+++ w/src/widgets/kernel/qwidget.cpp
@@ -8483,7 +8483,7 @@ bool QWidgetPrivate::close()
if (data.is_closing)
return true;
- data.is_closing = true;
+ //data.is_closing = true;
View nstrackingarea_attemptedfix.mm
//usr/bin/env clang++ $0 -o ${o=`mktemp`} -fmodules -fcxx-modules && echo $o && exec $o $* || exit
@import AppKit;
@interface View : NSView
@property (retain) NSTrackingArea* trackingArea;
@end
@implementation View
- (id)init
View nstrackingarea.mm
//usr/bin/env clang++ $0 -o ${o=`mktemp`} -fmodules -fcxx-modules && echo $o && exec $o $* || exit
@import AppKit;
@interface View : NSView
@end
@implementation View
- (id)init
{
View stdin.patch
diff --git c/src/gui/kernel/qplatformintegration.cpp i/src/gui/kernel/qplatformintegration.cpp
index a53f0d09d71..1427db5c614 100644
--- c/src/gui/kernel/qplatformintegration.cpp
+++ i/src/gui/kernel/qplatformintegration.cpp
@@ -450,6 +450,9 @@ Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags)
if (flags & Qt::Popup & ~Qt::Window)
return Qt::WindowNoState;
+ if (flags & Qt::SubWindow)
+ return Qt::WindowNoState;
View stdin.patch
diff --git c/examples/widgets/windowcontainer/windowcontainer.cpp i/examples/widgets/windowcontainer/windowcontainer.cpp
index a104949d1eb..6bfc0e33bd2 100644
--- c/examples/widgets/windowcontainer/windowcontainer.cpp
+++ i/examples/widgets/windowcontainer/windowcontainer.cpp
@@ -162,6 +162,7 @@ int main(int argc, char *argv[])
QHBoxLayout *layout = new QHBoxLayout(widget);
Window *window = new Window;
+ window->setFlag(Qt::SubWindow);
View stdin.patch
diff --git i/src/gui/kernel/qevent.cpp w/src/gui/kernel/qevent.cpp
index ff9ec52b092..a765afd957e 100644
--- i/src/gui/kernel/qevent.cpp
+++ w/src/gui/kernel/qevent.cpp
@@ -2202,11 +2202,10 @@ QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos)
of the format.
\value Cursor If set, a cursor should be shown inside the preedit
- string at position start. The length variable determines whether
- the cursor is visible or not. If the length is 0 the cursor is
View stdin.patch
diff --git c/tests/auto/testlib/selftests/expected_expectfail.junitxml w/tests/auto/testlib/selftests/expected_expectfail.junitxml
index a7b3f48ec43..94fa4476596 100644
--- c/tests/auto/testlib/selftests/expected_expectfail.junitxml
+++ w/tests/auto/testlib/selftests/expected_expectfail.junitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite name="tst_ExpectFail" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="24" failures="6" errors="0" skipped="0" time="@TEST_DURATION@">
+<testsuite name="tst_ExpectFail" timestamp="@TEST_START_TIME@" hostname="@HOSTNAME@" tests="27" failures="13" errors="0" skipped="0" time="@TEST_DURATION@">
<properties>
<property name="QTestVersion" value="@INSERT_QT_VERSION_HERE@"/>
View stdin.patch
diff --git i/tests/auto/testlib/selftests/expected_float.junitxml w/tests/auto/testlib/selftests/expected_float.junitxml
index c2989749671..3c39e9a3768 100644
--- i/tests/auto/testlib/selftests/expected_float.junitxml
+++ w/tests/auto/testlib/selftests/expected_float.junitxml
@@ -201,18 +201,9 @@
Actual (operandLeft) : 1
Expected (operandRight): 3" tag="should FAIL 1"/>
<failure result="fail" message="Compared qfloat16s are not the same (fuzzy compare)
- Actual (operandLeft) : 0.001
- Expected (operandRight): 0.003" tag="should FAIL 2"/>