Skip to content

Commit

Permalink
Apply clang-format diff from GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew J. Milner <[email protected]>
  • Loading branch information
matterhorn103 committed Oct 24, 2024
1 parent 4e06ec3 commit 68d8a87
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion avogadro/molequeue/inputgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ bool InputGenerator::generateInput(const QJsonObject& options_,
m_errors << tr("Malformed file entry at index %1: Not an object.")
.arg(m_filenames.size());
} // end if/else file is JSON object
} // end foreach file
} // end foreach file
} else {
result = false;
m_errors << tr("'files' member not an array.");
Expand Down
2 changes: 1 addition & 1 deletion avogadro/qtgui/interfacescript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ bool InterfaceScript::generateInput(const QJsonObject& options_,
m_errors << tr("Malformed file entry at index %1: Not an object.")
.arg(m_filenames.size());
} // end if/else file is JSON object
} // end foreach file
} // end foreach file
} else {
result = false;
m_errors << tr("'files' member not an array.");
Expand Down
5 changes: 2 additions & 3 deletions avogadro/qtgui/richtextdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ namespace Avogadro::QtGui {

RichTextDelegate::RichTextDelegate(QObject* parent_)
: QStyledItemDelegate(parent_)
{
}
{}

RichTextDelegate::~RichTextDelegate() {};
RichTextDelegate::~RichTextDelegate(){};

QSize RichTextDelegate::sizeHint(const QStyleOptionViewItem& o,
const QModelIndex& index) const
Expand Down
8 changes: 4 additions & 4 deletions avogadro/qtgui/scriptloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ QMultiMap<QString, QString> ScriptLoader::scriptList(const QString& type)
}
}
} // "commands" JSON is array
} // document is json
} // plugin.json file exists
} // document is json
} // plugin.json file exists

continue;
} // end reading subdirectories with plugin.json
Expand All @@ -123,7 +123,7 @@ QMultiMap<QString, QString> ScriptLoader::scriptList(const QString& type)
fileList << filePath;
}
} // end dir.exists()
} // end for directory list
} // end for directory list

// go through the list of files to see if they're actually scripts
foreach (const QString& filePath, fileList) {
Expand All @@ -144,7 +144,7 @@ QMultiMap<QString, QString> ScriptLoader::scriptList(const QString& type)
} else // new entry
scriptList.insert(displayName, filePath);
} // run queryProgramName
} // foreach files
} // foreach files

return scriptList;
}
Expand Down
23 changes: 13 additions & 10 deletions avogadro/qtplugins/coordinateeditor/coordinateeditordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,19 @@ enum TokenType
static const QRegularExpression TOKEN_SEPARATOR("[\\s,;]+");
static const QRegularExpression VALID_TOKEN("[^\\s,;]+");
// These two need to be exact
static const QRegularExpression INT_CHECKER(QRegularExpression::anchoredPattern("(:?[+-])?\\d+"));
static const QRegularExpression DOUBLE_CHECKER(QRegularExpression::anchoredPattern("(:?[+-])?" // Leading sign
"(:?" // Must match one of the following:
"\\d*\\.\\d*" // Fractional part
"|" // or
"\\d+[Ee](:?[+-])?\\d+" // Exponential part
"|" // or
"\\d*\\.\\d*" // Fractional part and
"[Ee](:?[+-])?\\d+" // Exponential part
")"));
static const QRegularExpression INT_CHECKER(
QRegularExpression::anchoredPattern("(:?[+-])?\\d+"));
static const QRegularExpression DOUBLE_CHECKER(
QRegularExpression::anchoredPattern(
"(:?[+-])?" // Leading sign
"(:?" // Must match one of the following:
"\\d*\\.\\d*" // Fractional part
"|" // or
"\\d+[Ee](:?[+-])?\\d+" // Exponential part
"|" // or
"\\d*\\.\\d*" // Fractional part and
"[Ee](:?[+-])?\\d+" // Exponential part
")"));

struct AtomStruct
{
Expand Down

0 comments on commit 68d8a87

Please sign in to comment.