From 81302acf9d3c053e0cea29d9881d11271ec15592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Thu, 14 Feb 2013 06:01:29 +0100 Subject: [PATCH] Fix namespacing It seems QtQuick2 is more picky about imports inside components in the same directory (i.e. import "."). We can work around this, however, by putting it in a namespace. Makes all the values in enums.h accessible, and generally not error out when we're importing ".". --- declarativeimports/plasmacomponents/qml/Page.qml | 6 +++--- declarativeimports/plasmacomponents/qml/TabGroup.qml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/Page.qml b/declarativeimports/plasmacomponents/qml/Page.qml index c0e8e08c1..c82309951 100644 --- a/declarativeimports/plasmacomponents/qml/Page.qml +++ b/declarativeimports/plasmacomponents/qml/Page.qml @@ -40,7 +40,7 @@ import QtQuick 2.0 -import "." 0.1 +import "." 0.1 as PlasmaComponents /** * Defines the content of a piece of the user interface, it's meant to be @@ -62,7 +62,7 @@ Item { * - PageStatus.Active: the page is the current active page * - PageStatus.Deactivating: the page is transitioning into becoming inactive */ - property int status: PageStatus.Inactive + property int status: PlasmaComponents.PageStatus.Inactive /** * type:PageStack @@ -73,7 +73,7 @@ Item { /** * Sets the orientation for the Page */ - property int orientationLock: PageOrientation.Automatic + property int orientationLock: PlasmaComponents.PageOrientation.Automatic /** * Defines the toolbar contents for the page. If the page stack is set up diff --git a/declarativeimports/plasmacomponents/qml/TabGroup.qml b/declarativeimports/plasmacomponents/qml/TabGroup.qml index bfcc0055c..09e634939 100644 --- a/declarativeimports/plasmacomponents/qml/TabGroup.qml +++ b/declarativeimports/plasmacomponents/qml/TabGroup.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 import "private/TabGroup.js" as Engine -import "." 0.1 +import "." 0.1 as PlasmaComponents /** * Provides a set of pages for a tab-based interface. @@ -156,7 +156,7 @@ Item { state = "" if (priv.incomingPage) { if (priv.incomingPage.status != undefined) { - priv.incomingPage.status = PageStatus.Active + priv.incomingPage.status = PlasmaComponents.PageStatus.Active } priv.incomingPage = null } @@ -165,7 +165,7 @@ Item { function outgoingDone() { if (priv.outgoingPage) { if (priv.outgoingPage.status != undefined) { - priv.outgoingPage.status = PageStatus.Active + priv.outgoingPage.status = PlasmaComponents.PageStatus.Active } priv.outgoingPage.visible = false priv.outgoingPage = null @@ -245,7 +245,7 @@ Item { incomingPage = currentTabContainer.children[0] incomingPage.visible = true if (incomingPage.status != undefined) { - incomingPage.status = PageStatus.Activating + incomingPage.status = PlasmaComponents.PageStatus.Activating } if (currentIndex < newCurrentIndex) { currentTabContainer.state = "HiddenLeft"