Skip to navigation
   
Dave F's Blog

The compiler is more confused than me…

By Dave F in Reader

Posted in QT, Coding, Microsoft on November 12, 2008 at 1:21 pm

Permalink | Author Profile

 Compiler error of the week (from MSVC): 

\source\mainwindow.cpp(201) : error C2664: ‘QWidget::insertAction’ : cannot convert parameter 1 from ‘QAction *’ to ‘QAction *’

Hmmm, convert parameter from ‘QAction *’ to ‘QAction *’ - just how much conversion does that take?

If you’re interested it’s all down to my poor use of template libraries - but if they confuse the compiler that much where’s the shame in them confusing me?

12345
Not yet rated
Loading ... Loading ...

 

Think of an IP number, any number…

By Dave F in Reader

Posted in Funny, QT, the company on October 1, 2008 at 8:24 am

Permalink | Author Profile

QT has been part of Nokia for a while but they seem to have started making their changes. Having been bought out once or twice I can assume most of the changes will be pointless ones that make the parent company feel in control and give waste of space managers something to do (bitter? me?) but their latest mail shows signs of real innovation

  • Modular architecture for feature selection
  • IP communications framework based on Telepathy
  • New Qt UI Test, a tool for automated system tests 
  • New reference design - Video IP Deskphone

Wow, IP telepathy - makes routing tables a thing of the past…

12345
Not yet rated
Loading ... Loading ...

 

Programmers Documentation - the doxygen way

By Dave F in Reader

Posted in Open Source Software, QT, Coding on September 16, 2008 at 11:03 am

Permalink | Author Profile

I have been producing some programmers documentation. The shrieks of horror (or snores of boredom) that normally accompany such a statement have been mercifully short. I have been using doxygen http://www.stack.nl/~dimitri/doxygen/ (more info at http://en.wikipedia.org/wiki/Doxygen). It took a bit of fiddling to get it set up (and it needs a bit more, I seem to have to hard code the directories rather than go relative from the working dir - any help always appreciated!) but seems OK now.
Things I’d recommend are enabling the pre-processor, disabling all output except HTML (until you have a good set up - you may want some other output at the end). If you’re using QT add moc_*.* to the exclusion list. If you’re using SVN excluding the svn dirs is a good idea (I think I did this but I can’t remember how!), don’t hide undocumented classes / methods, add links to the actual code (source browser) and use the built in class diagram generator. Some of this you can do from the wizard. The excludes & the pre-processor I did from expert mode, I also set the “strip from path”, turned on all the extract all / private/ static / local turned off strip code comments, requested an alphabetical index (you can’t have too much info can you?). A nose around the human readable config file is also a good idea just to give you a better idea of what can be done. Whether you choose plain HTML or frames is up to you, frames look better but my ie is set to disable active content so it is not so good to use.
Anyway, there is a certain satisfaction in generating stuff you can click on and see diagrams in without having to type it all in. The whole process is much more like the program / build / test sequence that developers are used to than the boring old type it & proof read it methods of old.
12345
Not yet rated
Loading ... Loading ...

 

How do you test a GUI?

By Dave F in Reader

Posted in QT, Coding on May 9, 2008 at 9:50 am

Permalink | Author Profile

Testing, something I have never been happy about - there are just to many options. Maybe I’m a bit mathematical, a bit completist, alright perfectionist but if I can’t do it properly I don’t like to do it at all. I remember in my university days I was asked to write a “comprehensive” RAM test. Since any RAM cell could theoretically leak to any other I figured the only way was to try every combination by counting from 0 to 2^(8*4K) (it was a 4K 8 bit chip). I got an idea of how long this would take (checking every bit at every increment) when I converted the run time from seconds to years and it didn’t dent the figure much! This still wouldn’t be a complete test as it might take a fixed time for the leak to happen so the test should pause between each increment…

My latest GUI is in QT so I had a look at http://www.ics.com/products/qt/kdexecutor/index.html Which has some ideas on testing. Because of the way QT works it is possible to assume the clicks will work and then just test the event handling of simulated clicks which is a good start. Testing methods that rely on recording mouse positions (click at 300,400) and checking against bitmaps (you should get a screen that looks exactly like this) have got to be limited. Most of the bugs that get reported from customers relate to weird (ie ones I haven’t tried) settings they are using - 640×400 screens, 2000×60000 screens (OK I Lied about that one), default fonts of “Hip Hop Graffiti 3″, Korean locale…

Oh well, back to my usual GUI testing. Aim for pressing everything, in every order at every screen resolution but settle for the old company standard. (I should explain that the “old company” started out in hardware so the official testing of a unit was to power it up and see if it performed its self test successfully - indicated by a single beep. )

The old company QA standard is therefore - if it beeps ship it!

12345
Not yet rated
Loading ... Loading ...

 
Advertisement