Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Qt6: use auto to paper over QStringRef vs QStringView

Halla Remptb5a9cc2d2202
diff --git a/plugins/assistants/Assistants/kis_assistant_tool.cc b/plugins/assistants/Assistants/kis_assistant_tool.cc
index dada63f59f..540599d7c7 100644
--- a/plugins/assistants/Assistants/kis_assistant_tool.cc
+++ b/plugins/assistants/Assistants/kis_assistant_tool.cc
@@ -1478,7 +1478,7 @@ void KisAssistantTool::loadAssistants()
if (assistant) {
// load custom shared assistant properties
if (xml.attributes().hasAttribute("useCustomColor")) {
- QStringRef useCustomColor = xml.attributes().value("useCustomColor");
+ auto useCustomColor = xml.attributes().value("useCustomColor");
bool usingColor = false;
if (useCustomColor.toString() == "1") {
@@ -1488,7 +1488,7 @@ void KisAssistantTool::loadAssistants()
}
if ( xml.attributes().hasAttribute("useCustomColor")) {
- QStringRef customColor = xml.attributes().value("customColor");
+ auto customColor = xml.attributes().value("customColor");
assistant->setAssistantCustomColor( KisDomUtils::qStringToQColor(customColor.toString()) );
}