forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user