From 5d2e584d2fc930e8a364e7e13bc500e00a2de131 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 28 Sep 2017 16:22:35 +0300 Subject: [PATCH] Improving for embedded man page. Use bullet list where possible. --HG-- branch : feature --- .../valentina/dialogs/dialoglayoutsettings.cpp | 13 +++++++++++-- src/app/valentina/dialogs/dialogsavelayout.cpp | 16 +++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.cpp b/src/app/valentina/dialogs/dialoglayoutsettings.cpp index faa123c7a..92b1d2aae 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.cpp +++ b/src/app/valentina/dialogs/dialoglayoutsettings.cpp @@ -825,11 +825,20 @@ QString DialogLayoutSettings::MakeHelpTemplateList() QString out = "\n"; auto cntr = static_cast(PaperSizeTemplate::A0); - foreach(const auto& v, pageFormatNames) + for (int i = 0; i < pageFormatNames.size(); ++i) { if (cntr <= static_cast(PaperSizeTemplate::Roll44in))// Don't include custom template { - out += "\t"+v+" = "+ QString::number(cntr++)+"\n"; + out += "\t* "+pageFormatNames.at(i)+" = "+ QString::number(cntr++); + + if (i < pageFormatNames.size() - 1) + { + out += ",\n"; + } + else + { + out += ".\n"; + } } } return out; diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index 7c8815329..b6b2735b0 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -250,10 +250,20 @@ bool DialogSaveLayout::IsBinaryDXFFormat() const QString DialogSaveLayout::MakeHelpFormatList() { QString out("\n"); - foreach(auto& v, InitFormats()) + const auto formats = InitFormats(); + for(int i = 0; i < formats.size(); ++i) { - out += QLatin1String("\t") + v.first + QLatin1String(" = ") + QString::number(static_cast(v.second)) - + QLatin1String("\n"); + out += QLatin1String("\t* ") + formats.at(i).first + QLatin1String(" = ") + + QString::number(static_cast(formats.at(i).second)); + + if (i < formats.size() - 1) + { + out += QLatin1String(",\n"); + } + else + { + out += QLatin1String(".\n"); + } } return out; }