diff options
author | Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> | 2012-05-04 14:35:03 -0300 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> | 2012-05-04 16:39:52 -0300 |
commit | 7bc752cb22489e2e3692c898b34b29273639373c (patch) | |
tree | 56b4b94a122684486f9d9a23d3cb8226bd6521ef | |
parent | 1787e74b9aa2327b678a7bda38a0e4b37e0da358 (diff) |
Use qrc:/// for Qt resource file URLs
Fix Snowshoe for the recent Qt5 / WK update.
The :/ syntax is for file names not URLs, and functions that take urls
expect the qrc:/// syntax. This is documented in
http://doc-snapshot.qt-project.org/5.0/qml-url.html
This patch makes all the references to Qt resource files to use
qrc:/// syntax.
Reviewed-by: Jesus Sanchez-Palencia
-rw-r--r-- | src/desktop/BrowserWindow.cpp | 2 | ||||
-rw-r--r-- | src/mobile/BrowserWindowMobile.cpp | 4 | ||||
-rw-r--r-- | src/mobile/qml/Main.qml | 4 | ||||
-rw-r--r-- | src/mobile/qml/NavigationBar.qml | 14 | ||||
-rw-r--r-- | src/mobile/qml/NavigationPanel.qml | 2 | ||||
-rw-r--r-- | src/mobile/qml/OverlayBar.qml | 8 | ||||
-rw-r--r-- | src/mobile/qml/PanelToggle.qml | 4 | ||||
-rw-r--r-- | src/mobile/qml/Scrollbar.qml | 4 | ||||
-rw-r--r-- | src/mobile/qml/StatusBarIndicator.qml | 4 | ||||
-rw-r--r-- | src/mobile/qml/SuggestionItem.qml | 6 | ||||
-rw-r--r-- | src/mobile/qml/TopSitesPanel.qml | 2 | ||||
-rw-r--r-- | src/mobile/qml/UrlBar.qml | 2 | ||||
-rw-r--r-- | src/mobile/qml/UrlInputPanel.qml | 8 |
13 files changed, 32 insertions, 32 deletions
diff --git a/src/desktop/BrowserWindow.cpp b/src/desktop/BrowserWindow.cpp index e779e38..00f915e 100644 --- a/src/desktop/BrowserWindow.cpp +++ b/src/desktop/BrowserWindow.cpp @@ -126,5 +126,5 @@ void BrowserWindow::setupDeclarativeEnvironment() QObject::connect(engine(), SIGNAL(quit()), qApp, SLOT(quit())); setResizeMode(QQuickView::SizeRootObjectToView); - setSource(QUrl("qrc:/qml/main.qml")); + setSource(QUrl("qrc:///qml/main.qml")); } diff --git a/src/mobile/BrowserWindowMobile.cpp b/src/mobile/BrowserWindowMobile.cpp index 961051c..42b01f3 100644 --- a/src/mobile/BrowserWindowMobile.cpp +++ b/src/mobile/BrowserWindowMobile.cpp @@ -49,8 +49,8 @@ void BrowserWindowMobile::setupDeclarativeEnvironment() setResizeMode(QQuickView::SizeRootObjectToView); #if defined(SNOWSHOE_MEEGO_HARMATTAN) - setSource(QUrl("qrc:/mobile/qml/main-harmattan.qml")); + setSource(QUrl("qrc:///mobile/qml/main-harmattan.qml")); #else - setSource(QUrl("qrc:/mobile/qml/Main.qml")); + setSource(QUrl("qrc:///mobile/qml/Main.qml")); #endif } diff --git a/src/mobile/qml/Main.qml b/src/mobile/qml/Main.qml index 0e12c97..fa9fea9 100644 --- a/src/mobile/qml/Main.qml +++ b/src/mobile/qml/Main.qml @@ -26,7 +26,7 @@ Rectangle { Image { anchors.fill: parent - source: ":/mobile/app/bg_image" + source: "qrc:///mobile/app/bg_image" } PanelToggle { @@ -76,7 +76,7 @@ Rectangle { Image { id: plusButton opacity: 0 - source: plusButtonMouseArea.pressed ? ":/mobile/nav/btn_plus_pressed" : ":/mobile/nav/btn_plus_unpressed" + source: plusButtonMouseArea.pressed ? "qrc:///mobile/nav/btn_plus_pressed" : "qrc:///mobile/nav/btn_plus_unpressed" anchors.top: topSitesPanel.bottom anchors.topMargin: 27 diff --git a/src/mobile/qml/NavigationBar.qml b/src/mobile/qml/NavigationBar.qml index bdac5ac..4f48d2f 100644 --- a/src/mobile/qml/NavigationBar.qml +++ b/src/mobile/qml/NavigationBar.qml @@ -41,8 +41,8 @@ Item { left: parent.left leftMargin: UiConstants.NavBarLongMargin } - pressedImage: ":/mobile/navbar/btn_nav_back_pressed" - unpressedImage: ":/mobile/navbar/btn_nav_back_unpressed" + pressedImage: "qrc:///mobile/navbar/btn_nav_back_pressed" + unpressedImage: "qrc:///mobile/navbar/btn_nav_back_unpressed" visible: { currentWebView ? currentWebView.canGoBack : false } onClicked: { currentWebView.goBack() @@ -56,8 +56,8 @@ Item { left: { buttonBack.visible ? buttonBack.right : parent.left } leftMargin: buttonBack.visible ? UiConstants.NavBarShortMargin : UiConstants.NavBarLongMargin } - pressedImage: ":/mobile/navbar/btn_nav_forward_pressed" - unpressedImage: ":/mobile/navbar/btn_nav_forward_unpressed" + pressedImage: "qrc:///mobile/navbar/btn_nav_forward_pressed" + unpressedImage: "qrc:///mobile/navbar/btn_nav_forward_unpressed" visible: { currentWebView ? currentWebView.canGoForward : false } onClicked: { currentWebView.goForward() @@ -77,7 +77,7 @@ Item { right: parent.right rightMargin: UiConstants.NavBarLongMargin } - source: ":/mobile/navbar/url_input" + source: "qrc:///mobile/navbar/url_input" Item { anchors { fill: parent @@ -106,8 +106,8 @@ Item { id: reloadStopButton property bool loading: { currentWebView ? currentWebView.loading : false } anchors.right: parent.right - pressedImage: { loading ? ":/mobile/navbar/btn_nav_stop_pressed" : ":/mobile/navbar/btn_nav_reload_pressed" } - unpressedImage: { loading ? ":/mobile/navbar/btn_nav_stop_unpressed" : ":/mobile/navbar/btn_nav_reload_unpressed" } + pressedImage: { loading ? "qrc:///mobile/navbar/btn_nav_stop_pressed" : "qrc:///mobile/navbar/btn_nav_reload_pressed" } + unpressedImage: { loading ? "qrc:///mobile/navbar/btn_nav_stop_unpressed" : "qrc:///mobile/navbar/btn_nav_reload_unpressed" } onClicked: { if (loading) { currentWebView.stop(); diff --git a/src/mobile/qml/NavigationPanel.qml b/src/mobile/qml/NavigationPanel.qml index c362242..6267ad9 100644 --- a/src/mobile/qml/NavigationPanel.qml +++ b/src/mobile/qml/NavigationPanel.qml @@ -68,7 +68,7 @@ Item { Image { id: barsBackground height: tabBar.height - source: ":/mobile/app/bg_image" + source: "qrc:///mobile/app/bg_image" anchors.bottom: parent.bottom fillMode: Image.Pad verticalAlignment: Image.AlignBottom diff --git a/src/mobile/qml/OverlayBar.qml b/src/mobile/qml/OverlayBar.qml index ddd3046..e391d0a 100644 --- a/src/mobile/qml/OverlayBar.qml +++ b/src/mobile/qml/OverlayBar.qml @@ -37,16 +37,16 @@ Item { left: parent.left leftMargin: UiConstants.OverlayBarLongMargin } - pressedImage: ":/mobile/overlaybar/btn_thumbview_pressed" - unpressedImage: ":/mobile/overlaybar/btn_thumbview_unpressed" + pressedImage: "qrc:///mobile/overlaybar/btn_thumbview_pressed" + unpressedImage: "qrc:///mobile/overlaybar/btn_thumbview_unpressed" onClicked: overlayBar.showThumbnails() } Button { id: buttonPlus anchors.horizontalCenter: parent.horizontalCenter - pressedImage: ":/mobile/overlaybar/btn_plus_pressed" - unpressedImage: ":/mobile/overlaybar/btn_plus_unpressed" + pressedImage: "qrc:///mobile/overlaybar/btn_plus_pressed" + unpressedImage: "qrc:///mobile/overlaybar/btn_plus_unpressed" onClicked: overlayBar.openNewTab() } diff --git a/src/mobile/qml/PanelToggle.qml b/src/mobile/qml/PanelToggle.qml index f260b56..55d1e67 100644 --- a/src/mobile/qml/PanelToggle.qml +++ b/src/mobile/qml/PanelToggle.qml @@ -45,7 +45,7 @@ Row { Image { id: topsites - source: ":/mobile/app/topsites" + (active ? "_pressed" : "_unpressed") + source: "qrc:///mobile/app/topsites" + (active ? "_pressed" : "_unpressed") property bool active; MouseArea { @@ -55,7 +55,7 @@ Row { } Image { id: tabs - source: ":/mobile/app/tabs" + (active ? "_pressed" : "_unpressed") + source: "qrc:///mobile/app/tabs" + (active ? "_pressed" : "_unpressed") property bool active; MouseArea { diff --git a/src/mobile/qml/Scrollbar.qml b/src/mobile/qml/Scrollbar.qml index ae3390b..0deb5ea 100644 --- a/src/mobile/qml/Scrollbar.qml +++ b/src/mobile/qml/Scrollbar.qml @@ -20,7 +20,7 @@ import "UiConstants.js" as UiConstants BorderImage { id: scrollbar border { top: 2; left: 2; right: 2; bottom: 2 } - source: ":/mobile/scrollbar/bg_image" + source: "qrc:///mobile/scrollbar/bg_image" property Flickable list BorderImage { @@ -28,7 +28,7 @@ BorderImage { property int offset: 20 property int maximumY: scrollbar.height - bullet.height - 2*offset border { top: 2; left: 2; right: 2; bottom: 2 } - source: ":/mobile/scrollbar/bullet" + source: "qrc:///mobile/scrollbar/bullet" height: 40 y: Math.max(0.0, Math.min(1.0,(list.contentY / (list.contentHeight - list.height)))) * maximumY + offset } diff --git a/src/mobile/qml/StatusBarIndicator.qml b/src/mobile/qml/StatusBarIndicator.qml index 9ee12ff..eca56f2 100644 --- a/src/mobile/qml/StatusBarIndicator.qml +++ b/src/mobile/qml/StatusBarIndicator.qml @@ -21,13 +21,13 @@ Image { property bool active: true property int loadProgress - source: active ? ":/mobile/indicator/loading_active" : ":/mobile/indicator/loading_inactive" + source: active ? "qrc:///mobile/indicator/loading_active" : "qrc:///mobile/indicator/loading_inactive" Image { id: progressIndicator anchors.fill: parent visible: loadProgress > 0 - source: ":/mobile/indicator/loading_" + loadProgress + source: "qrc:///mobile/indicator/loading_" + loadProgress states: [ State { diff --git a/src/mobile/qml/SuggestionItem.qml b/src/mobile/qml/SuggestionItem.qml index 439977c..cb0c1ec 100644 --- a/src/mobile/qml/SuggestionItem.qml +++ b/src/mobile/qml/SuggestionItem.qml @@ -43,13 +43,13 @@ Item { Image { id: suggestionRect - source: ":/mobile/url/bg_browsing" + source: "qrc:///mobile/url/bg_browsing" anchors { left: parent.left; right: parent.right; bottom: parent.bottom } } Image { id: icon - source: isGoogleSearch ? ":/mobile/scrollbar/btn_google_search" : ":/mobile/scrollbar/btn_url_suggestion" + source: isGoogleSearch ? "qrc:///mobile/scrollbar/btn_google_search" : "qrc:///mobile/scrollbar/btn_url_suggestion" anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left } @@ -89,7 +89,7 @@ Item { Image { id: fadingLayer - source: ":/mobile/scrollbar/suggestions_overlayer" + source: "qrc:///mobile/scrollbar/suggestions_overlayer" anchors { right: parent.right top: parent.top diff --git a/src/mobile/qml/TopSitesPanel.qml b/src/mobile/qml/TopSitesPanel.qml index 32a81a8..2422300 100644 --- a/src/mobile/qml/TopSitesPanel.qml +++ b/src/mobile/qml/TopSitesPanel.qml @@ -78,7 +78,7 @@ Item { BookmarkModel.insert(urls[i], urls[i]); //!!! End of temporary code - var elem = fakeBookmarkEntry.createObject(topSitesGrid, {source: ":/mobile/fav/icon0"+(i+1), url: urls[i]}); + var elem = fakeBookmarkEntry.createObject(topSitesGrid, {source: "qrc:///mobile/fav/icon0"+(i+1), url: urls[i]}); topSitesModel.add(elem); } } diff --git a/src/mobile/qml/UrlBar.qml b/src/mobile/qml/UrlBar.qml index fa0d1e2..6cbfdbf 100644 --- a/src/mobile/qml/UrlBar.qml +++ b/src/mobile/qml/UrlBar.qml @@ -28,7 +28,7 @@ Item { BorderImage { id: border - source: ":/mobile/navbar/url_input" + source: "qrc:///mobile/navbar/url_input" border { left: 26; top: 26; right: 26; bottom: 26 } anchors.fill: parent } diff --git a/src/mobile/qml/UrlInputPanel.qml b/src/mobile/qml/UrlInputPanel.qml index 4554af4..749d4cf 100644 --- a/src/mobile/qml/UrlInputPanel.qml +++ b/src/mobile/qml/UrlInputPanel.qml @@ -74,8 +74,8 @@ Item { Button { id: eraseButton - pressedImage: ":/mobile/url/btn_erase_pressed" - unpressedImage: ":/mobile/url/btn_erase_unpressed" + pressedImage: "qrc:///mobile/url/btn_erase_pressed" + unpressedImage: "qrc:///mobile/url/btn_erase_unpressed" visible: urlBar.text !== "" anchors.right: parent.right onClicked: urlBar.text = "" @@ -90,8 +90,8 @@ Item { bottomMargin: 22 rightMargin: UiConstants.DefaultMargin } - pressedImage: ":/mobile/url/btn_cancel_pressed" - unpressedImage: ":/mobile/url/btn_cancel_unpressed" + pressedImage: "qrc:///mobile/url/btn_cancel_pressed" + unpressedImage: "qrc:///mobile/url/btn_cancel_unpressed" onClicked: urlArea.cancelRequested() } } |