[Interest] How prevent "Code will never be executed" when compiling "qDebug() << enumvar" ?

Koehne Kai Kai.Koehne at theqtcompany.com
Tue Dec 15 15:52:47 CET 2015


> -----Original Message-----
> From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of
> Edward Sutton
> Sent: Monday, December 14, 2015 10:45 PM
> To: Qt Interest <interest at qt-project.org>
> Subject: [Interest] How prevent "Code will never be executed" when
> compiling "qDebug() << enumvar" ?
> 
> #ifdef QT_DEBUG // Fix iOS Clang warning "Code will never be executed"
> 
> qDebug() << "TapAndHoldGesture: " << tapAndHold->state();
> 
> #endif

Just an idea, but maybe you can try using categorized logging?

QLoggingCategory defaultC("default");

qCDebug(defaultC) << "TapAndHoldGesture: " << tapAndHold->state();

Regards

Kai


More information about the Interest mailing list