Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
1801688b
Commit
1801688b
authored
Sep 26, 2012
by
Eike Ziller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://codereview.qt-project.org/qt-creator/qt-creator
parents
a55d4754
b356ad96
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
24 additions
and
67 deletions
+24
-67
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstancesignalspy.cpp
...l/qmlpuppet/qmlpuppet/instances/nodeinstancesignalspy.cpp
+0
-4
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp
.../qml/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp
+5
-9
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/servernodeinstance.cpp
.../qml/qmlpuppet/qmlpuppet/instances/servernodeinstance.cpp
+0
-24
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/servernodeinstance.h
...or/qml/qmlpuppet/qmlpuppet/instances/servernodeinstance.h
+0
-6
share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri
share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri
+7
-1
src/plugins/qmldesigner/components/itemlibrary/itemlibrary.pri
...lugins/qmldesigner/components/itemlibrary/itemlibrary.pri
+4
-0
src/plugins/qmldesigner/customstyleplugin/customstyleplugin.h
...plugins/qmldesigner/customstyleplugin/customstyleplugin.h
+0
-1
src/plugins/qmldesigner/desktopplugin/desktopplugin.h
src/plugins/qmldesigner/desktopplugin/desktopplugin.h
+0
-1
src/plugins/qmldesigner/desktopplugin/desktopplugin.pri
src/plugins/qmldesigner/desktopplugin/desktopplugin.pri
+0
-3
src/plugins/qmldesigner/extrasplugin/extrasplugin.h
src/plugins/qmldesigner/extrasplugin/extrasplugin.h
+0
-1
src/plugins/qmldesigner/extrasplugin/extrasplugin.pri
src/plugins/qmldesigner/extrasplugin/extrasplugin.pri
+0
-3
src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
+0
-3
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp
+0
-4
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h
+0
-1
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.pri
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.pri
+0
-3
src/tools/qmlpuppet/qmlpuppet.pro
src/tools/qmlpuppet/qmlpuppet.pro
+8
-3
No files found.
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstancesignalspy.cpp
View file @
1801688b
...
...
@@ -94,11 +94,7 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const QString &
if
(
metaProperty
.
isReadable
()
&&
QDeclarativeMetaType
::
isList
(
metaProperty
.
userType
()))
{
QDeclarativeListReference
list
(
spiedObject
,
metaProperty
.
name
());
#if QT_VERSION<0x050000
if
(
list
.
canCount
()
&&
list
.
canAt
())
{
#else
if
(
list
.
isReadable
())
{
#endif
for
(
int
i
=
0
;
i
<
list
.
count
();
i
++
)
{
QObject
*
propertyObject
=
list
.
at
(
i
);
if
(
propertyObject
)
...
...
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp
View file @
1801688b
...
...
@@ -287,12 +287,8 @@ static QVariant objectToVariant(QObject *object)
static
bool
hasFullImplementedListInterface
(
const
QDeclarativeListReference
&
list
)
{
#if QT_VERSION<0x050000
return
list
.
isValid
()
&&
list
.
canCount
()
&&
list
.
canAt
()
&&
list
.
canAppend
()
&&
list
.
canClear
();
#else
return
list
.
isChangeable
();
#endif
}
static
void
removeObjectFromList
(
const
QDeclarativeProperty
&
property
,
QObject
*
objectToBeRemoved
,
QDeclarativeEngine
*
engine
)
...
...
@@ -543,7 +539,11 @@ void ObjectNodeInstance::refreshProperty(const QString &name)
property
.
write
(
resetValue
(
name
));
if
(
oldValue
.
type
()
==
QVariant
::
Url
)
{
#if QT_VERSION >= 0x050000
QByteArray
key
=
oldValue
.
toUrl
().
toEncoded
(
QUrl
::
UrlFormattingOption
(
0x100
));
#else
QByteArray
key
=
oldValue
.
toUrl
().
toEncoded
(
QUrl
::
FormattingOption
(
0x100
));
#endif
QString
pixmapKey
=
QString
::
fromLatin1
(
key
.
constData
(),
key
.
count
());
QPixmapCache
::
remove
(
pixmapKey
);
}
...
...
@@ -774,11 +774,7 @@ void allSubObject(QObject *object, QObjectList &objectList)
if
(
metaProperty
.
isReadable
()
&&
QDeclarativeMetaType
::
isList
(
metaProperty
.
userType
()))
{
QDeclarativeListReference
list
(
object
,
metaProperty
.
name
());
#if QT_VERSION<0x050000
if
(
list
.
canCount
()
&&
list
.
canAt
())
{
#else
if
(
list
.
isReadable
())
{
#endif
for
(
int
i
=
0
;
i
<
list
.
count
();
i
++
)
{
QObject
*
propertyObject
=
list
.
at
(
i
);
allSubObject
(
propertyObject
,
objectList
);
...
...
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/servernodeinstance.cpp
View file @
1801688b
...
...
@@ -38,12 +38,8 @@
#include "qmlstatenodeinstance.h"
#include "anchorchangesnodeinstance.h"
#if QT_VERSION >= 0x050000
#include "sgitemnodeinstance.h"
#else
#include "qmlgraphicsitemnodeinstance.h"
#include "positionernodeinstance.h"
#endif
#include "nodeinstanceserver.h"
#include "instancecontainer.h"
...
...
@@ -52,10 +48,6 @@
#include <QSet>
#include <QDebug>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QSGItem>
#endif
#include <QDeclarativeEngine>
/*!
...
...
@@ -178,15 +170,10 @@ Internal::ObjectNodeInstance::Pointer ServerNodeInstance::createInstance(QObject
if
(
objectToBeWrapped
==
0
)
instance
=
Internal
::
DummyNodeInstance
::
create
();
#if QT_VERSION >= 0x050000
else
if
(
isSubclassOf
(
objectToBeWrapped
,
"QSGItem"
))
instance
=
Internal
::
SGItemNodeInstance
::
create
(
objectToBeWrapped
);
#else
else
if
(
isSubclassOf
(
objectToBeWrapped
,
"QDeclarativeBasePositioner"
))
instance
=
Internal
::
PositionerNodeInstance
::
create
(
objectToBeWrapped
);
else
if
(
isSubclassOf
(
objectToBeWrapped
,
"QDeclarativeItem"
))
instance
=
Internal
::
QmlGraphicsItemNodeInstance
::
create
(
objectToBeWrapped
);
#endif
else
if
(
isSubclassOf
(
objectToBeWrapped
,
"QDeclarativeComponent"
))
instance
=
Internal
::
ComponentNodeInstance
::
create
(
objectToBeWrapped
);
else
if
(
objectToBeWrapped
->
inherits
(
"QDeclarativeAnchorChanges"
))
...
...
@@ -225,11 +212,7 @@ ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceSe
}
if
((
object
==
0
)
&&
(
instanceContainer
.
metaType
()
==
InstanceContainer
::
ItemMetaType
))
//If we cannot instanciate the object but we know it has to be an Ttem, we create an Item instead.
#if QT_VERSION >= 0x050000
object
=
Internal
::
ObjectNodeInstance
::
createPrimitive
(
"QSGItem"
,
2
,
0
,
nodeInstanceServer
->
context
());
#else
object
=
Internal
::
ObjectNodeInstance
::
createPrimitive
(
"QtQuick/Item"
,
1
,
0
,
nodeInstanceServer
->
context
());
#endif
ServerNodeInstance
instance
(
createInstance
(
object
));
...
...
@@ -550,13 +533,6 @@ QObject *ServerNodeInstance::internalObject() const
return
m_nodeInstance
->
object
();
}
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
QSGItem
*
ServerNodeInstance
::
internalSGItem
()
const
{
return
qobject_cast
<
QSGItem
*>
(
internalObject
());
}
#endif
void
ServerNodeInstance
::
activateState
()
{
m_nodeInstance
->
activateState
();
...
...
share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/servernodeinstance.h
View file @
1801688b
...
...
@@ -44,9 +44,6 @@ class QStyleOptionGraphicsItem;
class
QDeclarativeContext
;
class
QGraphicsItem
;
class
QGraphicsTransform
;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
class
QSGItem
;
#endif
QT_END_NAMESPACE
namespace
QmlDesigner
{
...
...
@@ -199,9 +196,6 @@ private: // functions
QObject
*
internalObject
()
const
;
// should be not used outside of the nodeinstances!!!!
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
QSGItem
*
internalSGItem
()
const
;
#endif
private:
// variables
QSharedPointer
<
Internal
::
ObjectNodeInstance
>
m_nodeInstance
;
...
...
share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri
View file @
1801688b
QT += core gui declarative network
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4) {
QT += quick1 quick1-private core-private widgets-private gui-private script-private
} else {
QT += declarative
}
contains (QT_CONFIG, webkit) {
QT += webkit
...
...
src/plugins/qmldesigner/components/itemlibrary/itemlibrary.pri
View file @
1801688b
...
...
@@ -13,3 +13,7 @@ OTHER_FILES += \
qml/ItemView.qml \
qml/ItemsViewStyle.qml \
qml/ItemsView.qml
greaterThan(QT_MAJOR_VERSION, 4) {
QT += quick1-private core-private script-private
}
src/plugins/qmldesigner/customstyleplugin/customstyleplugin.h
View file @
1801688b
...
...
@@ -32,7 +32,6 @@
#define CUSTOMSTYLEPLUGIN_H
#include <iwidgetplugin.h>
#include <qdeclarative.h>
namespace
QmlDesigner
{
...
...
src/plugins/qmldesigner/desktopplugin/desktopplugin.h
View file @
1801688b
...
...
@@ -32,7 +32,6 @@
#define DESKTOPPLUGIN_H
#include <iwidgetplugin.h>
#include <qdeclarative.h>
QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
...
...
src/plugins/qmldesigner/desktopplugin/desktopplugin.pri
View file @
1801688b
...
...
@@ -2,9 +2,6 @@ TARGET = desktopplugin
TEMPLATE = lib
CONFIG += plugin
QT += script \
declarative
include (../designercore/iwidgetplugin.pri)
SOURCES += $$PWD/desktopplugin.cpp
...
...
src/plugins/qmldesigner/extrasplugin/extrasplugin.h
View file @
1801688b
...
...
@@ -32,7 +32,6 @@
#define EXTRASPLUGIN_H
#include <iwidgetplugin.h>
#include <qdeclarative.h>
namespace
QmlDesigner
{
...
...
src/plugins/qmldesigner/extrasplugin/extrasplugin.pri
View file @
1801688b
...
...
@@ -2,9 +2,6 @@ TARGET = extrasplugin
TEMPLATE = lib
CONFIG += plugin
QT += script \
declarative
include (../designercore/iwidgetplugin.pri)
SOURCES += $$PWD/extrasplugin.cpp
...
...
src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
View file @
1801688b
...
...
@@ -2,9 +2,6 @@ TARGET = meegoplugin
TEMPLATE = lib
CONFIG += plugin
QT += script \
declarative
include (../designercore/iwidgetplugin.pri)
SOURCES += $$PWD/meegoplugin.cpp
...
...
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.cpp
View file @
1801688b
...
...
@@ -31,8 +31,6 @@
#include "qtquickplugin.h"
#include <widgetplugin_helper.h>
#include <QtPlugin>
#include <private/qdeclarativerectangle_p.h>
#include <private/qdeclarativescalegrid_p_p.h>
namespace
QmlDesigner
{
...
...
@@ -40,8 +38,6 @@ namespace QmlDesigner {
QtQuickPlugin
::
QtQuickPlugin
()
{
qmlRegisterType
<
QDeclarativePen
>
(
"Qt"
,
4
,
7
,
"Pen"
);
qmlRegisterType
<
QDeclarativeScaleGrid
>
(
"Qt"
,
4
,
7
,
"ScaleGrid"
);
}
QString
QtQuickPlugin
::
pluginName
()
const
...
...
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.h
View file @
1801688b
...
...
@@ -32,7 +32,6 @@
#define QTQUICKPLUGIN_H
#include <iwidgetplugin.h>
#include <qdeclarative.h>
QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
...
...
src/plugins/qmldesigner/qtquickplugin/qtquickplugin.pri
View file @
1801688b
...
...
@@ -2,9 +2,6 @@ TARGET = qtquickplugin
TEMPLATE = lib
CONFIG += plugin
QT += script \
declarative
include (../designercore/iwidgetplugin.pri)
DEFINES += QTQUICK_LIBRARY
...
...
src/tools/qmlpuppet/qmlpuppet.pro
View file @
1801688b
...
...
@@ -3,8 +3,13 @@ TEMPLATE = subdirs
include
(..
/../../
qtcreator
.
pri
)
include
(..
/../
private_headers
.
pri
)
exists
(
$$
{
QT_PRIVATE_HEADERS
}
/
QtDeclarative
/
private
/
qdeclarativecontext_p
.
h
)
{
minQtVersion
(
4
,
7
,
1
)
{
SUBDIRS
+=
qmlpuppet
greaterThan
(
QT_MAJOR_VERSION
,
4
)
{
QT
+=
qtquick1
-
private
core
-
private
SUBDIRS
+=
qmlpuppet
}
else
{
exists
(
$$
{
QT_PRIVATE_HEADERS
}
/
QtDeclarative
/
private
/
qdeclarativecontext_p
.
h
)
{
minQtVersion
(
4
,
7
,
1
)
{
SUBDIRS
+=
qmlpuppet
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment