[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2023-09-12 13:03:02 +00:00
committed by WandererFan
parent a207d11fa4
commit e92ed45df9
435 changed files with 2669 additions and 2645 deletions

View File

@@ -78,7 +78,7 @@ public:
add_varargs_method("registerServerFirewall",
&Module::registerServerFirewall,
"registerServerFirewall(callable(string)) -- Register a firewall.");
initialize("This module is the Web module.");// register with Python
initialize("This module is the Web module."); // register with Python
}
private:
@@ -175,7 +175,7 @@ PyObject* initModule()
return Base::Interpreter().addModule(new Module);
}
}// namespace Web
} // namespace Web
/* Python entry */

View File

@@ -38,6 +38,6 @@
#include <QCoreApplication>
#include <QTcpSocket>
#endif//_PreComp_
#endif //_PreComp_
#endif

View File

@@ -101,6 +101,6 @@ private:
Py::Object module;
};
}// namespace Web
} // namespace Web
#endif// Web_SERVER_H
#endif // Web_SERVER_H

View File

@@ -74,7 +74,7 @@ public:
&Module::openBrowser,
"insert(string)\n"
"Load a local (X)HTML file.");
initialize("This module is the WebGui module.");// register with Python
initialize("This module is the WebGui module."); // register with Python
}
private:
@@ -194,7 +194,7 @@ public:
}
};
}// namespace WebGui
} // namespace WebGui
/* Python entry */

View File

@@ -85,7 +85,7 @@ enum WebAction
{
OpenLink = 0,
OpenLinkInNewWindow = 1,
ViewSource = 2// QWebView doesn't have a ViewSource option
ViewSource = 2 // QWebView doesn't have a ViewSource option
};
#ifdef QTWEBENGINE
@@ -163,7 +163,7 @@ class BrowserViewPy: public Py::PythonExtension<BrowserViewPy>
{
public:
using BaseType = Py::PythonExtension<BrowserViewPy>;
static void init_type();// announce properties and methods
static void init_type(); // announce properties and methods
explicit BrowserViewPy(BrowserView* view);
~BrowserViewPy() override;
@@ -302,7 +302,7 @@ Py::Object BrowserViewPy::url(const Py::Tuple& args)
return Py::String(url.toString().toStdString());
}
}// namespace WebGui
} // namespace WebGui
/**
* Constructs a WebView widget which can be zoomed with Ctrl+Mousewheel
@@ -390,7 +390,7 @@ void WebView::contextMenuEvent(QContextMenuEvent* event)
return;
}
#if defined(QTWEBENGINE)
else {// for view source
else { // for view source
// QWebEngine caches standardContextMenu, guard so we only add signalmapper once
static bool firstRun = true;
if (firstRun) {
@@ -522,7 +522,7 @@ BrowserView::BrowserView(QWidget* parent)
this,
SLOT(onUnsupportedContent(QNetworkReply*)));
#else// QTWEBENGINE
#else // QTWEBENGINE
// QWebEngine doesn't support direct access to network
// nor rendering access
QWebEngineProfile* profile = view->page()->profile();
@@ -566,7 +566,7 @@ BrowserView::BrowserView(QWidget* parent)
BrowserView::~BrowserView()
{
#ifdef QTWEBENGINE
delete interceptLinks;// cleanup not handled implicitly
delete interceptLinks; // cleanup not handled implicitly
#endif
delete view;
}
@@ -599,12 +599,12 @@ void BrowserView::urlFilter(const QUrl& url)
else if (scheme == QString::fromLatin1("exthttp")) {
exturl.setScheme(QString::fromLatin1("http"));
QDesktopServices::openUrl(exturl);
stop();// stop qwebengine, should do nothing in qwebkit at this point
stop(); // stop qwebengine, should do nothing in qwebkit at this point
}
else if (scheme == QString::fromLatin1("exthttps")) {
exturl.setScheme(QString::fromLatin1("https"));
QDesktopServices::openUrl(exturl);
stop();// stop qwebengine, should do nothing in qwebkit at this point
stop(); // stop qwebengine, should do nothing in qwebkit at this point
}
// run scripts if not from somewhere else!
if ((scheme.size() < 2 || scheme == QString::fromLatin1("file")) && host.isEmpty()) {
@@ -612,7 +612,7 @@ void BrowserView::urlFilter(const QUrl& url)
if (fi.exists()) {
QString ext = fi.completeSuffix();
if (ext == QString::fromLatin1("py")) {
stop();// stop qwebengine, should do nothing in qwebkit at this point
stop(); // stop qwebengine, should do nothing in qwebkit at this point
try {
if (!q.isEmpty()) {

View File

@@ -159,6 +159,6 @@ protected:
void keyPressEvent(QKeyEvent* keyEvt) override;
};
}// namespace WebGui
} // namespace WebGui
#endif// WEBGUI_BROWSERVIEW_H
#endif // WEBGUI_BROWSERVIEW_H

View File

@@ -59,6 +59,6 @@ private:
QTimer m_timer;
};
}// namespace WebGui
} // namespace WebGui
#endif// WEBGUI_COOKIEJAR_H
#endif // WEBGUI_COOKIEJAR_H

View File

@@ -51,6 +51,6 @@
#include <QTextStream>
#include <QUrl>
#endif//_PreComp_
#endif //_PreComp_
#endif// WEBGUI_PRECOMPILED_H
#endif // WEBGUI_PRECOMPILED_H

View File

@@ -32,7 +32,7 @@
using namespace WebGui;
#if 0// needed for Qt's lupdate utility
#if 0 // needed for Qt's lupdate utility
qApp->translate("Workbench", "Navigation");
#endif

View File

@@ -54,7 +54,7 @@ protected:
Gui::DockWindowItems* setupDockWindows() const override;
};// namespace WebGui
}; // namespace WebGui
}// namespace WebGui
#endif// WEB_WORKBENCH_H
} // namespace WebGui
#endif // WEB_WORKBENCH_H

View File

@@ -44,4 +44,4 @@
#endif
#endif
#endif// WEB_GLOBAL_H
#endif // WEB_GLOBAL_H