pipacs / o2

OAuth 2.0 for Qt
BSD 2-Clause "Simplified" License
317 stars 147 forks source link

Use QDebug category when we build with qt5 #111

Closed Montel closed 6 years ago

Montel commented 6 years ago

Do you have some reviews on this patch ?

pipacs commented 6 years ago

What is the need/use case this patch is trying to address?

Montel commented 6 years ago

Disable noise when we use in project. in qt5 we can do it so it can be useful otherwise we will have a lot of debug .

pipacs commented 6 years ago

Makes sense then. Could the code be a bit more symmetric though:

Montel commented 6 years ago

"Call the macros o0Debug() and o2Warning() (don't forget to add the parentheses)" We can't add parentheses as in qt4 we need to use qDebug() and in qt5 we need to use qCDebug(O2_DEBUG_LOG) so it's not possible to add parentheses here

pipacs commented 6 years ago

Shouldn't #define o0Debug() qcDebug(O2_DEBUG_LOG) do the trick?