Skip to content

Commit

Permalink
[libiodata] Include libiodata-qt5 in generated Qt5 header files
Browse files Browse the repository at this point in the history
  • Loading branch information
Petri M. Gerdt committed Apr 22, 2013
1 parent dc65834 commit 55f21c7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions type-to-cxx/type-to-cxx.cpp
Expand Up @@ -3,14 +3,20 @@ using namespace std ;

#include <argp.h>

#include <QtGlobal>

#include "../src/iodata.h"
#include "../src/validator.h"
#include "../src/storage.h"
#include "../src/log.h"

void dump_h(ostringstream &h, iodata::validator *v)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
h << "#include <iodata-qt5/validator>" << endl ;
#else
h << "#include <iodata/validator>" << endl ;
#endif
for (vector<string>::const_iterator it=v->v_namespace.begin(); it!=v->v_namespace.end(); ++it)
h << "namespace " << *it << " {" << endl ;
string foo = v->v_function ;
Expand Down Expand Up @@ -196,7 +202,11 @@ int main_try(int ac, char **av)

if (not c_output.empty())
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
string include = "#include <iodata-qt5/validator>\n" ;
#else
string include = "#include <iodata/validator>\n" ;
#endif

if (not h_output.empty())
include += "#include \"" + h_output + "\"\n" ;
Expand Down

0 comments on commit 55f21c7

Please sign in to comment.