apply clang-format

This commit is contained in:
Axel Kohlmeyer
2024-07-17 23:18:03 -04:00
parent 7c804f7843
commit 1d1bf669f6
5 changed files with 59 additions and 56 deletions

View File

@ -138,8 +138,7 @@ void ChartWindow::quit()
void ChartWindow::reset_zoom()
{
int choice = columns->currentData().toInt();
if ((choice >= 0) && (choice < charts.size()))
charts[choice]->reset_zoom();
if ((choice >= 0) && (choice < charts.size())) charts[choice]->reset_zoom();
}
void ChartWindow::stop_run()

View File

@ -885,8 +885,9 @@ void LammpsGui::logupdate()
else
slideshow->hide();
} else {
slideshow->setWindowTitle(
QString("LAMMPS-GUI - Slide Show - %1 - Run %2").arg(current_file).arg(run_counter));
slideshow->setWindowTitle(QString("LAMMPS-GUI - Slide Show - %1 - Run %2")
.arg(current_file)
.arg(run_counter));
if (QSettings().value("viewslide", true).toBool()) slideshow->show();
}
slideshow->add_image(imagefile);
@ -1254,7 +1255,8 @@ void LammpsGui::help()
msg.setWindowTitle("LAMMPS-GUI Quick Help");
msg.setWindowIcon(QIcon(":/icons/lammps-icon-128x128.png"));
msg.setText("<div>This is LAMMPS-GUI version " LAMMPS_GUI_VERSION "</div>");
msg.setInformativeText("<p>LAMMPS-GUI is a graphical text editor that is customized for "
msg.setInformativeText(
"<p>LAMMPS-GUI is a graphical text editor that is customized for "
"editing LAMMPS input files and linked to the LAMMPS "
"library and thus can run LAMMPS directly using the contents of the "
"text buffer as input. It can retrieve and display information from "

View File

@ -30,7 +30,8 @@
#include <QString>
#include <QTextStream>
const QString LogWindow::yaml_regex = QStringLiteral("^(keywords:.*$|data:$|---$|\\.\\.\\.$| - \\[.*\\]$)");
const QString LogWindow::yaml_regex =
QStringLiteral("^(keywords:.*$|data:$|---$|\\.\\.\\.$| - \\[.*\\]$)");
LogWindow::LogWindow(const QString &_filename, QWidget *parent) :
QPlainTextEdit(parent), filename(_filename)

View File

@ -93,7 +93,7 @@ void Preferences::accept()
// store selected accelerator
QList<QRadioButton *> allButtons = tabWidget->findChildren<QRadioButton *>();
for (auto & allButton : allButtons) {
for (auto &allButton : allButtons) {
if (allButton->isChecked()) {
if (allButton->objectName() == "none")
settings->setValue("accelerator", QString::number(AcceleratorTab::None));

View File

@ -94,7 +94,8 @@ bool StdCapture::EndCapture()
buf[bytesRead] = 0;
m_captured += buf;
} else if (bytesRead < 0) {
fd_blocked = ((errno == EAGAIN) || (errno == EWOULDBLOCK) || (errno == EINTR)) && (maxwait > 0);
fd_blocked =
((errno == EAGAIN) || (errno == EWOULDBLOCK) || (errno == EINTR)) && (maxwait > 0);
if (fd_blocked) std::this_thread::sleep_for(std::chrono::milliseconds(10));
--maxwait;