Changeset View
Changeset View
Standalone View
Standalone View
src/lib/qrcodebarcode.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 56 | for(int i =0 ; i<4 ; i++) { | |||
---|---|---|---|---|---|
58 | p++; | 58 | p++; | ||
59 | } | 59 | } | ||
60 | } | 60 | } | ||
61 | } | 61 | } | ||
62 | } | 62 | } | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | const auto result = QImage(img, code->width+2*margin, code->width+2*margin, QImage::Format_ARGB32).copy(); // deep copy as we are going to delete img | 65 | const auto result = QImage(img, code->width+2*margin, code->width+2*margin, QImage::Format_ARGB32).copy(); // deep copy as we are going to delete img | ||
66 | setMinimumSize(QSizeF(result.width(), result.height())); | | |||
67 | delete[] img; | 66 | delete[] img; | ||
68 | QRcode_free(code); | 67 | QRcode_free(code); | ||
69 | return result; | 68 | return result; | ||
70 | } | 69 | } |