Commit 7838e2ae authored by Tobias Hunger's avatar Tobias Hunger

QmlDesigner: Remove dead code

Change-Id: I3877caa8566eb272ed6a60f74ff19bd7d07636a1
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 1911d955
......@@ -47,11 +47,6 @@ namespace QmlDesigner {
const PropertyName auxDataString("anchors_");
static inline bool isItem(const ModelNode &node)
{
return node.isValid() && node.metaInfo().isValid() && node.metaInfo().isSubclassOf("QtQuick.Item", -1, -1);
}
static inline QList<QmlItemNode> siblingsForNode(const QmlItemNode &itemNode)
{
QList<QmlItemNode> siblingList;
......@@ -90,24 +85,6 @@ static signed int getMinZValue(const QList<QmlItemNode> &siblingList)
return minimum;
}
static inline void getWidthHeight(const ModelNode &node, int &width, int &height)
{
QmlItemNode itemNode(node);
if (itemNode.isValid()) {
width = itemNode.instanceValue("width").toInt();
height = itemNode.instanceValue("height").toInt();
}
}
static inline bool modelNodesHaveProperty(const QList<ModelNode> &modelNodeList, const PropertyName &propertyName)
{
foreach (const ModelNode &modelNode, modelNodeList)
if (modelNode.hasProperty(propertyName))
return true;
return false;
}
static inline void reparentTo(const ModelNode &node, const QmlItemNode &parent)
{
......
......@@ -193,14 +193,6 @@ void AbstractFormEditorTool::dragEnterEvent(QGraphicsSceneDragDropEvent * event)
}
}
static inline bool checkIfNodeIsAView(const ModelNode &node)
{
return node.metaInfo().isValid() &&
(node.metaInfo().isSubclassOf("QtQuick.ListView", -1, -1) ||
node.metaInfo().isSubclassOf("QtQuick.GridView", -1, -1) ||
node.metaInfo().isSubclassOf("QtQuick.PathView", -1, -1));
}
void AbstractFormEditorTool::mousePressEvent(const QList<QGraphicsItem*> & /*itemList*/, QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::RightButton)
......
......@@ -89,22 +89,6 @@ void MetaInfoPrivate::initialize()
m_isInitialized = true;
}
QString static inline stripPrefix(const QString &typeName)
{
QStringList list = typeName.split('.');
if (list.count() == 2)
return list.last();
return typeName;
}
static inline bool isDepricatedQtType(const QString &typeName)
{
if (typeName.length() < 8)
return false;
return typeName.contains("Qt.");
}
void MetaInfoPrivate::parseItemLibraryDescriptions()
{
Internal::WidgetPluginManager pluginManager;
......
......@@ -360,14 +360,6 @@ void SubComponentManager::unregisterQmlFile(const QFileInfo &fileInfo, const QSt
componentName = qualifier + '.' + componentName;
}
static inline bool isDepricatedQtType(const QString &typeName)
{
if (typeName.length() < 8)
return false;
return typeName.contains("Qt.");
}
void SubComponentManager::registerQmlFile(const QFileInfo &fileInfo, const QString &qualifier,
bool addToLibrary)
......
......@@ -111,11 +111,6 @@ static inline unsigned char convertHex(ushort c)
return (c - 'A' + 10);
}
static inline unsigned char convertHex(ushort c1, ushort c2)
{
return ((convertHex(c1) << 4) + convertHex(c2));
}
QChar convertUnicode(ushort c1, ushort c2,
ushort c3, ushort c4)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment