forked from qt-creator/qt-creator
QmlProfiler: Try harder to obtain a canvas context
The QML canvas is notoriously bad at keeping its context around. This workaround gives us a valid context in many of these cases. Change-Id: I6c23aa2b44c10a48cdb89c66a2861ab8d31bcfc8 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -112,8 +112,7 @@ Canvas {
|
||||
|
||||
// ***** slots
|
||||
onPaint: {
|
||||
if (context === null)
|
||||
return; // canvas isn't ready
|
||||
var context = (canvas.context === null) ? getContext("2d") : canvas.context;
|
||||
|
||||
Plotter.qmlProfilerModelProxy = qmlProfilerModelProxy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user