Radek Polak <[email protected]> writes:
> It seems that it's again QFileInfo problem. They have refactored it during
> 4.7->4.8 cycle and that broke our resource system. It's clearly a regression
> in their public API, but all my bugs (even with patch) are ignored in Qt bug
> tracker.
>
> I tried simple fix for QFileInfo::suffix() which works for resources, but
> does
> not work for regular files now.
>
> Attached is attempt to make it working for both cases, but it's untested. I
> guess i will have to go through qfileinfo.cpp commits and check if this fix
> is
> really correct.
Thanks. I'm rebuilding with this now, and will report.
I'm hoping that it might also fix my email - which I think broke at the
same time as I moved my codebase to Qt 4.8. My log has "the server
certificate is untrusted" errors, and I guess that might be to do with
incorrectly handling file names in /etc/ssl/certs.
If you're thinking of a release soon, I have a couple of safe (I
believe) things that you might want to include in that. First, the
support for Arora to provide the "WebAccess" service, which makes it
work to click on URLs in emails and other places - this is a patch for
the Arora submodule. Second, a tweak to the Mokofaen theme so that it
has room for displaying >=10 satellites in the title bar. I've attached
those below.
Regards,
Neil
>From a3784d5e4107cbc460139bc3ded8fe0cde76b9ec Mon Sep 17 00:00:00 2001
From: Neil Jerram <[email protected]>
Date: Sun, 16 Sep 2012 23:42:19 +0100
Subject: [PATCH] arora - Provide the Qtopia "WebAccess" service
This makes clicking on links in email work - both when Arora is
already running, and when there isn't already any web browser
running (in which case Arora is started automatically).
---
.gitignore | 2 +-
src/browserapplication.cpp | 29 +++++++++++++++++++++++++++++
src/qbuild.pro | 6 ++++++
src/services/WebAccess/arora | 2 ++
src/webservice.h | 37 +++++++++++++++++++++++++++++++++++++
5 files changed, 75 insertions(+), 1 deletion(-)
create mode 100644 src/services/WebAccess/arora
create mode 100644 src/webservice.h
diff --git a/.gitignore b/.gitignore
index b101154..a8bea3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-arora
+/arora
Arora.app
Makefile
.DS_Store
diff --git a/src/browserapplication.cpp b/src/browserapplication.cpp
index cc8bd1f..5585971 100644
--- a/src/browserapplication.cpp
+++ b/src/browserapplication.cpp
@@ -83,9 +83,23 @@
#include <qwebsettings.h>
#include <QtopiaApplication>
+#include <QtopiaAbstractService>
#include <qdebug.h>
+#include "webservice.h"
+
+void WebAccessService::openURL(QString url)
+{
+ emit openUrl(url);
+}
+
+void WebAccessService::openSecureURL(QString url)
+{
+ // XXX make sure this is a secure url
+ emit openUrl(url);
+}
+
DownloadManager *BrowserApplication::s_downloadManager = 0;
HistoryManager *BrowserApplication::s_historyManager = 0;
NetworkAccessManager *BrowserApplication::s_networkAccessManager = 0;
@@ -152,6 +166,10 @@ BrowserApplication::BrowserApplication(int &argc, char **argv)
this, SLOT(lastWindowClosed()));
#endif
+ QObject *service = new WebAccessService(this);
+ connect(service, SIGNAL(openUrl(const QString &)),
+ this, SLOT(messageRecieved(const QString &)));
+
#ifndef AUTOTESTS
QTimer::singleShot(0, this, SLOT(postLaunch()));
#endif
@@ -455,6 +473,17 @@ BrowserMainWindow *BrowserApplication::newMainWindow()
m_mainWindows.prepend(browser);
setMainWidget(browser); //
showMainWidget();
+
+ // Calling showMainWidget() a second time is the magic sauce that
+ // is needed for Qtopia not to kill Arora after it has processed a
+ // request for the WebAccess service. When servicing a
+ // QtopiaServiceRequest requires _launching_ a new application -
+ // i.e. because a suitable application isn't already running -
+ // Qtopia's default behaviour is to close the launched application
+ // again as soon as it appears to have processed that request.
+ // For a web browser, we clearly don't want that.
+ showMainWidget();
+
// browser->show();
return browser;
}
diff --git a/src/qbuild.pro b/src/qbuild.pro
index 4db82b6..7e39289 100644
--- a/src/qbuild.pro
+++ b/src/qbuild.pro
@@ -93,6 +93,7 @@ HEADERS += \
tabwidget.h \
toolbarsearch.h \
webactionmapper.h \
+ webservice.h \
webview.h \
webviewsearch.h \
xbel.h
@@ -151,3 +152,8 @@ SOURCES += \
utils/rotate.cpp
#-----------------------------------------------
+
+# Install service registration
+service.files=services/WebAccess/arora
+service.path=/services/WebAccess
+INSTALLS+=service
diff --git a/src/services/WebAccess/arora b/src/services/WebAccess/arora
new file mode 100644
index 0000000..f99c0fd
--- /dev/null
+++ b/src/services/WebAccess/arora
@@ -0,0 +1,2 @@
+[Standard]
+Version=100
diff --git a/src/webservice.h b/src/webservice.h
new file mode 100644
index 0000000..d164a68
--- /dev/null
+++ b/src/webservice.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** This file was largely copied from examples/webviewer/webviewer.cpp
+** in the QtMoko distribution. But given that it has so few lines of
+** code, and that that code simply implements what standard Qtopia
+** documentation says for a Qtopia service, I don't think it has to
+** inherit that file's copyright and license. For the same reasons,
+** we don't declare any specific copyright and license for this file.
+**
+****************************************************************************/
+
+#ifndef WEBSERVICE_H
+#define WEBSERVICE_H
+
+#include <qobject.h>
+#include <qtopiaabstractservice.h>
+#include <qstring.h>
+
+class WebAccessService : public QtopiaAbstractService
+{
+ Q_OBJECT
+
+public:
+ WebAccessService(QObject* parent) : QtopiaAbstractService("WebAccess",parent)
+ {
+ publishAll();
+ }
+
+signals:
+ void openUrl(const QString &);
+
+public slots:
+ void openURL(QString);
+ void openSecureURL(QString);
+};
+
+#endif
--
1.7.10.4
>From 97d1404cc89075eac590e8d6636302c9bf8720ca Mon Sep 17 00:00:00 2001
From: Neil Jerram <[email protected]>
Date: Sun, 23 Sep 2012 17:40:57 +0100
Subject: [PATCH] mokofaen: allow space for indicating 10 or more satellites
---
etc/themes/mokofaen/title.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/themes/mokofaen/title.xml b/etc/themes/mokofaen/title.xml
index 1ff37ad..2c5e4cc 100755
--- a/etc/themes/mokofaen/title.xml
+++ b/etc/themes/mokofaen/title.xml
@@ -30,7 +30,7 @@ expr:@/UI/DisplayTime/Time
<status name="gps" imageon="gps-fix.svg" on="expr:@/Gps/State == 3" active="expr:@/Gps/State == 3"/>
</exclusive>
- <exclusive rect="-256,5,15x30">
+ <exclusive rect="-271,5,30x30">
<text outline="#000000" color="#FFFFFF" bold="yes" align="right,vcenter" size="6" >expr:@/Gps/NumSatellites</text>
</exclusive>
--
1.7.10.4
_______________________________________________
Openmoko community mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/community