Hi!

Jérémy Zurcher wrote:
> Hi everyone,
>
> first of all, you can find my updated git tree with cmake build
> system at http://cgit.asynk.ch/cgi-bin/cgit/hydrogen/log/?h=jeremyz
>   

Cool!
> why cmake, because
>     - there's nothing more todo but call simple macros
>     - it's portable and relies on native build systems,
>     - it's the build system used by KDE and lmms
>
> mkdir build && cd build && cmake -D WANT_JACK=1 .. && make
> build everything out of the source tree.
>   
> I'm fluent in C, and others, but no more with C++ *sigh*
> so just a few questions,
>
> when I see in local_file_mgr.cpp
>
> 1220         QDomDocument doc;
> 1221         QFile file( filename );
> 1222 
> 1223         if ( !file.open(QIODevice::ReadOnly) )
> 1224                 return QDomDocument();
>
> I wonder why QDomDocument() is returned and not doc ?
> small testis made me feel like it would be ok
>   
Yes, that should be a little bit more efficient.
> void LocalFileMng::writeXmlString( QDomNode parent, const QString& name, 
> const QString& text )
> 1110 {
> ...
> 1117         QDomDocument doc;
> 1118         QDomElement elem = doc.createElement( name );
> 1119         QDomText t = doc.createTextNode( text );
> 1120         elem.appendChild( t );
> 1121         parent.appendChild( elem );
> 1122 }
>
> I wonder if building a local instance of QDomDOcument each call of 
> writeXmlString
> isn't crazy ?
>   
As i wrote the QtXml Code some month ago i was unsure if  'doc' gets 
altered in some way when you call .createTextNode() oder 
.createElement() and if that
*could* be problematic in some case. But even then, it should be ok to 
use a class variable here ( in writeXmlString ) .
> ... don't feel sorry for me, I just need straight answers ;)
>
> last point,
>
> I would like to make a little bit of cleaning in the source tree,
>     - for me there should be no more references to the GUI than a single
>     pointer (sorry I speak C) into the core of hydrogen,
>   
That's a good idea.. at the moment the communication between the gui and 
the backend is not really well-defined.
>     - which also should be built as a shared library.
>     - all the GetDataDirectory and get_data_path should be held in a single
>     class for multiple reasons ...
>   
What is GetDataDirectory ? I can't find that method. But sure, if it 
exists, it should be somewhere in data_path.cpp along with get_data_path.
- Sebastian

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to