Skip to content

Commit 678c433

Browse files
committed
fmt
1 parent 297ec75 commit 678c433

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

src/CodeEditor/PythonEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ void PythonEditor::readSettings()
550550
const QByteArray geometry = settings.value("geometry", QByteArray()).toByteArray();
551551
if (geometry.isEmpty())
552552
{
553-
const QRect availableGeometry = this->screen()->availableGeometry();;
553+
const QRect availableGeometry = this->screen()->availableGeometry();
554554
resize(availableGeometry.width() / 3, availableGeometry.height() / 2);
555555
move((availableGeometry.width() - width()) / 2,
556556
(availableGeometry.height() - height()) / 2);

src/PackageManager.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,7 @@ void PackageManager::refreshInstalledPackagesList()
290290
m_pythonProcess->setArguments(arguments);
291291

292292
QEventLoop loop;
293-
connect(
294-
m_pythonProcess,
295-
&QProcess::finished,
296-
&loop,
297-
&QEventLoop::quit);
293+
connect(m_pythonProcess, &QProcess::finished, &loop, &QEventLoop::quit);
298294
connect(m_pythonProcess, &QProcess::errorOccurred, &loop, &QEventLoop::quit);
299295
m_pythonProcess->start(QIODevice::ReadOnly);
300296
if (m_pythonProcess->state() != QProcess::ProcessState::Starting &&
@@ -313,8 +309,7 @@ void PackageManager::refreshInstalledPackagesList()
313309
return;
314310
}
315311

316-
const QString output =
317-
QString::fromUtf8(m_pythonProcess->readAllStandardOutput());
312+
const QString output = QString::fromUtf8(m_pythonProcess->readAllStandardOutput());
318313

319314
const QStringList lines = output.split("\n");
320315

@@ -334,7 +329,7 @@ void PackageManager::refreshInstalledPackagesList()
334329
const QString &currentLine = lines[i];
335330

336331
// Do it this way to avoid an extra allocation
337-
const QRegularExpressionMatch match = regex.match(currentLine);
332+
const QRegularExpressionMatch match = regex.match(currentLine);
338333
if (match.hasMatch())
339334
{
340335
for (int j = 1; j < 3; ++j)
@@ -350,8 +345,7 @@ void PackageManager::refreshInstalledPackagesList()
350345
}
351346
}
352347

353-
const QString errorOutput =
354-
QString::fromUtf8(m_pythonProcess->readAllStandardError());
348+
const QString errorOutput = QString::fromUtf8(m_pythonProcess->readAllStandardError());
355349

356350
if (!errorOutput.isEmpty())
357351
{

src/PythonConfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
#include <QDir>
2323
#include <QMessageBox>
2424
#include <QProcess>
25+
#include <QStringView>
2526
#include <QVector>
2627
#include <QtGlobal>
27-
#include <QStringView>
2828

2929
#if !defined(USE_EMBEDDED_MODULES) && defined(Q_OS_WINDOWS)
3030
static QString WindowsBundledSitePackagesPath()

src/PythonHighlighter.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,13 @@ bool PythonHighlighter::matchMultiLine(const QString &text, const HighlightingRu
204204
else
205205
{
206206
QRegularExpressionMatch match = rule.pattern.match(text);
207-
if (match.hasMatch()) {
207+
if (match.hasMatch())
208+
{
208209
start = match.capturedStart(0);
209210
add = match.capturedLength(0);
210-
} else {
211+
}
212+
else
213+
{
211214
start = -1;
212215
add = 0;
213216
}

src/PythonHighlighter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#ifndef PYTHON_HIGHLIGHTER_H
2323
#define PYTHON_HIGHLIGHTER_H
2424

25-
#include <QSyntaxHighlighter>
2625
#include <QRegularExpression>
26+
#include <QSyntaxHighlighter>
2727

2828
class ColorScheme;
2929

src/PythonInterpreter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ static py::dict CreateGlobals()
4444
{
4545
py::dict globals;
4646
globals["__name__"] = "__main__";
47-
// TODO Someday we should require pybind11 > 2.6 and use py::detail::ensure_builtins_in_globals ?
47+
// TODO Someday we should require pybind11 > 2.6 and use py::detail::ensure_builtins_in_globals
48+
// ?
4849
globals["__builtins__"] = PyEval_GetBuiltins();
4950
return globals;
5051
}

0 commit comments

Comments
 (0)