I have made the following changes intended for : CE:Apps / qmlgallery Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below.
https://build.pub.meego.com//request/show/6727 Thank You, John Brooks [This message was auto-generated] --- Request # 6727: Messages from BOSS: State: review at 2012-09-09T13:01:11 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:special:branches:CE:Apps / qmlgallery -> CE:Apps / qmlgallery changes files: -------------- --- qmlgallery.changes +++ qmlgallery.changes @@ -0,0 +1,5 @@ +* Sun Sep 09 2012 John Brooks <[email protected]> - 0.0.10 +- Fixes NEMO#258: Sorting by file name and file type (from Ari Silen) +- Improve UI text for sorting and filtering +- Acquire video playback resources with libresourceqt + old: ---- qmlgallery-0.0.9.tar.bz2 new: ---- qmlgallery-0.0.10.tar.bz2 spec files: ----------- --- qmlgallery.spec +++ qmlgallery.spec @@ -1,6 +1,6 @@ # # Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.24 +# Generated by: spectacle version 0.25 # Name: qmlgallery @@ -9,7 +9,7 @@ # << macros Summary: Photo Gallery for Nemo -Version: 0.0.9 +Version: 0.0.10 Release: 1 Group: Applications/System License: BSD @@ -23,6 +23,7 @@ BuildRequires: pkgconfig(QtGui) BuildRequires: pkgconfig(qdeclarative-boostable) BuildRequires: pkgconfig(QtOpenGL) +BuildRequires: pkgconfig(libresourceqt1) BuildRequires: desktop-file-utils Provides: meego-handset-video > 0.2.5 Obsoletes: meego-handset-video <= 0.2.5 @@ -32,7 +33,7 @@ %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name} # >> setup # << setup other changes: -------------- ++++++ qmlgallery-0.0.9.tar.bz2 -> qmlgallery-0.0.10.tar.bz2 Binary files images/down_arrow.png added Binary files images/up_arrow.png added --- main.cpp +++ main.cpp @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2011 Robin Burchell <[email protected]> - * - * You may use this file under the terms of the BSD license as follows: - * - * "Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Nemo Mobile nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." - */ - -#include <QDesktopServices> -#include <QApplication> -#include <QDeclarativeView> -#include <QDeclarativeEngine> -#include <QDeclarativeContext> -#include <QDebug> -#include <QDir> -#include <QGLWidget> -#ifdef HAS_BOOSTER -#include <applauncherd/MDeclarativeCache> -#endif - -#ifdef HAS_BOOSTER -Q_DECL_EXPORT -#endif -int main(int argc, char **argv) -{ - QApplication *application; - QDeclarativeView *view; -#ifdef HAS_BOOSTER - application = MDeclarativeCache::qApplication(argc, argv); - view = MDeclarativeCache::qDeclarativeView(); -#else - qWarning() << Q_FUNC_INFO << "Warning! Running without booster. This may be a bit slower."; - QApplication stackApp(argc, argv); - QDeclarativeView stackView; - application = &stackApp; - view = &stackView; -#endif - - //NOTE: if we don't use a QGLWidget as viewport, the gallery lags once we load a video - //(you get the warning "QGLWindowSurface: Using plain widget as window surface QGLWindowSurface") - //and it won't stop lagging until you exit the app, in fact it seems the QGraphicsVideoItem - //used to play the video is never destroyed - QGLWidget *renderer = new QGLWidget(); - view->setViewport(renderer); - - bool isFullscreen = false; - QStringList arguments = application->arguments(); - for (int i = 0; i < arguments.count(); ++i) { - QString parameter = arguments.at(i); - if (parameter == "-fullscreen") { - isFullscreen = true; - } else if (parameter == "-help") { - qDebug() << "Gallery application"; - qDebug() << "-fullscreen - show QML fullscreen"; - exit(0); - } - } - - QObject::connect(view->engine(), SIGNAL(quit()), application, SLOT(quit())); - - if (QFile::exists("main.qml")) - view->setSource(QUrl::fromLocalFile("main.qml")); - else - view->setSource(QUrl("qrc:/qml/main.qml")); - - view->setAttribute(Qt::WA_OpaquePaintEvent); - view->setAttribute(Qt::WA_NoSystemBackground); - view->viewport()->setAttribute(Qt::WA_OpaquePaintEvent); - view->viewport()->setAttribute(Qt::WA_NoSystemBackground); - - if (isFullscreen) - view->showFullScreen(); - else - view->show(); - - return application->exec(); -} - --- qml/FileTypeChoiceDialog.qml +++ qml/FileTypeChoiceDialog.qml @@ -33,33 +33,29 @@ SelectionDialog { id: mediaTypeFilterDialog - titleText: "Choose file type" - model: ListModel { - ListElement {name: "Videos only"} - ListElement {name: "Images only"} - ListElement {name: "Both"} - } + titleText: "Filter" - //we show Both videos and photos by default, - //and we don't destroy this Dialog once it's created, so we don't need to check the current filtering status - selectedIndex: 2 + model: filterModel + selectedIndex: currentFilter onSelectedIndexChanged: { - switch(model.get(selectedIndex).name) { - case "Videos only": - var vidFilter = gallery.createFilter(gallery, "videosfilter", "GalleryStartsWithFilter", "mimeType", "video/") - gallery.assignNewDestroyCurrent(vidFilter) - break; - case "Images only": - var imgFilter = gallery.createFilter(gallery, "imagesfilter", "GalleryStartsWithFilter", "mimeType", "image/") - gallery.assignNewDestroyCurrent(imgFilter) - break; - case "Both": + currentFilter = selectedIndex + + switch (selectedIndex) { + case 0: var videoFilter = gallery.createFilter(gallery, "videosfilter", "GalleryStartsWithFilter", "mimeType", "video/") var imageFilter = gallery.createFilter(gallery, "imagesfilter", "GalleryStartsWithFilter", "mimeType", "image/") var bothFilter = gallery.createFiltersArray(gallery, "arraysFilter", "GalleryFilterUnion", [videoFilter, imageFilter]) gallery.assignNewDestroyCurrent(bothFilter) - break; + break + case 1: + var vidFilter = gallery.createFilter(gallery, "videosfilter", "GalleryStartsWithFilter", "mimeType", "video/") + gallery.assignNewDestroyCurrent(vidFilter) + break + case 2: + var imgFilter = gallery.createFilter(gallery, "imagesfilter", "GalleryStartsWithFilter", "mimeType", "image/") + gallery.assignNewDestroyCurrent(imgFilter) + break } } } --- qml/ImagePage.qml +++ qml/ImagePage.qml @@ -77,7 +77,7 @@ function showVideoPlayer() { appWindow.pageStack.push(Qt.resolvedUrl("VideoPlayer.qml"), - {videoSource: galleryModel.get(middle.index).url, imgController: imageController}, + {videoSource: galleryModel.get(middle.index).url}, true) } --- qml/MainPage.qml +++ qml/MainPage.qml @@ -38,6 +38,7 @@ tools: mainTools GalleryView { + model: GalleryModel { id: gallery } @@ -47,15 +48,30 @@ anchors.fill: parent onClicked: appWindow.pageStack.push(Qt.resolvedUrl("ImagePage.qml"), {visibleIndex: index, galleryModel: gallery} ) } - } } Loader { - id: typeChoiceLoader + id: choiceLoader anchors.fill: parent } + property int currentFilter: 0 + ListModel { + id: filterModel + ListElement { name: "Images & Video" } + ListElement { name: "Video only" } + ListElement { name: "Images only" } + } + + property int currentSort: -1 + ListModel { + id: sortModel + ListElement { name: "Filename"; sortProperty: "fileName"; ascending: true } + ListElement { name: "File type"; sortProperty: "mimeType"; ascending: true } + ListElement { name: "Clear sorting"; sortProperty: ""; ascending: false } // dummy + } + ToolBarLayout { id: mainTools ToolIcon { @@ -67,18 +83,26 @@ Menu { id: pageMenu + MenuLayout { MenuItem { - text: "Slideshow" - onClicked: appWindow.pageStack.push(Qt.resolvedUrl("ImageSlideshowPage.qml"), {visibleIndex: 0, galleryModel: gallery}) + text: "Filter: " + filterModel.get(currentFilter).name + onClicked: { + choiceLoader.source = Qt.resolvedUrl("FileTypeChoiceDialog.qml") + choiceLoader.item.open() + } } MenuItem { - text: "Change type of shown files" + text: (currentSort >= 0) ? ("Sort: " + sortModel.get(currentSort).name) : "Sort" onClicked: { - typeChoiceLoader.source = Qt.resolvedUrl("FileTypeChoiceDialog.qml") - typeChoiceLoader.item.open() + choiceLoader.source = Qt.resolvedUrl("SortDialog.qml") + choiceLoader.item.open() } } + MenuItem { + text: "Slideshow" + onClicked: appWindow.pageStack.push(Qt.resolvedUrl("ImageSlideshowPage.qml"), { visibleIndex: 0, galleryModel: gallery }) + } } } --- qml/SortDialog.qml +++ qml/SortDialog.qml @@ -0,0 +1,89 @@ +import QtQuick 1.1 +import com.nokia.meego 1.0 + +SelectionDialog { + + titleText: "Sort by" + + // Handle item selection here instead in selectedIndexChanged to react on same selection + function itemSelected(selection) { + // Check if we need to change from asc to desc or vice versa + if (selection === selectedIndex) + model.setProperty(selection, "ascending", !model.get(selection).ascending); + + var property = model.get(selection).sortProperty + if (property && model.get(selection).ascending) + property = "-" + property + gallery.sortProperties = [ property ] + + if (property) + selectedIndex = selection + else + selectedIndex = -1 + + currentSort = selectedIndex + } + + model: sortModel + selectedIndex: currentSort + + // Delegate modified from default meego SelectionDialog delegate + delegate: Component { + id: defaultDelegate + + Item { + id: delegateItem + property bool selected: index === selectedIndex + + height: root.platformStyle.itemHeight + anchors.left: parent.left + anchors.right: parent.right + + MouseArea { + id: delegateMouseArea + anchors.fill: parent; + onPressed: { + itemSelected(index); + } + onClicked: accept(); + } + + Rectangle { + id: backgroundRect + anchors.fill: parent + color: delegateItem.selected ? root.platformStyle.itemSelectedBackgroundColor : root.platformStyle.itemBackgroundColor + } + + BorderImage { + id: background + anchors.fill: parent + source: delegateMouseArea.pressed ? root.platformStyle.itemPressedBackground : + delegateItem.selected ? root.platformStyle.itemSelectedBackground : + root.platformStyle.itemBackground + } + + Text { + id: itemText + elide: Text.ElideRight + color: delegateItem.selected ? root.platformStyle.itemSelectedTextColor : root.platformStyle.itemTextColor + anchors.verticalCenter: delegateItem.verticalCenter + anchors.left: parent.left + anchors.right: directionIcon.right + anchors.leftMargin: root.platformStyle.itemLeftMargin + anchors.rightMargin: root.platformStyle.itemRightMargin + text: name + font: root.platformStyle.itemFont + } + Image { + id: directionIcon + // If the item is selected, show sort direction + source: selected ? (ascending ? "qrc:/images/up_arrow.png" : "qrc:/images/down_arrow.png") : "" + anchors.right: parent.right + height: parent.height / 2 + width: parent.height / 2 + anchors.verticalCenter: parent.verticalCenter + smooth: true + } + } + } +} --- qml/VideoPlayer.qml +++ qml/VideoPlayer.qml @@ -43,7 +43,12 @@ //force fullscreen = false, until we find a way to make the controls appear //on top of the video without flickering and slowdown - Component.onCompleted: appWindow.fullscreen = false + Component.onCompleted: { + appWindow.fullscreen = false + gallery.acquireVideoResources() + } + + Component.onDestruction: gallery.releaseVideoResources() Video { id: videoItem --- qml/api/GalleryModel.qml +++ qml/api/GalleryModel.qml @@ -80,5 +80,5 @@ autoUpdate: true rootType: DocumentGallery.File - properties: [ "url", "mimeType" ] + properties: [ "url", "mimeType"] } --- qmlgallery.pro +++ qmlgallery.pro @@ -14,7 +14,10 @@ INSTALLS += desktop RESOURCES += res.qrc -SOURCES += main.cpp + +HEADERS += src/gallery.h +SOURCES += src/main.cpp \ + src/gallery.cpp # do not edit below here TEMPLATE = app @@ -22,6 +25,7 @@ TARGET = $$PROJECT_NAME CONFIG += link_pkgconfig +PKGCONFIG += libresourceqt1 packagesExist(qdeclarative-boostable) { message("Building with qdeclarative-boostable support") --- res.qrc +++ res.qrc @@ -9,5 +9,8 @@ <file>images/DefaultVideoThumbnail.jpg</file> <file>images/GridVideoThumbnail.jpg</file> <file>qml/FileTypeChoiceDialog.qml</file> + <file>qml/SortDialog.qml</file> + <file>images/down_arrow.png</file> + <file>images/up_arrow.png</file> </qresource> </RCC> --- src +++ src +(directory) --- src/gallery.cpp +++ src/gallery.cpp @@ -0,0 +1,125 @@ +/* Copyright (C) 2012 John Brooks <[email protected]> + * + * You may use this file under the terms of the BSD license as follows: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Nemo Mobile nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "gallery.h" +#include <QDeclarativeView> +#include <QDeclarativeEngine> +#include <QDeclarativeContext> +#include <QApplication> +#include <QDir> +#include <QGLWidget> +#include <QDebug> + +Gallery::Gallery(QDeclarativeView *v, QObject *parent) + : QObject(parent), view(v) +{ + bool isFullscreen = false; + bool glwidget = true; + foreach (QString parameter, qApp->arguments()) { + if (parameter == "-fullscreen") { + isFullscreen = true; + } else if (parameter == "-help") { + qDebug() << "Gallery application"; + qDebug() << "-fullscreen - show QML fullscreen"; + qDebug() << "-no-glwidget - Don't use QGLWidget viewport"; + exit(0); + } else if (parameter == "-no-glwidget") + glwidget = false; + } + + // See NEMO#415 for an explanation of why this may be necessary. + if (glwidget) + view->setViewport(new QGLWidget); + else + qDebug() << "Not using QGLWidget viewport"; + + QObject::connect(view->engine(), SIGNAL(quit()), qApp, SLOT(quit())); + view->rootContext()->setContextProperty("gallery", this); + + resources = new ResourcePolicy::ResourceSet("player", this); + resources->setAlwaysReply(); + connect(resources, SIGNAL(resourcesGranted(QList<ResourcePolicy::ResourceType>)), + SLOT(resourcesGranted())); + connect(resources, SIGNAL(resourcesDenied()), SLOT(resourcesDenied())); + connect(resources, SIGNAL(lostResources()), SLOT(lostResources())); + + if (QFile::exists("main.qml")) + view->setSource(QUrl::fromLocalFile("main.qml")); + else + view->setSource(QUrl("qrc:/qml/main.qml")); + + view->setAttribute(Qt::WA_OpaquePaintEvent); + view->setAttribute(Qt::WA_NoSystemBackground); + view->viewport()->setAttribute(Qt::WA_OpaquePaintEvent); + view->viewport()->setAttribute(Qt::WA_NoSystemBackground); + + if (isFullscreen) + view->showFullScreen(); + else + view->show(); +} + +void Gallery::acquireVideoResources() +{ + qDebug() << Q_FUNC_INFO; + + resources->addResource(ResourcePolicy::VideoPlaybackType); + + resources->deleteResource(ResourcePolicy::AudioPlaybackType); + ResourcePolicy::AudioResource *audio = new ResourcePolicy::AudioResource("player"); + audio->setProcessID(QApplication::applicationPid()); + audio->setStreamTag("media.name", "*"); + resources->addResourceObject(audio); + + resources->update(); + resources->acquire(); +} + +void Gallery::releaseVideoResources() +{ + qDebug() << Q_FUNC_INFO; + resources->release(); +} + +void Gallery::resourcesGranted() +{ + qDebug() << Q_FUNC_INFO; +} + +void Gallery::resourcesDenied() +{ + qDebug() << Q_FUNC_INFO; +} + +void Gallery::lostResources() +{ + qDebug() << Q_FUNC_INFO; +} + --- src/gallery.h +++ src/gallery.h @@ -0,0 +1,60 @@ +#ifndef GALLERY_H +#define GALLERY_H + +/* Copyright (C) 2012 John Brooks <[email protected]> + * + * You may use this file under the terms of the BSD license as follows: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Nemo Mobile nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <QObject> +#include <policy/resource-set.h> + +class QDeclarativeView; + +class Gallery : public QObject +{ + Q_OBJECT + +public: + Gallery(QDeclarativeView *view, QObject *parent = 0); + +public slots: + void acquireVideoResources(); + void releaseVideoResources(); + +private slots: + void resourcesGranted(); + void resourcesDenied(); + void lostResources(); + +private: + QDeclarativeView *view; + ResourcePolicy::ResourceSet *resources; +}; + +#endif --- src/main.cpp +++ src/main.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2011 Robin Burchell <[email protected]> + * + * You may use this file under the terms of the BSD license as follows: + * + * "Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Nemo Mobile nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + */ + +#include <QApplication> +#include <QDeclarativeView> +#include "src/gallery.h" +#ifdef HAS_BOOSTER +#include <applauncherd/MDeclarativeCache> +#endif + +#ifdef HAS_BOOSTER +Q_DECL_EXPORT +#endif +int main(int argc, char **argv) +{ + QApplication *application; + QDeclarativeView *view; +#ifdef HAS_BOOSTER + application = MDeclarativeCache::qApplication(argc, argv); + view = MDeclarativeCache::qDeclarativeView(); +#else + qWarning() << Q_FUNC_INFO << "Warning! Running without booster. This may be a bit slower."; + QApplication stackApp(argc, argv); + QDeclarativeView stackView; + application = &stackApp; + view = &stackView; +#endif + + Gallery gallery(view); + + return application->exec(); +} + ++++++ qmlgallery.yaml --- qmlgallery.yaml +++ qmlgallery.yaml @@ -1,6 +1,6 @@ Name: qmlgallery Summary: Photo Gallery for Nemo -Version: 0.0.9 +Version: 0.0.10 Release: 1 Group: Applications/System License: BSD @@ -31,6 +31,7 @@ - QtGui - qdeclarative-boostable - QtOpenGL + - libresourceqt1 Requires: - libdeclarative-gallery - nemo-qml-plugins-thumbnailer
