[Interest] Apologies on the "bloat" thread (a.k.a yes Windows is still important)
Scott Aron Bloom
scott.bloom at onshorecs.com
Thu Apr 11 02:49:27 CEST 2013
Thanks.. Ill volunteer to look into creating something for it... Ill have time this weekend...
Now can anyone help with my "Why cant I view the Chinese file in QPlainTextEdit" issue I had posted earlier...
Going nuts here...
Scott
-----Original Message-----
From: interest-bounces+scott.bloom=onshorecs.com at qt-project.org [mailto:interest-bounces+scott.bloom=onshorecs.com at qt-project.org] On Behalf Of Thiago Macieira
Sent: Wednesday, April 10, 2013 5:37 PM
To: interest at qt-project.org
Subject: Re: [Interest] Apologies on the "bloat" thread (a.k.a yes Windows is still important)
On quarta-feira, 10 de abril de 2013 23.03.53, Scott Aron Bloom wrote:
> Do you have a specification for what the perl script is required to do?
"Use the source, Luke!" ? :-)
Basically, it needs to scan all the *.h files in a given directory and partially interpret the C++ class declarations in there. It should then output one file per class or typedef declared in that file, #include'ing the original file.
That's why we have:
$ cat include/QtCore/{QObject,QString,Q_PID}
#include "qobject.h"
#include "qstring.h"
#include "qprocess.h"
It also creates temporary forwarding headers for the build process:
$ cat include/QtCore/{qobject,qstring,qprocess}.h
#include "../../../../../../src/qt/qt5/qtbase/src/corelib/kernel/qobject.h"
#include "../../../../../../src/qt/qt5/qtbase/src/corelib/tools/qstring.h"
#include "../../../../../../src/qt/qt5/qtbase/src/corelib/io/qprocess.h"
Finally, it outputs one qmake .pri file that contains the listing of what it found and what it produced:
$ awk '{ print substr($0, 1, 72); }' include/QtCore/headers.pri SYNCQT.HEADER_FILES = animation/qabstractanimation.h animation/qanimatio SYNCQT.HEADER_CLASSES = ../../../../../../obj/qt/qt5/qtbase/include/QtCo
SYNCQT.PRIVATE_HEADER_FILES = animation/qabstractanimation_p.h animation SYNCQT.QPA_HEADER_FILES = SYNCQT.CLEAN_HEADER_FILES = animation/qabstractanimation.h animation/qan
This file is used to generate the "make install" rules.
> Is there a way for a non Qt developer, ie not one of you guys, one of
> us :), to setup their qt environment into the bootstrap world.
>
> Ie, build the tool so it could be built the same time qmake is built..
> With "qt" but not "full qt" Please please please don't say I have to
> write it without any Qt
Yes, there's a way. To tell you the truth, I was wondering if it could be done in C++ with only the Standard Library. I've recently done that (qtchooser) and it wasn't very pleasant. And especially there's one snag for Windows: listing directories. Somehow, after all these years this is not a standard API in the C or C++ standard libraries, so you'd have to write the POSIX code and the
Win32 code for it.
The alternative is to put this code inside qmake itself, so no new binary is created. This has the advantage that several Qt classes are already bootstrapped, including the filesystem engine.
The disadvantage is that, personally, I'd rather see qmake replaced by a newer, more modern tool, instead of adding new code and new features to it.
My recommendation is therefore to follow the qmake route. Start with making a regular, QtCore-only application. After that, we can merge it into qmake.
PS: qmake can use QRegExp, but not QRegularExpression.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list