From 914336af491498d508149e55345e604644618db9 Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Sun, 29 May 2011 19:10:04 +0200 Subject: [PATCH] New version 0.1.0 Version number is taken from the application.pro file --- application/app.cpp | 13 +++++++++++-- application/app.h | 2 ++ application/application.pro | 12 +++++++++++- application/debian/changelog | 9 +++------ application/main.cpp | 8 ++++++-- application/stationview.cpp | 12 ------------ quandoparte.pro | 3 +-- 7 files changed, 34 insertions(+), 25 deletions(-) diff --git a/application/app.cpp b/application/app.cpp index 5245591..e5d6f3e 100644 --- a/application/app.cpp +++ b/application/app.cpp @@ -41,7 +41,7 @@ App::App(QObject *parent) : stationListModel(new StationListModel(this)), stationListView(new StationListView(stationListModel, stationView)) { - stationListModel->load("/opt/usr/share/apps/quandoparte/stations/stations.qpl"); + stationListModel->load(dataDir() + "stations/stations.qpl"); connect(stationListView, SIGNAL(stationSelected(const QString &)), SLOT(queryStation(const QString &))); @@ -116,7 +116,7 @@ void App::showAboutDialog() QString version = QApplication::instance()->applicationVersion(); QString aboutText = QString( tr("

%1 version %2

" - "

Copyright (c) 2010

" + "

Copyright (c) 2010, 2011

" "

Luciano Montanaro (mikelima@cirulla.net)

" "

Licensed under the GNU Public License v2 or above

")).arg(name).arg(version); QMessageBox::about(stationView, name, aboutText); @@ -152,3 +152,12 @@ void App::setShowingArrivals(bool showArrivals) { showingArrivals = showArrivals; } + +QString App::dataDir(void) +{ +#ifdef Q_WS_MAEMO_5 + return QString("/opt/usr/share/apps/quandoparte/"); +#else + return QString("/usr/share/apps/quandoparte/"); +#endif +} diff --git a/application/app.h b/application/app.h index 66383dc..666eaa3 100644 --- a/application/app.h +++ b/application/app.h @@ -38,6 +38,8 @@ public: explicit App(QObject *parent = 0); ~App(); + static QString dataDir(void); + signals: public slots: diff --git a/application/application.pro b/application/application.pro index bb05bcf..7d846d2 100644 --- a/application/application.pro +++ b/application/application.pro @@ -4,10 +4,14 @@ # #------------------------------------------------- -QT += webkit network xml maemo5 +QT += webkit network maemo5 TARGET = quandoparte TEMPLATE = app +VERSION = 0.1.0 + +VERSION_STRING = '\\"$${VERSION}\\"' +DEFINES += QP_VERSION=\"$${VERSION_STRING}\" TRANSLATIONS = resources/i18n/quandoparte_it.ts @@ -100,3 +104,9 @@ unix:!symbian { INSTALLS += i18n INSTALLS += stations } + +maemo5 { + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications/hildon + INSTALLS += desktopfile +} diff --git a/application/debian/changelog b/application/debian/changelog index 68abd23..b087619 100644 --- a/application/debian/changelog +++ b/application/debian/changelog @@ -1,10 +1,7 @@ -quandoparte (0.0.2) unstable; urgency=low +quandoparte (0.1.0) unstable; urgency=low + * Updated for new package version 2011-05-29 15:42:00 +0200 - * Autohiding for Station List filter 2011-05-20 00:53:00 +0200 - * Implemented Station List filtering 2011-05-19 01:49:13 +0200 - * Added localization 2011-05-17 01:13:35 +0200 - * Added download throbber to station list view 2011-05-16 22:55:37 +0200 - * Implemented Arrival/Departures selection 2011-05-14 18:46:01 +0200 +quandoparte (0.0.2) unstable; urgency=low * Initial version 2011-05-08 23:04:26 +0200. -- Luciano Montanaro Sat, 20 Nov 2010 18:46:46 +0100 diff --git a/application/main.cpp b/application/main.cpp index 751ba5f..a80b695 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -26,17 +26,21 @@ Boston, MA 02110-1301, USA. #include #include +#ifndef QP_VERSION +#define QP_VERSION "0.0.2" +#endif + int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setApplicationName("QuandoParte"); a.setOrganizationDomain("cirulla.net"); - a.setApplicationVersion("0.0.2"); + a.setApplicationVersion(QP_VERSION); QString locale = QLocale::system().name(); QTranslator translator; if (translator.load(QString("quandoparte_") + locale, - "/opt/usr/share/apps/quandoparte/i18n")) { + App::dataDir() + "i18n")) { qDebug() << "Translation for locale" << locale << "loaded"; a.installTranslator(&translator); } else { diff --git a/application/stationview.cpp b/application/stationview.cpp index d085512..2f098a5 100644 --- a/application/stationview.cpp +++ b/application/stationview.cpp @@ -140,18 +140,6 @@ void StationView::viewSelectionGroupTriggered(QAction *action) void StationView::updateCss(void) { - QByteArray styleSheet("data:text/css;charset=utf-8,base64,"); - QByteArray styleSheetText = QByteArray( - "body {\n" - "-webkit-user-select: none ! important;\n" - "background-color: black ! important;\n" - "color: white ! important;}\n" - ".testata_red {visibility: hidden ! important;}\n" - "#footer {\n" - "visibility: hidden ! important;}\n"); - styleSheet += styleSheetText.toBase64(); - qDebug() << styleSheet; - //QUrl cssUrl = QUrl::fromEncoded(styleSheet); QUrl cssUrl; // XXX Maemo5 specific diff --git a/quandoparte.pro b/quandoparte.pro index 80c03bc..3402df3 100644 --- a/quandoparte.pro +++ b/quandoparte.pro @@ -1,4 +1,3 @@ TEMPLATE = subdirs -SUBDIRS = application \ - test +SUBDIRS = application -- 1.7.9.5