Skip to content

Commit

Permalink
fix: app crashed when QBytearray reallocated
Browse files Browse the repository at this point in the history
Using a variable to avoid reallocating memory.

pms: BUG-292371
  • Loading branch information
18202781743 committed Dec 5, 2024
1 parent 7dc5460 commit eaab8d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xcb/dhighdpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ QDpi DHighDpi::logicalDpi(QXcbScreen *s)
}

int dpi = 0;
QVariant value = DPlatformIntegration::xSettings(s->connection())->setting("Qt/DPI/" + s->name().toLocal8Bit());
const QString screenName(QString("Qt/DPI/%1").arg(s->name()));
QVariant value = DPlatformIntegration::xSettings(s->connection())->setting(screenName.toLocal8Bit());
bool ok = false;

dpi = value.toInt(&ok);
Expand Down

0 comments on commit eaab8d4

Please sign in to comment.