Review Request: Plasmate: add konsole previewer

Giorgos Tsiapaliwkas terietor at gmail.com
Tue Jun 12 13:06:17 UTC 2012



> On June 9, 2012, 10:48 a.m., Aaron J. Seigo wrote:
> > on possibility is to make some changes to QScriptValue ScriptEnv::print(QScriptContext *context, QScriptEngine *engine) in kde-runtime/plasma/scriptengines/javascript/common/scriptenv.cpp to do what we did in the desktop scripting: have print() also emit a signal that contains the message, connect that to a printMessage(const QString &) (or whatever) signal in the ScriptEngine plugins and then you could just connect to that signal.
> > 
> > that will only cover the JavaScript script engines, however. 
> > 
> > for QML, this might be of interest: http://qt-project.org/wiki/QML_Script_Console ..
> > 
> > for python/ruby/etc. i'm not sure what to suggest. one more downside of supporting those languages in plasmate ... :/
> > 
> >

What's wrong with the current solution?
This is a normal question, I am thinking why this solution isn't good but I can't find any reason...
So I will explain why I followed this solution.

--First we have to take the output from javascript engines.
The Qt people has mentioned that the QtScript module is done,(the next one is an assumption, correct me if I am wrong) so all those stuff we be left behind since in Qt5 we will use
QML2 and the QJS* stuff.(this is blocker 1)

--the we need the output from QML engines(this code can be either pure QML code or c++ code which is exported to QML)
We can take this output from QDeclarative::errors() but I believe that we can't.(this is blocker 2)

So if we go to another solution we have two blockes, now we have only the downside that we will have to use
something like plasmatedebug

Also a side note about the current implementation,
right now the konsole takes the exact same output that [1]plasmate gives from q/kDebug, console.log, and in general everything that uses
Qt's debug mechanism. 


>for python/ruby/etc. i'm not sure what to suggest. one more downside of supporting those languages in plasmate ... :/
If python/ruby/etc.. uses Qt's debug mechanism I believe that the above will work.(I don't use python/ruby/etc so I can't test it)

Also as it regards plasmate and other languages like python,ruby,etc.
I believe that the people who contribute to plasmate that doesn't use the above languages so sooner or later plasmate's relative
stuff with those languages will become unusable.

[1] when plasmate loads a package like rssnow, plasmate via the plasma-previewer will also contain the output from that package


- Giorgos


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105173/#review14538
-----------------------------------------------------------


On June 7, 2012, 1:01 p.m., Giorgos Tsiapaliwkas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105173/
> -----------------------------------------------------------
> 
> (Updated June 7, 2012, 1:01 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Description
> -------
> 
> Hello,
> 
> the goal is to implement a konsole which will take the log
> from the previewer.
> 
> Please check this wiki page http://www.developer.nokia.com/Community/Wiki/How_to_redirect_qDebug_output_to_a_file
> 
> this patch addes konsole previewer into plasmate.
> KonsolePreviewer is a dockwidget.
> 
> Also It is able to take the log from plasmate's embedded previewer.
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 12f8a3a 
>   main.cpp 1c5ea19 
>   mainwindow.h 520c26c 
>   mainwindow.cpp 6f72624 
>   previewer/plasmoid/plasmoidpreviewer.h 9cad9e4 
>   previewer/plasmoid/plasmoidpreviewer.cpp 29853db 
>   previewer/plasmoid/plasmoidview.cpp 3d40d48 
>   previewer/plasmoid/previewcontainment.h fb10941 
>   previewer/plasmoid/previewcontainment.cpp 42b6af7 
>   previewer/previewer.h 2907598 
>   previewer/previewer.cpp c9d7479 
>   previewer/runner/runnerpreviewer.h 054c58d 
>   previewer/runner/runnerpreviewer.cpp 5c8dc6d 
> 
> Diff: http://git.reviewboard.kde.org/r/105173/diff/
> 
> 
> Testing
> -------
> 
> The bad thing is that it takes the entire log of plasmate but we only
> want to take the output from the previewer.
> 
> So I was thinking to implement a plasmateDebug() << "text" macro/method which
> will start with a unique string which I will check during customMessageHandler().
> 
> 
> Thanks,
> 
> Giorgos Tsiapaliwkas
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120612/80654b83/attachment.html>


More information about the Plasma-devel mailing list