diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-11-24 11:30:42 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-11-29 13:33:13 +0100 |
| commit | 12cfd8bc1fe621ade4ccc1e4999394966fcd945e (patch) | |
| tree | 3417aaae68efdf65d3d700945af65e78078c2d71 /sources/pyside6/plugins/designer/designercustomwidgets.cpp | |
| parent | 085cb301aeb18f182a93afc6ab52d6569b00f99b (diff) | |
Fix usages of QLatin1String (deprecation candidate)
Use QLatin1StringView or literals.
Task-number: PYSIDE-2537
Change-Id: I03cb9ae80dacd84da9e53648dd179ad79e9189b1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/plugins/designer/designercustomwidgets.cpp')
| -rw-r--r-- | sources/pyside6/plugins/designer/designercustomwidgets.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sources/pyside6/plugins/designer/designercustomwidgets.cpp b/sources/pyside6/plugins/designer/designercustomwidgets.cpp index 6491251b9..89a7e6f60 100644 --- a/sources/pyside6/plugins/designer/designercustomwidgets.cpp +++ b/sources/pyside6/plugins/designer/designercustomwidgets.cpp @@ -54,7 +54,7 @@ static QString pyStr(PyObject *o) static QString pyErrorMessage() { - QString result = QLatin1String("<error information not available>"); + QString result = "<error information not available>"_L1; PyObject *ptype = {}; PyObject *pvalue = {}; PyObject *ptraceback = {}; @@ -86,7 +86,7 @@ static bool runPyScript(const char *script, QString *errorMessage) { PyObject *main = PyImport_AddModule("__main__"); if (main == nullptr) { - *errorMessage = QLatin1String("Internal error: Cannot retrieve __main__"); + *errorMessage = "Internal error: Cannot retrieve __main__"_L1; return false; } PyObject *globalDictionary = PyModule_GetDict(main); @@ -117,8 +117,7 @@ static bool runPyScriptFile(const QString &fileName, QString *errorMessage) file.close(); const bool ok = runPyScript(script.constData(), errorMessage); if (!ok && !errorMessage->isEmpty()) { - errorMessage->prepend(QLatin1String("Error running ") + fileName - + QLatin1String(": ")); + errorMessage->prepend("Error running "_L1 + fileName + ": "_L1); } return ok; } |
