mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-22 15:48:26 +00:00
enhance #140 with an even stricter regex expression to minimize possibility of conflict between actual data and encoding options. Fixes #139
This commit is contained in:
parent
993ef49fe6
commit
8c296ec32e
@ -28,7 +28,7 @@ QImage QZXingImageProvider::requestImage(const QString &id, QSize *size, const Q
|
|||||||
QZXing::EncoderFormat format = QZXing::EncoderFormat_QR_CODE;
|
QZXing::EncoderFormat format = QZXing::EncoderFormat_QR_CODE;
|
||||||
QZXing::EncodeErrorCorrectionLevel correctionLevel = QZXing::EncodeErrorCorrectionLevel_L;
|
QZXing::EncodeErrorCorrectionLevel correctionLevel = QZXing::EncodeErrorCorrectionLevel_L;
|
||||||
|
|
||||||
int customSettingsIndex = id.lastIndexOf(QRegExp("\?[cf]"));
|
int customSettingsIndex = id.lastIndexOf(QRegExp("\?(corretionLevel|format)="));
|
||||||
if(customSettingsIndex >= 0)
|
if(customSettingsIndex >= 0)
|
||||||
{
|
{
|
||||||
int startOfDataIndex = slashIndex + 1;
|
int startOfDataIndex = slashIndex + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user