diff --git a/avoid-calling-potentially-pure-virtual-method.patch b/avoid-calling-potentially-pure-virtual-method.patch new file mode 100644 index 0000000..5435583 --- /dev/null +++ b/avoid-calling-potentially-pure-virtual-method.patch @@ -0,0 +1,61 @@ +Parent: 9934c075 (QML: do not check stack size if stack grows up) +Author: David Edmundson +AuthorDate: 2015-04-23 15:01:24 +0200 +Commit: David Edmundson +CommitDate: 2015-04-23 15:05:32 +0200 + +Avoid calling potentially pure virtual method + +In Qt 5.4 screenChanged is called indirectly from the destructor of +QPlatformScreen. By comparing new values against the oldScreen we call +call virtual methods of QPlatformScreen from it's own destructor which +results in a crash. + +This patch simply emits change signals whenever a screen change regardless +of whether the value differs from the previous screen. Arguably less +efficient, but better than crashing. + +This fix is not needed in Qt 5.5 where the QPA architecture has changed. + +Task-number: QTBUG-45753 +Change-Id: Ic155906928855a377add9b21bff9e72b31f4667e +--- + +diff --git a/src/quick/items/qquickscreen.cpp b/src/quick/items/qquickscreen.cpp +index 8ac5a1e..c19841f 100644 +--- a/src/quick/items/qquickscreen.cpp ++++ b/src/quick/items/qquickscreen.cpp +@@ -340,24 +340,15 @@ void QQuickScreenAttached::screenChanged(QScreen *screen) + + screen->setOrientationUpdateMask(m_updateMask); + +- if (!oldScreen || screen->size() != oldScreen->size()) { +- emit widthChanged(); +- emit heightChanged(); +- } +- if (!oldScreen || screen->name() != oldScreen->name()) +- emit nameChanged(); +- if (!oldScreen || screen->orientation() != oldScreen->orientation()) +- emit orientationChanged(); +- if (!oldScreen || screen->primaryOrientation() != oldScreen->primaryOrientation()) +- emit primaryOrientationChanged(); +- if (!oldScreen || screen->availableVirtualGeometry() != oldScreen->availableVirtualGeometry()) +- emit desktopGeometryChanged(); +- if (!oldScreen || screen->logicalDotsPerInch() != oldScreen->logicalDotsPerInch()) +- emit logicalPixelDensityChanged(); +- if (!oldScreen || screen->physicalDotsPerInch() != oldScreen->physicalDotsPerInch()) +- emit pixelDensityChanged(); +- if (!oldScreen || screen->devicePixelRatio() != oldScreen->devicePixelRatio()) +- emit devicePixelRatioChanged(); ++ emit widthChanged(); ++ emit heightChanged(); ++ emit nameChanged(); ++ emit orientationChanged(); ++ emit primaryOrientationChanged(); ++ emit desktopGeometryChanged(); ++ emit logicalPixelDensityChanged(); ++ emit pixelDensityChanged(); ++ emit devicePixelRatioChanged(); + + connect(screen, SIGNAL(geometryChanged(QRect)), + this, SIGNAL(widthChanged())); diff --git a/libqt5-qtdeclarative.changes b/libqt5-qtdeclarative.changes index 722e716..970475a 100644 --- a/libqt5-qtdeclarative.changes +++ b/libqt5-qtdeclarative.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Apr 27 18:14:35 UTC 2015 - hrvoje.senjan@gmail.com + +- Add avoid-calling-potentially-pure-virtual-method.patch, QTBUG#45753 + +------------------------------------------------------------------- +Sat Apr 25 10:50:08 UTC 2015 - hrvoje.senjan@gmail.com + +- Extend sse2_nojit.patch to warn users without SSE2 extension that + their processor is officially not supported. + Also pass -msse2 -mfpmath=sse flags when we are building with SSE2 + ------------------------------------------------------------------- Thu Apr 9 17:30:27 UTC 2015 - hrvoje.senjan@gmail.com diff --git a/libqt5-qtdeclarative.spec b/libqt5-qtdeclarative.spec index 785c003..cc14b1e 100644 --- a/libqt5-qtdeclarative.spec +++ b/libqt5-qtdeclarative.spec @@ -33,6 +33,8 @@ Url: http://qt.digia.com %define tar_version qtdeclarative-opensource-src-%{real_version} Source: %{tar_version}.tar.xz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM avoid-calling-potentially-pure-virtual-method.patch +Patch0: avoid-calling-potentially-pure-virtual-method.patch # PATCH-FIX-OPENSUSE sse2_nojit.patch -- enable JIT and sse2 only on sse2 case Patch100: sse2_nojit.patch BuildRequires: fdupes @@ -71,6 +73,7 @@ handling. %prep %setup -q -n qtdeclarative-opensource-src-%{real_version} +%patch0 -p1 %patch100 -p1 %package -n %libname diff --git a/sse2_nojit.patch b/sse2_nojit.patch index 0242ae3..fdfc115 100644 --- a/sse2_nojit.patch +++ b/sse2_nojit.patch @@ -1,8 +1,24 @@ +diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri +index c27aaa9..05c86e8 100644 +--- a/src/qml/jsruntime/jsruntime.pri ++++ b/src/qml/jsruntime/jsruntime.pri +@@ -105,6 +105,11 @@ SOURCES += \ + $$PWD/qv4string.cpp \ + $$PWD/qv4value.cpp + ++linux-g++*:isEqual(QT_ARCH,i386):!no_sse2 { ++ QMAKE_CFLAGS += -msse2 -mfpmath=sse ++ QMAKE_CXXFLAGS += -msse2 -mfpmath=sse ++} ++ + valgrind { + DEFINES += V4_USE_VALGRIND + } diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h -index a00231c..2a8f5d3 100644 +index a58beb3..85e8dc0 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h -@@ -85,7 +85,7 @@ inline double trunc(double d) { return d +@@ -85,7 +85,7 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } // Black list some platforms #if defined(V4_ENABLE_JIT) @@ -11,3 +27,16 @@ index a00231c..2a8f5d3 100644 # undef V4_ENABLE_JIT #endif #endif +diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp +index 39b816f..762ee61 100644 +--- a/src/qml/qml/v8/qv8engine.cpp ++++ b/src/qml/qml/v8/qv8engine.cpp +@@ -123,7 +123,7 @@ QV8Engine::QV8Engine(QJSEngine* qq) + { + #ifdef Q_PROCESSOR_X86_32 + if (!qCpuHasFeature(SSE2)) { +- qFatal("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer"); ++ qDebug("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer, processors missing the extension are NOT supported to run QML2 code!"); + } + #endif +