From 8b97201efff90dc5cfe958bed83d8db7d80626a7 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Sat, 7 Oct 2023 15:32:56 -0400 Subject: [PATCH] Fix formatting Signed-off-by: Geoff Hutchison --- avogadro/core/coordinateblockgenerator.cpp | 5 ++--- avogadro/core/coordinateblockgenerator.h | 2 +- .../coordinateeditor/coordinateeditordialog.cpp | 10 ++++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/avogadro/core/coordinateblockgenerator.cpp b/avogadro/core/coordinateblockgenerator.cpp index d7ec38f3c8..0a40039b4f 100644 --- a/avogadro/core/coordinateblockgenerator.cpp +++ b/avogadro/core/coordinateblockgenerator.cpp @@ -144,8 +144,7 @@ std::string CoordinateBlockGenerator::generateCoordinateBlock() m_stream << std::left << std::setw(elementSymbolWidth) << symbol; break; case 'L': - m_stream << std::left << symbol - << elementCounts[atomicNumber] << " "; + m_stream << std::left << symbol << elementCounts[atomicNumber] << " "; break; case 'N': m_stream << std::left << std::setw(elementNameWidth) << name; @@ -203,4 +202,4 @@ std::string CoordinateBlockGenerator::generateCoordinateBlock() return m_stream.str(); } -} // namespace Avogadro +} // namespace Avogadro::Core diff --git a/avogadro/core/coordinateblockgenerator.h b/avogadro/core/coordinateblockgenerator.h index 0f5f8cea8f..44f0f266de 100644 --- a/avogadro/core/coordinateblockgenerator.h +++ b/avogadro/core/coordinateblockgenerator.h @@ -47,7 +47,7 @@ class AVOGADROCORE_EXPORT CoordinateBlockGenerator * about each atom in the coordinate block. * - @c #: Atom index (one-based index) * - @c Z: Atomic number (e.g. "6" for carbon) - * - @c L: Atomic label (e.g., "C1" for first carbon, "H2" for second hydrogen") + * - @c L: Atomic label (e.g., "C1" for first carbon)") * - @c G: GAMESS-styled Atomic number (e.g. "6.0" for carbon) * - @c S: Element symbol (e.g. "C" for carbon) * - @c N: Element name (e.g. "Carbon") diff --git a/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.cpp b/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.cpp index 085676426f..f73260d420 100644 --- a/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.cpp +++ b/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.cpp @@ -42,9 +42,9 @@ #define FORMAT_DEBUG(x) #endif // ENABLE_FORMAT_DEBUG -using Avogadro::QtGui::Molecule; -using Avogadro::Core::Elements; using Avogadro::Vector3; +using Avogadro::Core::Elements; +using Avogadro::QtGui::Molecule; namespace { @@ -96,7 +96,7 @@ struct AtomStruct Vector3 pos; }; -} // end anon namespace +} // namespace namespace Avogadro::QtPlugins { @@ -387,7 +387,6 @@ void CoordinateEditorDialog::validateInputWorker() case 'L': { // Validate label (symbol + number) - QString cleanToken(tokenCursor.selectedText().toLower()); if (!cleanToken.isEmpty()) cleanToken.replace(0, 1, cleanToken[0].toUpper()); @@ -406,7 +405,6 @@ void CoordinateEditorDialog::validateInputWorker() else m_ui->text->markValid(tokenCursor, tr("Element symbol.")); break; - } case '#': { @@ -845,4 +843,4 @@ void CoordinateEditorDialog::clearClicked() m_ui->text->document()->clear(); } -} // namespace Avogadro +} // namespace Avogadro::QtPlugins