Port to QStringLiteral operator

This commit is contained in:
Jonas Kvinge
2024-10-20 06:38:55 +02:00
parent 722035913e
commit ef9ef63f02
202 changed files with 2036 additions and 1889 deletions

View File

@@ -29,6 +29,8 @@
#include "linetextedit.h"
using namespace Qt::Literals::StringLiterals;
LineTextEdit::LineTextEdit(QWidget *parent) : QTextEdit(parent) {
setWordWrapMode(QTextOption::NoWrap);
@@ -45,7 +47,7 @@ QSize LineTextEdit::sizeHint() const {
static const int kMargin = 5;
int h = 2 * kMargin + qMax(fm.height(), 14);
int w = 2 * kMargin + fm.horizontalAdvance(QStringLiteral("W")) * 15;
int w = 2 * kMargin + fm.horizontalAdvance(u"W"_s) * 15;
return QSize(w, h);