From fa9b2130f43547be7e4698b8d95a23155c5d3ee1 Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Fri, 26 Jan 2024 13:52:47 -0500 Subject: Use QStringLiteral in some places This should provide a light performance improvement as the QString is built at compile time, with the generated data being stored in the read-only segment of the built object file. --- src/activitypub/apattachment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/activitypub/apattachment.cpp') diff --git a/src/activitypub/apattachment.cpp b/src/activitypub/apattachment.cpp index 342ea21..b5c82ce 100644 --- a/src/activitypub/apattachment.cpp +++ b/src/activitypub/apattachment.cpp @@ -11,7 +11,7 @@ APAttachment::APAttachment(APAttachmentFields fields) { } QString APAttachment::get_html_render(HtmlRenderDetails info) { - QString html(get_html_template("apattachment")); + QString html(get_html_template(QStringLiteral("apattachment"))); if (not path_url.isEmpty()) { html.replace("{{path}}", path_url); @@ -59,7 +59,7 @@ QString APAttachmentList::get_html_render(HtmlRenderDetails render_info) { int i = 1; for (APAttachment attachment : *this) { - QString item_html(get_html_template("apattachmentlist_item")); + QString item_html(get_html_template(QStringLiteral("apattachmentlist_item"))); item_html.replace("{{id}}", QString::number(i)); item_html.replace("{{attachment}}", attachment.get_html_render(render_info)); -- cgit v1.2.3-54-g00ecf