Mercurial > projects > qtd
view generator/global.h @ 405:9d6e4703a458
Make QObject::property()/setProperty() accessible from D.
It is specified to be private in the type system back from QtJambi because the functions take a char pointer instead of a QString, but the conversion functions were missing so far.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Thu, 17 Mar 2011 23:09:43 +0100 |
parents | e700fa4916e4 |
children |
line wrap: on
line source
#ifndef GLOBAL_H #define GLOBAL_H #include <QString> class Global { public: enum TargetPlatform { UnixTarget, Win32Target }; TargetPlatform targetPlatform; bool cppShared; bool dPhobos; int dVersion; void setTargetPlatform(QString tp) { if (tp == "win32") targetPlatform = Win32Target; else if (tp == "unix") targetPlatform = UnixTarget; else if (tp.isEmpty()) { #if WIN32 targetPlatform = Win32Target; #else targetPlatform = UnixTarget; #endif } else qFatal("Target platform %s is not supported", qPrintable(tp)); } Global(); }; extern Global global; #endif // GLOBAL_H