mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Fix legacy width and security level getters/setters in Qt backend
Previously, width is option 2 and security level is option 1.
Seems like in 54947fb435
, the definitions
swapped and that breaks the legacy Qt application using setWidth() and
setSecurityLevel().
I know a better solution is make Qt application use setOption2() and
setOption1() respectively, but it's good to keep these legacy APIs
backward-compatible.
This commit is contained in:
@ -338,12 +338,12 @@ private slots:
|
||||
int width = 12;
|
||||
bc.setWidth(width);
|
||||
QCOMPARE(bc.width(), width);
|
||||
QCOMPARE(bc.option1(), width);
|
||||
QCOMPARE(bc.option2(), width);
|
||||
|
||||
int securityLevel = 2;
|
||||
bc.setSecurityLevel(securityLevel);
|
||||
QCOMPARE(bc.securityLevel(), securityLevel);
|
||||
QCOMPARE(bc.option2(), securityLevel);
|
||||
QCOMPARE(bc.option1(), securityLevel);
|
||||
|
||||
int pdf417CodeWords = 123;
|
||||
bc.setPdf417CodeWords(pdf417CodeWords);
|
||||
|
Reference in New Issue
Block a user