forked from qt-creator/qt-creator
QmlDesigner: clean up QWeakPointer use
Change-Id: I314519f7458d4b87e2056cca1ce35f8604f1f51f Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -20,7 +20,6 @@ QT += core-private qml-private quick-private gui-private
|
||||
|
||||
|
||||
|
||||
DEFINES += QWEAKPOINTER_ENABLE_ARROW
|
||||
DEFINES -= QT_CREATOR
|
||||
|
||||
include (../instances/instances.pri)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
QT += core gui network declarative
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += declarative-private core-private widgets-private gui-private script-private
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += declarative-private core-private widgets-private gui-private script-private
|
||||
} else {
|
||||
contains (QT_CONFIG, webkit) {
|
||||
QT += webkit
|
||||
@@ -10,6 +9,9 @@ greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
}
|
||||
|
||||
DEFINES += QWEAKPOINTER_ENABLE_ARROW
|
||||
# to support the in Qt5 deprecated but in Qt4 useful QWeakPointer
|
||||
# change the QT_DISABLE_DEPRECATED_BEFORE version to Qt4
|
||||
greaterThan(QT_MAJOR_VERSION, 4):DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
|
||||
|
||||
include (../instances/instances.pri)
|
||||
include (instances/instances.pri)
|
||||
@@ -21,7 +23,6 @@ include (../types/types.pri)
|
||||
SOURCES += $$PWD/qmlpuppetmain.cpp
|
||||
RESOURCES += $$PWD/../qmlpuppet.qrc
|
||||
DEFINES -= QT_NO_CAST_FROM_ASCII
|
||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900 # For deprecated QWeakPointer use.
|
||||
|
||||
unix:!macx:LIBS += -lrt # posix shared memory
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
DEFINES += QWEAKPOINTER_ENABLE_ARROW
|
||||
|
||||
unix:QMAKE_CXXFLAGS_DEBUG += -O3
|
||||
|
||||
include(../../qtcreatorlibrary.pri)
|
||||
|
||||
@@ -5,7 +5,6 @@ QtcLibrary {
|
||||
name: "QmlEditorWidgets"
|
||||
|
||||
cpp.defines: base.concat([
|
||||
"QWEAKPOINTER_ENABLE_ARROW",
|
||||
"BUILD_QMLEDITORWIDGETS_LIB"
|
||||
])
|
||||
cpp.optimization: "fast"
|
||||
|
||||
@@ -6,7 +6,6 @@ debug {
|
||||
TMP_BAUHAUS_NO_OUTPUT = $$[BAUHAUS_NO_OUTPUT]
|
||||
equals(TMP_BAUHAUS_NO_OUTPUT, true):DEFINES += QT_NO_DEBUG_OUTPUT \
|
||||
QT_NO_WARNING_OUTPUT
|
||||
DEFINES += ENABLE_TEXT_VIEW \
|
||||
QWEAKPOINTER_ENABLE_ARROW
|
||||
DEFINES += ENABLE_TEXT_VIEW
|
||||
|
||||
isEmpty($$(BAUHAUS_OUTPUT_IN_TEST)):DEFINES += QDEBUG_IN_TESTS WARNINGS_IN_TESTS
|
||||
|
||||
@@ -128,8 +128,9 @@ InternalNodeAbstractProperty::Pointer InternalNode::parentProperty() const
|
||||
}
|
||||
void InternalNode::setParentProperty(const InternalNodeAbstractProperty::Pointer &parent)
|
||||
{
|
||||
if (m_parentProperty)
|
||||
m_parentProperty->remove(internalPointer());
|
||||
InternalNodeAbstractProperty::Pointer parentProperty = m_parentProperty.toStrongRef();
|
||||
if (parentProperty)
|
||||
parentProperty->remove(internalPointer());
|
||||
|
||||
Q_ASSERT(parent && parent->isValid());
|
||||
m_parentProperty = parent;
|
||||
@@ -139,8 +140,9 @@ void InternalNode::setParentProperty(const InternalNodeAbstractProperty::Pointer
|
||||
|
||||
void InternalNode::resetParentProperty()
|
||||
{
|
||||
if (m_parentProperty)
|
||||
m_parentProperty->remove(internalPointer());
|
||||
InternalNodeAbstractProperty::Pointer parentProperty = m_parentProperty.toStrongRef();
|
||||
if (parentProperty)
|
||||
parentProperty->remove(internalPointer());
|
||||
|
||||
m_parentProperty.clear();
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ QtcPlugin {
|
||||
Depends { name: "LanguageUtils" }
|
||||
Depends { name: "QtSupport" }
|
||||
|
||||
cpp.defines: base.concat(["QWEAKPOINTER_ENABLE_ARROW"])
|
||||
cpp.includePaths: base.concat([
|
||||
"designercore",
|
||||
"designercore/include",
|
||||
|
||||
@@ -22,7 +22,6 @@ include(components/importmanager/importmanager.pri)
|
||||
include(qmldesignerplugin.pri)
|
||||
|
||||
DEFINES -= QT_NO_CAST_FROM_ASCII
|
||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900 # For deprecated QWeakPointer use.
|
||||
|
||||
BUILD_PUPPET_IN_CREATOR_BINPATH = $$(BUILD_PUPPET_IN_CREATOR_BINPATH)
|
||||
!isEmpty(BUILD_PUPPET_IN_CREATOR_BINPATH) {
|
||||
|
||||
Reference in New Issue
Block a user