Editing QtComponents/Butaca

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 29: Line 29:
-    QApplication *app = MDeclarativeCache::qApplication(argc, argv);
-    QApplication *app = MDeclarativeCache::qApplication(argc, argv);
-    QDeclarativeView *view = MDeclarativeCache::qDeclarativeView();
-    QDeclarativeView *view = MDeclarativeCache::qDeclarativeView();
-
+    QApplication app(argc, argv);
+
+    QApplication app = QApplication(argc, argv);
-
+    QDeclarativeView view;
+
+    QDeclarativeView view = QDeclarativeView();
   
   
-    QDeclarativeContext *context = view->rootContext();
-    QDeclarativeContext *context = view->rootContext();
Line 41: Line 41:
+    view.showFullScreen();
+    view.showFullScreen();
   
   
-
-    int result = app->exec();
+
    int result = app->exec();
-
+    int result = app.exec();
+
   
   
     delete controller;
     delete controller;
Line 226: Line 225:
<syntaxhighlight lang="diff">
<syntaxhighlight lang="diff">
-
diff --git a/src/main.cpp b/src/main.cpp
 
-
index 8f1c989..2fef2c3 100644
 
-
--- a/src/main.cpp
 
-
+++ b/src/main.cpp
 
-
@@ -32,6 +32,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
 
-
    ButacaController *controller = new ButacaController(context);
 
-
 
-
    view.setSource(QUrl("qrc:/qml/main.qml"));
 
-
+    QObject::connect((QObject*)view.engine(), SIGNAL(quit()), &app, SLOT(quit()));
 
-
    view.showFullScreen();
 
-
 
-
    int result = app->exec();
 
</syntaxhighlight>
</syntaxhighlight>
Line 245: Line 232:
Some changes on how '''Butaca''' is deployed are needed to match Fremantle requirements.
Some changes on how '''Butaca''' is deployed are needed to match Fremantle requirements.
-
=== Deployment ===
+
=== Optify code ===
-
Add minimal changes to fit fremantle
+
-
==== Optify ====
+
=== Update Desktop file ===
-
Point binary to /opt and adapt paths to Fremantle
+
And finally, update desktop file. There's no applauncerd on fremantle, so remove invoker from Exec. With this action we loose splash-screen.
-
 
+
-
<syntaxhighlight lang="diff">
+
-
diff --git a/butaca.desktop b/butaca.desktop
+
-
index d0af6f4..6b552de 100644
+
-
--- a/butaca.desktop
+
-
+++ b/butaca.desktop
+
-
@@ -3,6 +3,6 @@ Encoding=UTF-8
+
-
Version=1.0
+
-
Type=Application
+
-
Name=Butaca
+
-
-Exec=/usr/bin/butaca
+
-
-Icon=/usr/share/icons/hicolor/64x64/apps/butaca.png
+
-
+Exec=/opt/bin/butaca
+
-
+Icon=butaca
+
-
Categories=Network;
+
-
diff --git a/butaca.pro b/butaca.pro
+
-
index 268b85a..a7b1fa8 100644
+
-
--- a/butaca.pro
+
-
+++ b/butaca.pro
+
-
@@ -61,15 +61,15 @@ CONFIG += shareuiinterface-maemo-meegotouch \
+
-
}
+
-
+
-
butacascript.files = butaca
+
-
-butacascript.path = /usr/bin/
+
-
+butacascript.path = /opt/bin/
+
-
+
-
desktop.files = butaca.desktop
+
-
-desktop.path = /usr/share/applications/
+
-
+desktop.path = /usr/share/applications/hildon/
+
-
+
-
icon.files = butaca.png
+
-
icon.path  = /usr/share/icons/hicolor/64x64/apps/
+
-
+
-
splash.files = butaca-splash.jpg
+
-
-splash.path = /usr/share/butaca/
+
-
+splash.path = /opt/share/butaca/
+
-
+
-
INSTALLS += butacascript desktop icon splash
+
-
</syntaxhighlight>
+
commit
commit
Line 297: Line 244:
and copy generated files into debian/patches directory.
and copy generated files into debian/patches directory.
-
Finally, modify rules file at debian directory to merge patches. At cdbs rules definition add:
+
Finally, modify rules file at debian directory to merge patches. At '''config-stamp''' rule add:
-
<syntaxhighlight lang="make">include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
<syntaxhighlight lang="make">for p in debian/patches/*; do patch -p1 < $$p; done
-
</syntaxhighlight>
+
-
 
+
-
==== Adapt Packing files ====
+
-
Set debhelper from 7 to 5 and remove unused deps
+
-
 
+
-
<syntaxhighlight lang="diff">
+
-
diff --git a/debian/compat b/debian/compat
+
-
index 7f8f011..7ed6ff8 100644
+
-
--- a/debian/compat
+
-
+++ b/debian/compat
+
-
@@ -1 +1 @@
+
-
-7
+
-
+5
+
-
diff --git a/debian/control b/debian/control
+
-
index 374197b..d1711dd 100644
+
-
--- a/debian/control
+
-
+++ b/debian/control
+
-
@@ -2,9 +2,8 @@ Source: butaca
+
-
Section: user/network
+
-
Priority: extra
+
-
Maintainer: Simon Pena <spena@igalia.com>
+
-
-Build-Depends: debhelper (>= 7), applauncherd-dev, cdbs,
+
-
- libqt4-dev, maemo-meegotouch-interfaces-dev, libmdatauri-dev,
+
-
- libqtwebkit-dev
+
-
+Build-Depends: debhelper (>= 5), cdbs,
+
-
+ libqt4-dev, libqt4-webkit-dev, quilt
+
-
Standards-Version: 3.8.4
+
-
XB-Maemo-Flags: visible
+
-
XB-Homepage: https://projects.developer.nokia.com/butaca/
+
</syntaxhighlight>
</syntaxhighlight>
And thats all. You have '''Butaca''' working on Maemo5
And thats all. You have '''Butaca''' working on Maemo5

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)