diff options
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsloader.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 2 | ||||
-rw-r--r-- | tools/qmlviewer/qmlviewer.cpp | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp index 86239cf..bb1020c 100644 --- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp @@ -263,6 +263,7 @@ void QmlGraphicsLoaderPrivate::_q_sourceLoaded() QObject *obj = component->create(ctxt); if (obj) { + ctxt->setParent(obj); item = qobject_cast<QmlGraphicsItem *>(obj); if (item) { item->setParentItem(q); @@ -271,6 +272,7 @@ void QmlGraphicsLoaderPrivate::_q_sourceLoaded() } } else { delete obj; + delete ctxt; source = QUrl(); } emit q->sourceChanged(); diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 3e7ac8e..4709b05 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -200,6 +200,8 @@ QmlEnginePrivate::~QmlEnginePrivate() namedNodeMapClass = 0; delete sqlQueryClass; sqlQueryClass = 0; + delete globalClass; + globalClass = 0; for(int ii = 0; ii < bindValues.count(); ++ii) clear(bindValues[ii]); diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 8d8d66a..a8901f9 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -506,7 +506,7 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) if (!flatmenu) settingsMenu->addAction(recordOptions); - QMenu *propertiesMenu = new QMenu(tr("Properties")); + QMenu *propertiesMenu = settingsMenu->addMenu(tr("Properties")); QActionGroup *orientation = new QActionGroup(parent); orientation->setExclusive(true); portraitOrientation = new QAction(tr("orientation: Portrait"), parent); @@ -521,8 +521,6 @@ void QmlViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) orientation->addAction(landscapeOrientation); propertiesMenu->addAction(landscapeOrientation); - settingsMenu->addMenu(propertiesMenu); - if (flatmenu) flatmenu->addSeparator(); QMenu *helpMenu = flatmenu ? flatmenu : menu->addMenu(tr("&Help")); |