From b2ee6769de108ce86ff624e211e003d40c78cf44 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Thu, 14 Feb 2013 15:35:32 -0500 Subject: [PATCH 1/2] fix Qt 4.7 warning for KWin tabbox qml improt Qt 4.7 is depracted by import QtQuick 1.0 REVIEW: 108966 --- tabbox/qml/clients/compact/contents/ui/main.qml | 4 ++-- tabbox/qml/clients/informative/contents/ui/main.qml | 4 ++-- tabbox/qml/clients/text/contents/ui/main.qml | 4 ++-- tabbox/qml/desktop.qml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tabbox/qml/clients/compact/contents/ui/main.qml b/tabbox/qml/clients/compact/contents/ui/main.qml index 390b8717f9..19cf79f6ed 100644 --- a/tabbox/qml/clients/compact/contents/ui/main.qml +++ b/tabbox/qml/clients/compact/contents/ui/main.qml @@ -142,7 +142,7 @@ Item { function calculateMaxRowWidth() { var width = 0; var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "' + itemCaption(compactTabBox.longestCaption, true) + '"\n' + ' font.bold: true\n' @@ -159,7 +159,7 @@ Item { **/ function calcRowHeight() { var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "Some Text"\n' + ' font.bold: true\n' diff --git a/tabbox/qml/clients/informative/contents/ui/main.qml b/tabbox/qml/clients/informative/contents/ui/main.qml index 360c6f0e8f..eaff9f7a66 100644 --- a/tabbox/qml/clients/informative/contents/ui/main.qml +++ b/tabbox/qml/clients/informative/contents/ui/main.qml @@ -158,7 +158,7 @@ Item { function calculateMaxRowWidth() { var width = 0; var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "' + itemCaption(informativeTabBox.longestCaption, true) + '"\n' + ' font.bold: true\n' @@ -175,7 +175,7 @@ Item { **/ function calcRowHeight() { var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "Some Text"\n' + ' font.bold: true\n' diff --git a/tabbox/qml/clients/text/contents/ui/main.qml b/tabbox/qml/clients/text/contents/ui/main.qml index c598766cae..c700e04078 100644 --- a/tabbox/qml/clients/text/contents/ui/main.qml +++ b/tabbox/qml/clients/text/contents/ui/main.qml @@ -109,7 +109,7 @@ Item { function calculateMaxRowWidth() { var width = 0; var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "' + textTabBox.longestCaption + '"\n' + ' visible: false\n' @@ -125,7 +125,7 @@ Item { **/ function calcRowHeight() { var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "Some Text"\n' + ' visible: false\n' diff --git a/tabbox/qml/desktop.qml b/tabbox/qml/desktop.qml index 0e0643e31d..6c24ef32ea 100644 --- a/tabbox/qml/desktop.qml +++ b/tabbox/qml/desktop.qml @@ -115,7 +115,7 @@ Item { function calculateMaxRowWidth() { var width = 0; var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "' + desktopTabBox.longestCaption + '"\n' + ' font.bold: true\n' @@ -132,7 +132,7 @@ Item { **/ function calcRowHeight() { var textElement = Qt.createQmlObject( - 'import Qt 4.7;' + 'import QtQuick 1.0;' + 'Text {\n' + ' text: "Some Text"\n' + ' font.bold: true\n' From ae7474a6c44a8fbddd3398cbd181e9eb333b9b3b Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Thu, 14 Feb 2013 15:38:50 -0500 Subject: [PATCH 2/2] fix some typo in tabbox qml REVIEW: 108809 --- tabbox/qml/clients/informative/contents/ui/main.qml | 2 +- tabbox/qml/clients/text/contents/ui/main.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tabbox/qml/clients/informative/contents/ui/main.qml b/tabbox/qml/clients/informative/contents/ui/main.qml index eaff9f7a66..c52186950a 100644 --- a/tabbox/qml/clients/informative/contents/ui/main.qml +++ b/tabbox/qml/clients/informative/contents/ui/main.qml @@ -167,7 +167,7 @@ Item { listView, "calculateMaxRowWidth"); width = Math.max(textElement.width, width); textElement.destroy(); - return width + 32 + hoverItem.margins.right + hoverItem.margins.left + background.leftMargin + background.right;Margin + return width + 32 + hoverItem.margins.right + hoverItem.margins.left + background.leftMargin + background.rightMargin; } /** * Calculates the height of one row based on the text height and icon size. diff --git a/tabbox/qml/clients/text/contents/ui/main.qml b/tabbox/qml/clients/text/contents/ui/main.qml index c700e04078..aac7387c72 100644 --- a/tabbox/qml/clients/text/contents/ui/main.qml +++ b/tabbox/qml/clients/text/contents/ui/main.qml @@ -117,7 +117,7 @@ Item { textListView, "calculateMaxRowWidth"); width = Math.max(textElement.width, width); textElement.destroy(); - return width + hoverItem.margins.right + hoverItem.margins.left + background.leftMargin + background.right;Margin + return width + hoverItem.margins.right + hoverItem.margins.left + background.leftMargin + background.rightMargin; } /** * Calculates the height of one row based on the text height and icon size.