[Kde-games-devel] Bomber into kde 4.2?

Albert Astals Cid aacid at kde.org
Sun Oct 5 16:05:30 CEST 2008


A Diumenge 05 Octubre 2008, John-Paul Stanford va escriure:
> Hi,
>
> I think I've now fixed most the issues with bomber that I know about.
>
> On Sunday 14 September 2008 5:24:16 pm Albert Astals Cid wrote:
> > A Diumenge 14 Setembre 2008, John-Paul Stanford va escriure:
>
> <snip>
>
> > Can you try to fix all krazy issues
> > http://www.englishbreakfastnetwork.org/krazy/reports/playground/games/bom
> >be r/index.html Shout if you need help solving any issue
>
> These should all be fixed now. They were last time I checked.

Some of my particular krazy harvest at the end of the mail

>
> > I get lots of QPainter warnings on startup
> > 	QPainter::restore: Unbalanced save/restore
> > is particullary ugly
>
> These are hopefully all fixed now. This was caused by trying to load the
> theme and paint things before the main window was visible.
>
> > There's no icon?
>
> I've added a icon, however it would be really good a kde artist could look
> over this. I suspect my attempt is not very good :-)
>
> > "A KDE4 Application" sucks a bit as description :D
>
> Ah yes , changed this also.

No, you've not, it's still on main.cpp:26

>
> > I'd convert
> >   i18n("Level: %1", QString::fromLatin1("XX")
> > and his friends to
> > i18nc(explanation this is the default shown at start, "Level: XX");
>
> Yup, I've done as you suggested.
>
> > Bomber::gameOverNow seems never to be called
>
> I've removed this as it's not needed.
>
> > Bomber::gameStateChanged seems to be called but statusBar()->showMessage
> > did not seem to work on game end.
>
> I've looked into this more and posted some mails about it on the kde-core-
> devel list. Seems their is a bug in the kstatusbar class. I think that's
> because it's a work around for a QT problem. So this will be fixed when
> that problem is resolved. As far as I can see, this effects every app using
> the temp messages on the status bar.

Yeah, waiting for someone, probably me to fix it, if you could try to help 
that would be very welcome, but maybe working on kdelibs is a bit "scary".

>
> > i18n("Game over. Press <Space> for a new game") is wrong, the user can
> > configure shortcuts so you should really use the action funciton to get
> > the shortcut rather than hardcoding it here
>
> I've done as you suggested here also. Now I'm reading the configured
> shortcut.

Almost correct ;-) You need to use QKeySequence::NativeText in toString to get 
the translated version of the key.

>
>
> Would be great too see bomber in KDE 4.2, so was wondering what I need todo
> next. Do people want to check it over a bit more? Or should I move it to
> kdereview?
>

Well, there's the issue of it we want a game that "encourages" dropping bombs 
over buildings inside kdegames.

Albert


13. Check validity of i18n calls...  OOPS! 1 issue found!
        ./src/bomber.cpp: single adjective as message, probably ambiguous; use 
context call to explain what it refers to line#195
        Make the translators' job easier and detect problems in the usage
        of the i18n() calls. When the fix is not clear, check the Techbase
        article at
        <http://techbase.kde.org/Development/Tutorials/Localization/i18n_Kr
        azy> for more information.


15. Check for proper include directives...  OOPS! 7 issues found!
        ./src/building.h: using leading or trailing underscores on include 
guard in header
        ./src/plane.h: using leading or trailing underscores on include guard 
in header
        ./src/renderer.h: using leading or trailing underscores on include 
guard in header
        ./src/buildingtile.h: using leading or trailing underscores on include 
guard in header
        ./src/bomb.h: using leading or trailing underscores on include guard 
in header
        ./src/explodable.h: using leading or trailing underscores on include 
guard in header
        ./src/board.h: using leading or trailing underscores on include guard 
in header
        Use <..> to include installed headers; <QtModule/QClass> to include
        Qt headers from installed headers; cpp file should include their
        own headers first; other rules apply, see
        <http://techbase.kde.org/Policies/Library_Code_Policy#Getting_.23in
        cludes_right>. Use include guards in headers with appropriatedly
        encoded macro names.

21. Check for postfix usage of ++ and --...  OOPS! 4 issues found!
        ./src/board.cpp: line#137 (1)
        ./src/building.cpp: line#58,75,132 (3)
        You should use ++ and -- as prefix whenever possible as these are
        more efficient than postfix operators. Prefix increments first and
        then uses the variable, postfix uses the actual; the variable is
        incremented as well. Because of this, the prefix operators are
        inherently more efficient. *WARNING* Make sure that you don't
        introduce off-by-one errors when changing i++ to ++i.





> Cheers,
> JP.
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel




More information about the kde-games-devel mailing list