Qt Creator with D
Anders F Björklund
afb at algonet.se
Wed Oct 13 03:32:28 PDT 2010
Adding D support to the cross-platform C++ IDE for Qt, "Qt Creator":
http://qt.nokia.com/products/developer-tools
http://qt.nokia.com/products/library
It uses the "CPlusPlus" Open Source front-end for C++ (license MIT),
enhanced for use in Qt Creator, to do C/C++ completion / highlighting.
For QML/JavaScript parsing there is a custom qscript parser included.
Like Qt SDK all is available under both Qt Commercial License and LGPL.
For doing the actual building, it calls qmake to generate Makefiles.
(generic support for CMake and make is also available, if needed...)
For debugging it calls out to gdb, there is also version control and
interface/resource handlers - all integrated in the form of plugins.
It does require C++, and it does require Make. It's no D-only solution.
Makefile snippet: (where "dmd" could be "gdmd" or "ldmd" too eventually)
CC = gcc
CXX = g++
+DMD = dmd
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+DFLAGS =
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+.d.o:
+ $(DMD) -c $(DFLAGS) -of"$@" "$<"
+
So the first thing needed was to patch in D support to qmake/qtcreator,
and the second thing is writing the actual new "deditor" editor plugin.
The basic "texteditor" does most of the editing, so the two main needed
additions are code completion and syntax highlighting (i.e. parsing D).
I just used "dmd -X" and QJson for analyzing D, it would also need a
http://doc.trolltech.com/stable/qsyntaxhighlighter.html implemented.
Building requires Qt 4.5 or later, but Qt Creator can build itself.
Screenshot at: http://www.algonet.se/~afb/d/qt-creator-d.png (1.3.1)
http://gitorious.org/qt-creator
http://gitorious.org/qjson
If someone is interested in continuing this, then please contact me...
More information about the Digitalmars-d-ide
mailing list