[QtMoko] Patch to modify default userAgent

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[QtMoko] Patch to modify default userAgent

giacomo 'giotti' mariani
Hello everyone,
      wondering why the mobile visualization was missing in arora I
found informations about the userAgent (thanks Sanvy).
Following some links I arrived at
http://www.ericgiguere.com/tools/http-header-viewer.html which, reached
from qtmoko-arora showed a given string with no "mobile keyword". I
grepped in qtmoko src code and found that the userAgent is probably
defined in
qtmoko/qtopiacore/qt/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp

As Sanvy reported a very well working string is the following one:
Mozilla/5.0 (Linux; U; Android 1.5; en-us; HTC Dream Build/FRG83)
AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

To reach the desired goal, even if in a dirty way, a added two lines to
qwebpage.cpp:
2509      }
2510 +   ua.clear();
2511 +   ua = QLatin1String("Mozilla/5.0 (Linux; U; Android 1.5; en-us;
HTC Dream Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0
Mobile Safari/533.1");
2512      return ua;
2513      }

Now I'm try to compile it, but I'd like to avoid compiling the whole
system... I found the directory
build/qtopiacore/target/src/3rdparty/webkit/WebCore/

which contains a "good" project file, but, when I run make, I get:
[...]
make: arm-linux-g++: Command not found
make: *** [.obj/release-shared-emb-arm/qwebpage.o] Error 127

even if the toolchain is well working under "normal conditions"  (like,
for example: build/src/3rdparty/applications/neocontrol).

Thanks for any hints,
     Giacomo

--
##############################################################
giacomo 'giotti' mariani
gpg --keyserver pool.sks-keyservers.net --recv-key 0x99bfa859
O<  ASCII ribbon campaign: stop HTML mail
www.asciiribbon.org
##############################################################


_______________________________________________
Openmoko community mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/community
ANT
Reply | Threaded
Open this post in threaded view
|

Re: [QtMoko] Patch to modify default userAgent

ANT
Hi,

giacomo 'giotti' mariani wrote:
>...wondering why the mobile visualization was missing in arora...

Actually, Arora already has this feature:
 * menu -> view -> mobile user-agent

Cheers,
Anton
Reply | Threaded
Open this post in threaded view
|

Re: [QtMoko] Patch to modify default userAgent

giacomo 'giotti' mariani
In reply to this post by giacomo 'giotti' mariani
Hello Anton,
> Hi,
>
> giacomo 'giotti' mariani wrote:
>> >...wondering why the mobile visualization was missing in arora...
> Actually, Arora already has this feature:
>   * menu ->  view ->  mobile user-agent
>
> Cheers,
> Anton
Indeed, it works. Thank you very much.

Cheers,
    Giacomo

--
##############################################################
giacomo 'giotti' mariani
gpg --keyserver pool.sks-keyservers.net --recv-key 0x99bfa859
O<  ASCII ribbon campaign: stop HTML mail
www.asciiribbon.org
##############################################################


_______________________________________________
Openmoko community mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/community