Do not use QWeakPointer to track QObjects.

This use case is deprecated in Qt 5. Use QPointer instead.

Change-Id: Id6c32542032656d7cb31cf838d93a680ab9e9327
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Christian Kandeler
2012-09-24 13:48:18 +02:00
parent f21a408b51
commit aef4280bc1
23 changed files with 64 additions and 54 deletions

View File

@@ -123,7 +123,7 @@ QuickToolBar::~QuickToolBar()
//if the pane was never activated the widget is not in a widget tree
if (!m_widget.isNull())
delete m_widget.data();
m_widget.clear();
m_widget = 0;
}
void QuickToolBar::apply(TextEditor::BaseTextEditor *editor, Document::Ptr document, const ScopeChain *scopeChain, AST::Node *node, bool update, bool force)

View File

@@ -33,6 +33,8 @@
#include <qmljs/qmljsicontextpane.h>
#include <QPointer>
namespace TextEditor {
class BaseTextEditor;
}
@@ -66,7 +68,7 @@ public slots:
private:
QmlEditorWidgets::ContextPaneWidget* contextWidget();
QWeakPointer<QmlEditorWidgets::ContextPaneWidget> m_widget;
QPointer<QmlEditorWidgets::ContextPaneWidget> m_widget;
QmlJS::Document::Ptr m_doc;
QmlJS::AST::Node *m_node;
TextEditor::BaseTextEditor *m_editor;