Review Request 116560: Adds the feature to save the log files in the debugger.

David Edmundson david at davidedmundson.co.uk
Mon Mar 3 12:47:02 UTC 2014



> On March 3, 2014, 11:51 a.m., Alexandr Akulich wrote:
> > tools/debugger/main-window.cpp, line 49
> > <https://git.reviewboard.kde.org/r/116560/diff/5/?file=251681#file251681line49>
> >
> >     I propose to rewrite it as:
> >     switch (m_ui.tabWidget->currentWidget()) {
> >       case m_ui.mcTab:
> >         m_ui.mcLogsView->saveLogFile();
> >         break;
> >       case m_ui.gabbleTab:
> >         m_ui.gabbleLogsView->saveLogFile();
> >         break;
> >     …
> >     }
> >     Such change will make method independent on tabs order.
> >     
> >     At very least, you should add space before open brace.
> >     I'm not sure that placing couple of instructions on same line is acceptable.
> 
> Martin Klapetek wrote:
>     Note that c++ switch operates only on int values, so the code above wouldn't work as is.
>     
>     More simpler solution would be to simply get the current tab, cast it to the debug-message-view and call the method on it, no switch needed at all.

pointers are an int.

Your suggestion is better though :)


- David


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


On March 3, 2014, 11:16 a.m., mayank jha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116560/
> -----------------------------------------------------------
> 
> (Updated March 3, 2014, 11:16 a.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Bugs: 303564
>     http://bugs.kde.org/show_bug.cgi?id=303564
> 
> 
> Repository: ktp-common-internals
> 
> 
> Description
> -------
> 
> Adds a button Save Log file to save the log in the currentTab of the TabWidget.
> 
> 
> Diffs
> -----
> 
>   tools/debugger/debug-message-view.h 49a4b2f 
>   tools/debugger/debug-message-view.cpp c2ead13 
>   tools/debugger/main-window.h 3876767 
>   tools/debugger/main-window.cpp faf7c22 
>   tools/debugger/main-window.ui 0813149 
> 
> Diff: https://git.reviewboard.kde.org/r/116560/diff/
> 
> 
> Testing
> -------
> 
> Runs fine!
> 
> 
> File Attachments
> ----------------
> 
> The Button added
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/03/03/e4d604cc-f67a-482a-9c81-0de3cbf3f2ea__savebutton.png
> The File Dialog Box
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/03/03/b6bb5033-dae3-4edc-bd60-f6428d9cfeda__savedialog.png
> 
> 
> Thanks,
> 
> mayank jha
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20140303/98b467c9/attachment.html>


More information about the KDE-Telepathy mailing list