QmlDesigner.ContextMenu: Fixing possible crash

If an item is created but not (yet) in the hierarchy, but gets selected,
the parent property is not valid. We should check for this case.

Change-Id: I965bc20172bfd58b0b1759d3b0907971dfe142f1
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
QmlDesigner.PropertyEditor: Fixing name of property

The property name is textColor not just color.

Change-Id: I500a030fd20afe3a7737471cda1893163a355255
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
QmlDesigner.MetaInfo: interpret numberValue as real

Number value is used for integer and real types.
(e.g. QRect and QRectF).

To avoid rounding real to int for QRectF/QSizeF we interpret
numberValue as real.

Change-Id: I051f960d7ef8a391d0a27641516d233175c6d3b1
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
QmlDesigner.Model: Add type info to VariantPropert stream operator

This is useful information.

Change-Id: I7757fff89e9d7a2fa07d65b47d6be829212d4d7e
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
QmlDesigner.Rewriter: Support for float type in QVariant

Change-Id: I29944ee139b69e9e896fdc533fb7c0ffbd888846
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
QmlDesigner.DocumentManagment: Updating the Qt version when attaching

Updating the Qt version when attaching the rewriter.
When the Qml file was opened first no project might have been
configured, but a valid project was opened later.

Change-Id: Iff59464bfe0d3628a99878d3463c8763087ad4f2
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
QmlDesigner.DesignDocument: Fixing getActiveQtVersion()

The function currentProject() returns the current project based
on the current project node.
If the current document was newly created by a wizard, this did not work.
We use SessionManager::projectForFile() as a fallback.

For Qt Creator 3.2 we plan to unify this functionality with die Qml
code model.

Change-Id: I296224671a0b496fbf6fd0d8e62e74c28b4f9abb
Reviewed-by: Marco Bubke <marco.bubke@digia.com>