I have made the following changes intended for : CE:Apps / qmlfilemuncher
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/6593 Thank You, John Brooks [This message was auto-generated] --- Request # 6593: Messages from BOSS: State: review at 2012-09-03T09:10:01 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 / qmlfilemuncher -> CE:Apps / qmlfilemuncher changes files: -------------- --- qmlfilemuncher.changes +++ qmlfilemuncher.changes @@ -0,0 +1,4 @@ +* Mon Sep 03 2012 John Brooks <[email protected]> - 0.0.9 +- Fixes NEMO#364: Only one filemanager instance should be started at the same time +- Added qdeclarative-boostable support + old: ---- 0001-forgot-to-add-qmldir.patch qmlfilemuncher-0.0.8.tar.bz2 new: ---- qmlfilemuncher-0.0.9.tar.bz2 spec files: ----------- --- qmlfilemuncher.spec +++ qmlfilemuncher.spec @@ -1,6 +1,6 @@ # # Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.24.1 +# Generated by: spectacle version 0.25 # Name: qmlfilemuncher @@ -9,20 +9,20 @@ # << macros Summary: File Manager for Nemo -Version: 0.0.8 +Version: 0.0.9 Release: 1 Group: Applications/System License: BSD URL: https://github.com/nemomobile/qmlfilemuncher Source0: %{name}-%{version}.tar.bz2 Source100: qmlfilemuncher.yaml -Patch0: 0001-forgot-to-add-qmldir.patch Requires: qt-components Requires: nemo-qml-plugins-thumbnailer Requires: nemo-qml-plugins-folderlistmodel BuildRequires: pkgconfig(QtCore) >= 4.7.0 BuildRequires: pkgconfig(QtDeclarative) BuildRequires: pkgconfig(QtGui) +BuildRequires: pkgconfig(qdeclarative-boostable) BuildRequires: desktop-file-utils %description @@ -32,8 +32,6 @@ %prep %setup -q -n %{name} -# 0001-forgot-to-add-qmldir.patch -%patch0 -p1 # >> setup # << setup other changes: -------------- ++++++ qmlfilemuncher-0.0.8.tar.bz2 -> qmlfilemuncher-0.0.9.tar.bz2 --- src/main.cpp +++ src/main.cpp @@ -31,7 +31,7 @@ #include <QApplication> #include <QDeclarativeView> -#include <QtDeclarative> // XXX: where the fuck does qmlRegisterType live? +#include <QtDeclarative> #include <QThread> #include <QObject> @@ -39,34 +39,50 @@ #include <QDebug> #include <QThread> #include <QMetaType> +#ifdef HAS_BOOSTER +#include <applauncherd/MDeclarativeCache> +#endif #include "utils.h" +#ifdef HAS_BOOSTER +Q_DECL_EXPORT +#endif int main(int argc, char **argv) { - QApplication a(argc, 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 + + view->setAttribute(Qt::WA_OpaquePaintEvent); + view->setAttribute(Qt::WA_NoSystemBackground); + view->viewport()->setAttribute(Qt::WA_OpaquePaintEvent); + view->viewport()->setAttribute(Qt::WA_NoSystemBackground); - QDeclarativeView v; - - v.setAttribute(Qt::WA_OpaquePaintEvent); - v.setAttribute(Qt::WA_NoSystemBackground); - v.viewport()->setAttribute(Qt::WA_OpaquePaintEvent); v.viewport()->setAttribute(Qt::WA_NoSystemBackground); - - QDeclarativeContext *c = v.rootContext(); + QDeclarativeContext *c = view->rootContext(); c->setContextProperty("fileBrowserUtils", new Utils); if (QFile::exists("main.qml")) - v.setSource(QUrl::fromLocalFile("main.qml")); + view->setSource(QUrl::fromLocalFile("main.qml")); else - v.setSource(QUrl("qrc:/qml/main.qml")); + view->setSource(QUrl("qrc:/qml/main.qml")); if (QCoreApplication::arguments().contains("-fullscreen")) { qDebug() << Q_FUNC_INFO << "Starting in fullscreen mode"; - v.showFullScreen(); + view->showFullScreen(); } else { qDebug() << Q_FUNC_INFO << "Starting in windowed mode"; - v.show(); + view->show(); } - return a.exec(); + return application->exec(); } --- src/qml/api/qmldir +++ src/qml/api/qmldir @@ -0,0 +1 @@ +FileListDelegate 1.0 FileListDelegate.qml --- src/qmlfilemuncher.desktop +++ src/qmlfilemuncher.desktop @@ -2,5 +2,5 @@ Type=Application Name=File Muncher Icon=icons-Applications-filemanager -Exec=/usr/bin/qmlfilemuncher -fullscreen +Exec=invoker -s --type=d /usr/bin/qmlfilemuncher -fullscreen Comment=Nemo File Manager --- src/src.pro +++ src/src.pro @@ -41,3 +41,11 @@ HEADERS += \ utils.h +CONFIG += link_pkgconfig +packagesExist(qdeclarative-boostable) { + message("Building with qdeclarative-boostable support") + DEFINES += HAS_BOOSTER + PKGCONFIG += qdeclarative-boostable +} else { + warning("qdeclarative-boostable not available; startup times will be slower") +} ++++++ qmlfilemuncher.yaml --- qmlfilemuncher.yaml +++ qmlfilemuncher.yaml @@ -1,14 +1,12 @@ Name: qmlfilemuncher Summary: File Manager for Nemo -Version: 0.0.8 +Version: 0.0.9 Release: 1 Group: Applications/System License: BSD URL: https://github.com/nemomobile/qmlfilemuncher Sources: - "%{name}-%{version}.tar.bz2" -Patches: - - 0001-forgot-to-add-qmldir.patch Description: File Manager using Qt Quick Components for Nemo Mobile. Configure: none Builder: qmake @@ -22,6 +20,7 @@ - QtCore >= 4.7.0 - QtDeclarative - QtGui + - qdeclarative-boostable Files: - "%{_bindir}/qmlfilemuncher" ++++++ deleted files: --- 0001-forgot-to-add-qmldir.patch
