diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-01-06 10:15:34 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-01-06 13:16:45 +0100 |
commit | 7f735c198cd5b5e1d7f205a6cbce44eeb15529eb (patch) | |
tree | 0ce9386c6377d2fd124606467addc4d16554783f /examples/designer/taskmenuextension/tictactoeplugin.cpp | |
parent | 13e5fa4526821cfc7e64efbab44021dc3589b924 (diff) |
Qt Designer: Use raw string literals for domXML functions in plugins
This improves readibility.
Change-Id: Id8cffc15ee7fae9cd4a5f51bbf778849b9774226
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'examples/designer/taskmenuextension/tictactoeplugin.cpp')
-rw-r--r-- | examples/designer/taskmenuextension/tictactoeplugin.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/examples/designer/taskmenuextension/tictactoeplugin.cpp b/examples/designer/taskmenuextension/tictactoeplugin.cpp index 724720ad5..45075fe62 100644 --- a/examples/designer/taskmenuextension/tictactoeplugin.cpp +++ b/examples/designer/taskmenuextension/tictactoeplugin.cpp @@ -129,19 +129,20 @@ void TicTacToePlugin::initialize(QDesignerFormEditorInterface *formEditor) QString TicTacToePlugin::domXml() const { - return QLatin1String("\ -<ui language=\"c++\">\ - <widget class=\"TicTacToe\" name=\"ticTacToe\"/>\ - <customwidgets>\ - <customwidget>\ - <class>TicTacToe</class>\ - <propertyspecifications>\ - <tooltip name=\"state\">Tic Tac Toe state</tooltip>\ - <stringpropertyspecification name=\"state\" notr=\"true\" type=\"singleline\"/>\ - </propertyspecifications>\ - </customwidget>\ - </customwidgets>\ -</ui>"); + return QLatin1String(R"( +<ui language="c++"> + <widget class="TicTacToe" name="ticTacToe"/> + <customwidgets> + <customwidget> + <class>TicTacToe</class> + <propertyspecifications> + <tooltip name="state">Tic Tac Toe state</tooltip> + <stringpropertyspecification name="state" notr="true" type="singleline"/> + </propertyspecifications> + </customwidget> + </customwidgets> +</ui> +)"); } //! [3] |