nikhilm/qhttpserver — pull request #5 by jonnenauha (2013-01-02 00:07:22+00:00)
Title: Windows fixes + fwd declaration cleanup

**Fixing .lib generation -> qhttpserverapi.h**
I was interested in this library so I gave it a go against Qt5 msvc 2010 build. Noticed that something was off as it was not generating .lib files (both via qt crator or visual studio project files via qmake). There was nothing exported for external usage, this needs to be explicitly spesified on windows http://msdn.microsoft.com/en-us/library/3y1sfaz2(v=vs.80).aspx. Afaik linux exports everything in shared libs by default so its not an issue there, I assume you did not notice this as you are a linux guy (plus windows builds fine, just not generating the needed .lib files) :)

**Working Qt5 build**
Also for your information this **almost** builds out of the box against Qt5 via your .pro. They have deprecated `QString::fromAscii/toAscii` and [the documentation](http://qt-project.org/doc/qt-5.0/qtcore/qstring.html#fromAscii) tells `QString::fromLatin1/toLatin1` does exactly the same thing so I just used it. The ascii ones are still documented but not exposed in QString.

I'm fairly confident (due to the docs) these functions can be also used in Qt4 without problems. `ifdef
`fin them with qt version is fine also, let me know if you prefer it that way.

**OCD cleanup time :) --> qhttpserverfwd.h**
I noticed same typedefs and forward declarations being done in each header file. So I made a common header to do these type of things. You might need to add this file to your doxygen generation as it now typedefs the documented `HeaderHash`. Additionally I "fixed" some 2 space indentation to 4 spaces as everything else has too, and some placement things in one of the headers. I should have probably taken this into a different commit so you could revert it nicely if you dont like it, sorry :I

**Don't make 3rd party code using this lib need http_parser.h**
The http_parser structs are now also forward declared and the settings member I turned into a ptr. This ways the code that is using your lib wont need the header file so use your lib. It would not be such a problem if the header was in /src as thats gonna be a include dir "dependency" anyway, but making it aware of the /http_parser folder also seems like a overkill.

---

Just wanted to share these with you. Maybe the next guy who tries it out with windows wont have to hack around :) If there is something you want me to change let me know.