Review Request 130098: [Ksirk frameworks] Logging port from kDebug to qCDebug

Luigi Toscano luigi.toscano at tiscali.it
Sat Apr 22 15:31:53 UTC 2017



> On Apr. 22, 2017, 2:42 p.m., Luigi Toscano wrote:
> > I forgot that there was also another script, convert-kdebug-with-argument.sh, which uses the more modern ecm_qt_declare_logging_category macro. Could you please try to use that macro, which basically creates the ksirkdebug.* files for you?
> 
> Nemanja Hirsl wrote:
>     Tried with this one, the outcome is the same.
> 
> Luigi Toscano wrote:
>     I'm pretty sure that it's not the same: it should not generate the ksirkdebug.* files, and it should tell you to add the call toecm_qt_declare_logging_category. Please recheck.
> 
> Nemanja Hirsl wrote:
>     This is console outoput:
>     ./convert-kdebug-with-argument.sh KSIRK_LOG org.kde.ksirk KSIRK_LOG ksirkdebug
>     1) Add ksirkdebug.cpp to CMakeLists.txt
>     2) Add #include <QDebug> + #include "ksirkdebug.h" to each file which was changed
>     3) Verify that it compiles :)
>     4) If you find bugs fix them please
> 
> Luigi Toscano wrote:
>     Update your git checkout of kde-dev-scripts (which is something to do every time you use it). The script was changed 3 weeks ago.
> 
> Nemanja Hirsl wrote:
>     Yap, just did that, but still, it doesn't convert anything :(
>     There are just few files where includes are changed, however none of the kDebug() are converted.
> 
> Luigi Toscano wrote:
>     Just tried it.
>     It converts every kDebug() calls with the exception of the files inside ksirk/Jabber/, which already have a category. This is fine.
>     So please recheck it (on a clean snapshot).
> 
> Nemanja Hirsl wrote:
>     Unfortunately, I can't make it work.
>     
>     nhirsl_suse at euclid:~/Dev/KDE/src/kdegames/ksirk> git log
>     
>     commit 4c372d89bf54dba338315b70af51c476c5906129
>     Merge: 1940f0a b0c07d5
>     Author: Luigi Toscano <luigi.toscano at tiscali.it>
>     Date:   Sat Apr 15 20:22:27 2017 +0200
>     
>         Merge remote-tracking branch 'origin/master' into frameworks
>         
>         Use the variable provided by ECM for the appdata directory.
>     
>     commit b0c07d53396c09ba698969e7da58e29ab72254e2
>     Author: Burkhard Lück <lueck at hube-lueck.de>
>     Date:   Sat Apr 15 20:19:54 2017 +0200
>     
>         Add appdata file for KSirk in master branch + use reverse dns naming scheme for both deskop files
>         
>         Differential Revision: https://phabricator.kde.org/D5387
>     
>     
>     nhirsl_suse at euclid:~/Dev/KDE/src/kdegames/ksirk> git status
>     On branch newLogs
>     Untracked files:
>       (use "git add <file>..." to include in what will be committed)
>     
>     nothing added to commit but untracked files present (use "git add" to track)
>     nhirsl_suse at euclid:~/Dev/KDE/src/kdegames/ksirk> ./convert-kdebug-with-argument.sh KSIRK_LOG org.kde.ksirk KSIRK_LOG ksirkdebug
>     1) add ecm_qt_declare_logging_category(<file>_SRCS HEADER ksirkdebug.h IDENTIFIER KSIRK_LOG CATEGORY_NAME org.kde.ksirk) to CMakeLists.txt
>     2) #include "ksirkdebug.h" to each file which was changed and where it is missing
>     3) Verify that it compiles :)
>     4) If you find bugs fix them please
>     nhirsl_suse at euclid:~/Dev/KDE/src/kdegames/ksirk> git status
>     On branch newLogs
>     Changes not staged for commit:
>       (use "git add <file>..." to update what will be committed)
>       (use "git checkout -- <file>..." to discard changes in working directory)
>     
>             modified:   ksirk/Dialogs/jabbergameui.cpp
>             modified:   ksirk/Dialogs/joingame.cpp
>             modified:   ksirk/Dialogs/newGameDialogImpl.cpp
>             modified:   ksirk/Dialogs/newGameSummaryWidget.cpp
>             modified:   ksirk/Dialogs/tcpconnectwidget.cpp
>             modified:   ksirk/Jabber/jabberclient.cpp
>             modified:   ksirk/kgamewin.cpp
>             modified:   ksirk/newgamesetup.cpp
>     
>     Untracked files:
>       (use "git add <file>..." to include in what will be committed)
>     
>     no changes added to commit (use "git add" and/or "git commit -a")

Not sure what's going on. I have 4c372d89bf54dba338315b70af51c476c5906129 as well, and:

$ ../../kdesdk/kde-dev-scripts/kf5/convert-qkdebug-to-qcdebug.sh org.kde.ksirk KSIRK_LOG ksirk_debug
add ecm_qt_declare_logging_category(<file>_SRCS HEADER ksirk_debug.h IDENTIFIER KSIRK_LOG CATEGORY_NAME org.kde.ksirk) to CMakeLists.txt
1) Add ksirk_debug.cpp to CMakeLists.txt                  
2) Add #include "ksirk_debug.h" to each file which was changed   
3) Verify that it compiles :)                        
4) If you find bugs fix them please                           
prova at themys2:~/kde-svn/git.kde.org/kde/kdegames/ksirk(frameworks)$ git status
Sul branch frameworks                               
Your branch is up-to-date with 'origin/frameworks'.
Changes not staged for commit:                        
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
                                                                 
        modified:   ksirk/Dialogs/InvasionSlider.cpp
        modified:   ksirk/Dialogs/jabbergameui.cpp                                                                                                                      [31/1952]
        modified:   ksirk/Dialogs/joingame.cpp
        modified:   ksirk/Dialogs/kplayersetupwidget.cpp
        modified:   ksirk/Dialogs/kwaitedplayersetupdialog.cpp
        modified:   ksirk/Dialogs/newGameDialogImpl.cpp
        modified:   ksirk/Dialogs/newGameSummaryWidget.cpp
        modified:   ksirk/Dialogs/restartOrExitDialogImpl.cpp
        modified:   ksirk/Dialogs/tcpconnectwidget.cpp
        modified:   ksirk/GameLogic/KsirkChatDelegate.cpp
        modified:   ksirk/GameLogic/KsirkChatItem.cpp
        modified:   ksirk/GameLogic/KsirkChatModel.cpp
        modified:   ksirk/GameLogic/aiColsonPlayer.cpp
        modified:   ksirk/GameLogic/aiplayer.cpp
        modified:   ksirk/GameLogic/continent.cpp
        modified:   ksirk/GameLogic/country.cpp
        modified:   ksirk/GameLogic/eventslistproperty.cpp
        modified:   ksirk/GameLogic/gameautomaton.cpp
        modified:   ksirk/GameLogic/goal.cpp
        modified:   ksirk/GameLogic/onu.cpp
        modified:   ksirk/GameLogic/player.cpp
        modified:   ksirk/Jabber/jabberaccount.cpp
        modified:   ksirk/Jabber/jabberbasecontact.cpp
        modified:   ksirk/Jabber/jabberbookmarks.cpp
        modified:   ksirk/Jabber/jabberbytestream.cpp
        modified:   ksirk/Jabber/jabbercapabilitiesmanager.cpp
        modified:   ksirk/Jabber/jabberclient.cpp
        modified:   ksirk/Jabber/jabberconnector.cpp
        modified:   ksirk/Jabber/jabbercontact.cpp
        modified:   ksirk/Jabber/jabbercontactpool.cpp
        modified:   ksirk/Jabber/jabbergroupcontact.cpp
        modified:   ksirk/Jabber/jabbergroupmembercontact.cpp
        modified:   ksirk/Jabber/jabberprotocol.cpp
        modified:   ksirk/Jabber/jabberresource.cpp
        modified:   ksirk/Jabber/jabberresourcepool.cpp
        modified:   ksirk/Jabber/kmessagejabber.cpp
        modified:   ksirk/Jabber/kmessagejabber.h
        modified:   ksirk/Jabber/privacylist.cpp
        modified:   ksirk/Jabber/privacylistitem.cpp
        modified:   ksirk/Jabber/privacymanager.cpp
        modified:   ksirk/SaveLoad/ksirkgamexmlhandler.cpp
        modified:   ksirk/Sprites/animsprite.cpp
        modified:   ksirk/Sprites/animspritesgroup.cpp
        modified:   ksirk/Sprites/animspriteslist.cpp
        modified:   ksirk/Sprites/animspriteslist.h
        modified:   ksirk/Sprites/animspritespool.cpp
        modified:   ksirk/Sprites/arrowsprite.cpp
        modified:   ksirk/Sprites/backgnd.cpp
        modified:   ksirk/Sprites/cannonsprite.cpp
        modified:   ksirk/decoratedgameframe.cpp
        modified:   ksirk/fightArena.cpp
        modified:   ksirk/gestionSprites.cpp
        modified:   ksirk/iris/src/xmpp/sasl/digestmd5response.cpp
        modified:   ksirk/iris/src/xmpp/xmpp-core/compressionhandler.cpp
        modified:   ksirk/iris/src/xmpp/xmpp-core/simplesasl.cpp
        modified:   ksirk/iris/src/xmpp/xmpp-im/client.cpp
        modified:   ksirk/iris/src/xmpp/zlib/zlibdecompressor.cpp
        modified:   ksirk/kgamewin.cpp
        modified:   ksirk/kgamewinslots.cpp
        modified:   ksirk/krightdialog.cpp
        modified:   ksirk/ksirkConfigDialog.cpp
        modified:   ksirk/main.cpp
        modified:   ksirk/mainMenu.cpp
        modified:   ksirk/newgamesetup.cpp

no changes added to commit (use "git add" and/or "git commit -a")


- Luigi


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130098/#review103090
-----------------------------------------------------------


On Apr. 22, 2017, 4:30 p.m., Nemanja Hirsl wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130098/
> -----------------------------------------------------------
> 
> (Updated Apr. 22, 2017, 4:30 p.m.)
> 
> 
> Review request for KDE Games.
> 
> 
> Repository: ksirk
> 
> 
> Description
> -------
> 
> [Ksirk frameworks] Logging port from kDebug to qCDebug
> 
> 
> Diffs
> -----
> 
>   ksirk/CMakeLists.txt 260da6a 
>   ksirk/Dialogs/InvasionSlider.cpp 041992f 
>   ksirk/Dialogs/jabbergameui.cpp dd0e9a0 
>   ksirk/Dialogs/joingame.cpp c00c88a 
>   ksirk/Dialogs/kplayersetupwidget.cpp b55e170 
>   ksirk/Dialogs/kwaitedplayersetupdialog.cpp a51509e 
>   ksirk/Dialogs/newGameDialogImpl.cpp 80c8717 
>   ksirk/Dialogs/newGameSummaryWidget.cpp 8031cc9 
>   ksirk/Dialogs/restartOrExitDialogImpl.cpp aad96f9 
>   ksirk/Dialogs/tcpconnectwidget.cpp c3cf605 
>   ksirk/GameLogic/KsirkChatDelegate.cpp dbbbd0b 
>   ksirk/GameLogic/KsirkChatItem.cpp 2d079dd 
>   ksirk/GameLogic/KsirkChatModel.cpp 1e3cd03 
>   ksirk/GameLogic/aiColsonPlayer.cpp 19829fb 
>   ksirk/GameLogic/aiplayer.cpp 50c9757 
>   ksirk/GameLogic/continent.cpp b97713a 
>   ksirk/GameLogic/country.cpp eae46c9 
>   ksirk/GameLogic/eventslistproperty.cpp 9553514 
>   ksirk/GameLogic/gameautomaton.cpp ba41d50 
>   ksirk/GameLogic/goal.cpp b4a515e 
>   ksirk/GameLogic/onu.cpp 30a9d9c 
>   ksirk/GameLogic/player.cpp 8bc8384 
>   ksirk/Jabber/jabberaccount.cpp b0579cc 
>   ksirk/Jabber/jabberbasecontact.cpp de41445 
>   ksirk/Jabber/jabberbookmarks.cpp c0d1054 
>   ksirk/Jabber/jabberbytestream.cpp 39ce88f 
>   ksirk/Jabber/jabbercapabilitiesmanager.cpp 514e119 
>   ksirk/Jabber/jabberclient.cpp ca5e9f5 
>   ksirk/Jabber/jabberconnector.cpp a41b384 
>   ksirk/Jabber/jabbercontact.cpp 7458fdb 
>   ksirk/Jabber/jabbercontactpool.cpp 4496353 
>   ksirk/Jabber/jabbergroupcontact.cpp 2cafdf9 
>   ksirk/Jabber/jabbergroupmembercontact.cpp b5df565 
>   ksirk/Jabber/jabberprotocol.cpp 2a71897 
>   ksirk/Jabber/jabberresource.cpp 2ed0732 
>   ksirk/Jabber/jabberresourcepool.cpp c6b4f97 
>   ksirk/Jabber/kmessagejabber.h fb08076 
>   ksirk/Jabber/kmessagejabber.cpp cdd1b5d 
>   ksirk/Jabber/privacylist.cpp 67f9139 
>   ksirk/Jabber/privacylistitem.cpp 40f7569 
>   ksirk/Jabber/privacymanager.cpp 02b2f4d 
>   ksirk/SaveLoad/ksirkgamexmlhandler.cpp 209d595 
>   ksirk/Sprites/animsprite.cpp 3b2c982 
>   ksirk/Sprites/animspritesgroup.cpp 1adb2a0 
>   ksirk/Sprites/animspriteslist.h 8084ce5 
>   ksirk/Sprites/animspriteslist.cpp cab46ce 
>   ksirk/Sprites/animspritespool.cpp 5fceca5 
>   ksirk/Sprites/arrowsprite.cpp 7e7646b 
>   ksirk/Sprites/backgnd.cpp 736fc30 
>   ksirk/Sprites/cannonsprite.cpp 3e99d3c 
>   ksirk/decoratedgameframe.cpp 028e435 
>   ksirk/fightArena.cpp de17ee1 
>   ksirk/gestionSprites.cpp 90a3fb9 
>   ksirk/iris/src/CMakeLists.txt da2a0ff 
>   ksirk/iris/src/xmpp/sasl/digestmd5response.cpp 483690d 
>   ksirk/iris/src/xmpp/xmpp-core/compressionhandler.cpp e3f0add 
>   ksirk/iris/src/xmpp/xmpp-core/simplesasl.cpp cc9fac4 
>   ksirk/iris/src/xmpp/xmpp-im/client.cpp 9b51302 
>   ksirk/kgamewin.cpp 50795e0 
>   ksirk/kgamewinslots.cpp cb5d210 
>   ksirk/krightdialog.cpp 8f0095c 
>   ksirk/ksirkConfigDialog.cpp c84b181 
>   ksirk/ksirkdebug.h PRE-CREATION 
>   ksirk/ksirkdebug.cpp PRE-CREATION 
>   ksirk/main.cpp 519dfe7 
>   ksirk/mainMenu.cpp 935617b 
>   ksirk/newgamesetup.cpp 6384c09 
> 
> Diff: https://git.reviewboard.kde.org/r/130098/diff/
> 
> 
> Testing
> -------
> 
> After applyng convert-qkdebug-to-qcdebug.sh, a few changes made in order to compile succesfully.
> 
> Application tested and logs are available: 
> ./ksirk
> logksirk: Hello KsirK
> logksirk: Creating main window
> ...
> 
> 
> Thanks,
> 
> Nemanja Hirsl
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20170422/634155e2/attachment-0001.html>


More information about the kde-games-devel mailing list