1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

WebPage: Don't write JS console messages to standard output

There is now support for web inspector, so this is not needed
anymore.
This commit is contained in:
David Rosca 2015-08-30 14:46:23 +02:00
parent eec26c9af4
commit 32ea932654
2 changed files with 0 additions and 25 deletions

View File

@ -68,8 +68,6 @@
#include <QCheckBox>
#include <QWebChannel>
#include <iostream>
QString WebPage::s_lastUploadLocation = QDir::homePath();
QUrl WebPage::s_lastUnsupportedUrl;
QTime WebPage::s_lastUnsupportedUrlTime;
@ -1207,28 +1205,6 @@ void WebPage::javaScriptAlert(const QUrl &securityOrigin, const QString &msg)
#endif
}
void WebPage::javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID)
{
switch (level) {
case InfoMessageLevel:
std::cout << "I";
break;
case WarningMessageLevel:
std::cout << "W";
break;
case ErrorMessageLevel:
std::cout << "E";
break;
default:
break;
}
std::cout << " " << lineNumber << ": " << message.toStdString() << " (" << sourceID.toStdString() << ")" << std::endl;
}
void WebPage::setJavaScriptEnabled(bool enabled)
{
#if QTWEBENGINE_DISABLED

View File

@ -60,7 +60,6 @@ public:
bool javaScriptPrompt(const QUrl &securityOrigin, const QString &msg, const QString &defaultValue, QString* result) Q_DECL_OVERRIDE;
bool javaScriptConfirm(const QUrl &securityOrigin, const QString &msg) Q_DECL_OVERRIDE;
void javaScriptAlert(const QUrl &securityOrigin, const QString &msg) Q_DECL_OVERRIDE;
void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID);
void setJavaScriptEnabled(bool enabled);