mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 14:25:23 -04: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:
parent
0eaa9f3e7d
commit
c8bb299908
3 changed files with 8 additions and 8 deletions
|
@ -798,10 +798,10 @@ namespace Zint {
|
|||
}
|
||||
|
||||
/* Legacy property getters/setters */
|
||||
void QZint::setWidth(int width) { setOption1(width); }
|
||||
int QZint::width() const { return m_option_1; }
|
||||
void QZint::setSecurityLevel(int securityLevel) { setOption2(securityLevel); }
|
||||
int QZint::securityLevel() const { return m_option_2; }
|
||||
void QZint::setWidth(int width) { setOption2(width); }
|
||||
int QZint::width() const { return m_option_2; }
|
||||
void QZint::setSecurityLevel(int securityLevel) { setOption1(securityLevel); }
|
||||
int QZint::securityLevel() const { return m_option_1; }
|
||||
void QZint::setPdf417CodeWords(int /*pdf417CodeWords*/) {}
|
||||
int QZint::pdf417CodeWords() const { return 0; }
|
||||
void QZint::setHideText(bool hide) { setShowText(!hide); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue