@@ -1076,11 +1076,11 @@ void MainWindow::setupEditorSettings()
1076
1076
emit displayFontSet (QVariant (dataToSendToView));
1077
1077
1078
1078
#if defined(Q_OS_WINDOWS)
1079
- emit platformSet (QVariant (QString (" Windows" )));
1079
+ emit platformSet (QVariant (QStringLiteral (" Windows" )));
1080
1080
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
1081
- emit platformSet (QVariant (QString (" Unix" )));
1081
+ emit platformSet (QVariant (QStringLiteral (" Unix" )));
1082
1082
#elif defined(Q_OS_MACOS)
1083
- emit platformSet (QVariant (QString (" Apple" )));
1083
+ emit platformSet (QVariant (QStringLiteral (" Apple" )));
1084
1084
#endif
1085
1085
1086
1086
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
@@ -1198,9 +1198,9 @@ void MainWindow::alignTextEditText()
1198
1198
}
1199
1199
1200
1200
QFontMetricsF fm (m_currentSelectedFont);
1201
- QString limitingStringSample =
1202
- QString ( " The quick brown fox jumps over the lazy dog the quick brown fox jumps over "
1203
- " the lazy dog the quick brown fox jumps over the lazy dog" );
1201
+ QString limitingStringSample = QStringLiteral (
1202
+ " The quick brown fox jumps over the lazy dog the quick brown fox jumps over "
1203
+ " the lazy dog the quick brown fox jumps over the lazy dog" );
1204
1204
limitingStringSample.truncate (m_textEdit->lineWrapColumnOrWidth ());
1205
1205
qreal textSamplePixelsWidth = fm.horizontalAdvance (limitingStringSample);
1206
1206
m_noteEditorLogic->setCurrentAdaptableEditorPadding (
@@ -1297,11 +1297,11 @@ void MainWindow::setupKanbanView()
1297
1297
ui->verticalLayout_textEdit ->insertWidget (ui->verticalLayout_textEdit ->indexOf (m_textEdit),
1298
1298
m_kanbanWidget);
1299
1299
# if defined(Q_OS_WINDOWS)
1300
- emit platformSet (QVariant (QString (" Windows" )));
1300
+ emit platformSet (QVariant (QStringLiteral (" Windows" )));
1301
1301
# elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
1302
- emit platformSet (QVariant (QString (" Unix" )));
1302
+ emit platformSet (QVariant (QStringLiteral (" Unix" )));
1303
1303
# elif defined(Q_OS_MACOS)
1304
- emit platformSet (QVariant (QString (" Apple" )));
1304
+ emit platformSet (QVariant (QStringLiteral (" Apple" )));
1305
1305
# endif
1306
1306
1307
1307
QJsonObject dataToSendToView{ { " displayFont" ,
@@ -4195,9 +4195,9 @@ void MainWindow::setHeading(int level)
4195
4195
new_text.clear ();
4196
4196
}
4197
4197
selected_text = selected_text.trimmed ().remove (QRegularExpression (" ^#*\\ s?" ));
4198
- new_text += QString (" #" ).repeated (level) + ((level == 0 ) ? " " : " " ) + selected_text;
4198
+ new_text += QStringLiteral (" #" ).repeated (level) + ((level == 0 ) ? " " : " " ) + selected_text;
4199
4199
} else {
4200
- new_text = QString (" #" ).repeated (level) + " " ;
4200
+ new_text = QStringLiteral (" #" ).repeated (level) + " " ;
4201
4201
}
4202
4202
cursor.insertText (new_text);
4203
4203
}
0 commit comments