Browse Source

fixed accidental search and replace errors in QrCode.cpp and QrCode.hpp

pull/133/head
D 9 months ago
parent
commit
a59917f1f5
  1. 4
      src/3rdparty/qrcode/QrCode.cpp
  2. 2
      src/3rdparty/qrcode/QrCode.hpp

4
src/3rdparty/qrcode/QrCode.cpp

@ -166,7 +166,7 @@ bool QrCode::getModule(int x, int y) const {
}
QString QrCode::toSvgString(int border) const {
std::string QrCode::toSvgString(int border) const {
if (border < 0)
throw std::domain_error("Border must be non-negative");
if (border > INT_MAX / 2 || border * 2 > INT_MAX - size)
@ -190,7 +190,7 @@ QString QrCode::toSvgString(int border) const {
}
sb << "\" fill=\"#000000\"/>\n";
sb << "</svg>\n";
return QString::fromStdString(sb.str());
return sb.str();
}

2
src/3rdparty/qrcode/QrCode.hpp

@ -187,7 +187,7 @@ class QrCode final {
* Returns a string of SVG code for an image depicting this QR Code, with the given number
* of border modules. The string always uses Unix newlines (\n), regardless of the platform.
*/
public: QString toSvgString(int border) const;
public: std::string toSvgString(int border) const;

Loading…
Cancel
Save