How is the moment due to pressure distribution calculated? Consider the airfoil shown, with a co-ordinate system set up from the leading edge $O$:

  

I want to find the moment of force about point $O$ due to pressure on an infinitesimal piece of the airfoil at point Q. 

A text book I'm referring to(Fundamentals of Aerodynamics by John D Anderson) says that the moment is:
$$ dM= (p dS) cos \theta ~ x_Q $$ (where $x_Q$ is the x co-ordinate of Q)

Is this expression an approximation that assumes thickness of the airfoil to be negligible compared to the chord length?

Because, the moment should be length $OQ$ multiplied by component of $pdS$ perpendicular to $ \vec{OQ}$ ... or have I made a mistake with the physics?
If you calculate "component of pdS perpendicular to OQ" you get

$$ dM= (p dS) (cos \theta ~ x_Q + sin \theta ~ y_Q) $$ 
The pressure times the surface (gives you a force), splited in the two perpendicular forces(along axis) and applied at the $x_Q$ and $y_Q$ distances. Set $y_Q$ to 0 (negligible thickness) and you get the book formula.