diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp index 1752306b..fe21155e 100644 --- a/backend_qt/qzint.cpp +++ b/backend_qt/qzint.cpp @@ -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); } diff --git a/backend_qt/qzint.h b/backend_qt/qzint.h index 20e4f0d8..9ef6c3ea 100644 --- a/backend_qt/qzint.h +++ b/backend_qt/qzint.h @@ -238,9 +238,9 @@ public: /* Legacy property getters/setters */ - void setWidth(int width); /* `symbol->option_1` */ + void setWidth(int width); /* `symbol->option_2` */ int width() const; - void setSecurityLevel(int securityLevel); /* `symbol->option_2` */ + void setSecurityLevel(int securityLevel); /* `symbol->option_1` */ int securityLevel() const; void setPdf417CodeWords(int pdf417CodeWords); /* No-op */ int pdf417CodeWords() const; diff --git a/backend_qt/tests/test_qzint.cpp b/backend_qt/tests/test_qzint.cpp index 25b5825b..12bc917d 100644 --- a/backend_qt/tests/test_qzint.cpp +++ b/backend_qt/tests/test_qzint.cpp @@ -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);