Writings Photos Code Contact Resume
Work

You are here

QTestLib tip

Submitted by msameer on Fri, 20/08/2010 - 1:52pm

If you are doing a data driven test using QTestLib, make sure the column names you define in the data function matches the variable name you pass to QFETCH()

void Test::foo_data() {
  QTest::addColumn<QString>("foo");
}
void Test::foo() {
  QFETCH(QString, foo);
}

I previously thought the order is enough but I lately spent a day and a half trying to understand why QTestLib refuses to fetch my variables.


Corporates are evil.

Submitted by msameer on Sat, 29/08/2009 - 9:33am

After the N900 has been announced. I was saying this to a friend of mine:

[Me] so
[Me] remember our discussion about a Linux powered phone ? ;)
[Me] sorry I convinced you that Linux on phones is a no while I knew we were doing it :)


Booked my tickets (Summer 2009) :-)

Submitted by msameer on Sat, 16/05/2009 - 7:04pm

To Cairo and beyond (-:

Too bad I'll transit for one hour in Charles De Gaulle again. I'd rather be prepared to lose my bags :-)

And did I say from 10.07.09 to 09.08.09 ?


Booked my flight to Cairo...

Submitted by msameer on Tue, 01/07/2008 - 9:01pm

03.10.08:
Helsinki (08:00) to Vienna (09:40)
Vienna (10:35) to Cairo (14:10)

02.11.08:
Cairo (10:50) to Vienna (13:40)
Vienna (19:40) to Helsinki (23:20)

Yes, 6 hours of transit...

And blame Ezabi for convincing me to fly EgyptAir from Cairo to Vienna!



Dear Hebrew maemo users...

Submitted by msameer on Mon, 28/01/2008 - 2:45pm

I'm getting a lot of questions on how to enable Hebrew under maemo. I know that the fonts have been packaged already and I guess there's also an input method. It's as easy as writing an XML file for my not so broken Hildon Arabic input method.

I just don't understand why can't they be made available publicly or made known ?

I can neither host nor support them, nothing personal. It's just that I don't know Hebrew and I can't support a language I don't know!

Please, oh pretty please with sugar on top, can someone give me a URL or at least share the information so I can at least copy and paste it as a reply to the emails I'm getting ?

P.S this link is not what I mean.


hildon input method and new languages...

Submitted by msameer on Fri, 14/12/2007 - 5:25pm

I noticed this because of my work on him-arabic.

If your plugin provides a language other than the 16 "known" languages, It will be displayed as " ()".

Ideally, The fix should be somewhere else but not all of the components are open so even if I can fix it, I won't be able to publish patches or packages.

It seems that the source provided with the SDK is a bit outdated so I had to grab the latest trunk: https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-input-method/

And here's a patch. It'll return the language code if it fails to get the language description. (I know it's a bit hackish :|):

diff -Naur him.orig/src/hildon-im-languages.c him/src/hildon-im-languages.c
--- him.orig/src/hildon-im-languages.c  2007-12-14 19:09:29.000000000 +0200
+++ him/src/hildon-im-languages.c       2007-12-14 19:12:31.000000000 +0200
@@ -82,7 +82,18 @@
   }
   if (translate_function)
   {
-    return (*translate_function) (lang);
+    gchar *res = (*translate_function) (lang);
+    if (!res) {
+      return res;
+    }
+    else if (!strcmp(res, " ()")) {
+      g_free(res);
+      res = g_strdup(lang);
+      return res;
+    }
+    else {
+      return res;
+    }
   } else
   {
     gchar path [sizeof(GCONF_TRANSLATION_STATIC_PATH) + MAX_LANG_LENGTH];

Apply, build the packages and install hildon-input-method_1.99.33-2_armel.deb and libhildon-im-ui3_1.99.33-2_armel.deb

I hope it will be fixed otherwise I'll be providing packages soon. I know I promised to provide a lot of things (-:

Have a nice weekend.


Waiting for the tickets...

Submitted by msameer on Tue, 17/07/2007 - 1:36pm

Helsinki: 24.08.2007 17:40
Cairo: 25.08.2007 02:00

Cairo: 09.09.2007 06.35
Helsinki: 09.09.2007 16.15

I hate CDG Airport...


So yesterday.

Submitted by msameer on Wed, 14/03/2007 - 12:00am

* A month since I've been here in Finland and started working for Nokia
* I've got my creditcard PIN code in the morning (From the nordea bank suckers). At last they accepted my application but they decided to send the card to the wrong branch. 7 minutes on the phone to convince them to send it to another branch. It takes them also 2-3 days to send it to another branch!
* My debian.org account has been created and NOW I'm at last an official Debian Developer (Technically, this happened on the 14th. An hour ago ;-))


Of ethernet and docking stations...

Submitted by msameer on Fri, 23/02/2007 - 7:34pm

When you dock the laptop into its docking station, make sure to plug the ethernet cable into the docking station rj output. NOT into the laptop. It could've saved me a lot of time today.