Make DMTX dependency optional
ClosedPublic

Authored by vkrause on Feb 17 2018, 11:33 AM.

Details

Summary

This simplifies deployment on Android, a platform that libdmtx doesn't
seem to support out of the box.

Diff Detail

Repository
R280 Prison
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.Feb 17 2018, 11:33 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 17 2018, 11:33 AM
vkrause requested review of this revision.Feb 17 2018, 11:33 AM

Thanks. The ability to cleanly do something like that was one of the reasons for the api changes I did between qt4 and qt5.

src/lib/prison.cpp
43–44

I'm wondering if it isn't better to have

case Prison::DataMatrix:
#ifdef HAVE_DTMX
return new DataMatrixBarcode;
#else
return nullptr
#endif

to avoid potentially having a unhandled enum value in switch warning.

vkrause updated this revision to Diff 27458.Feb 18 2018, 11:29 AM

Address review comments.

svuorela accepted this revision.Feb 18 2018, 11:59 AM
This revision is now accepted and ready to land.Feb 18 2018, 11:59 AM
This revision was automatically updated to reflect the committed changes.