← Back to team overview

ubuntu-phone team mailing list archive

Re: QProcess, and a QML/JavaScript only alternative?

 

On Tuesday, 2013-11-26, 07:11:17, Israel wrote:
> On 11/26/2013 02:50 AM, Michael Zanetti wrote:
> > On Monday 25 November 2013 18:58:45 Israel wrote:
> >> Is there work going on to integrate something like QProcess into
> >> QML/JavaScript.  I'd really like to run some external programs (festival
> >> for one, and to make a few nice configuration programs for the
> >> in-process LXQt version of Lubuntu) as I'd rather the program be
> >> smaller, as both phone and Lubuntu generally want smaller programs,
> >> rather than full-on C++ code (if avoidable)
> > 
> > I don't think that's true.
> 
> Not sure what you mean with that?  Are you saying you don't think
> QML/JavaScript is lighter?  If so I understand, C++ probably compiles to
> be lighter, but my thinking is that JavaScript runs in a browser, so if
> I can make my code one line, instead of including main.cpp, qprocess.cpp
> qprocess.h it will be lighter (smaller?).  I suppose this is not
> accurate, just seems like it would be slightly smaller.

In neither case you would include qprocess.cpp in your program, it's code is 
already part of libQtCore.

In both cases you have an application that links with Qt, perhaps loading 
parts of it as plugins.

Naturally using QML, in this case for UI, will have additional overhead, at 
least memory wise.
If the UI component technology used with QML is QtQuick2 then this is the only 
option [1] so also no difference.

A package containing just QML and script code might be smaller in download/on-
disk size though, assuming the runtime and all plugins are already present.

Cheers,
Kevin

[1] QtQuick2 cannot be used without QML. Other UI component technologies,  
e.g. QtWidgets or BB10/Cascades, can be used with C++ or QML.
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow ups

References