Paste P619

Masterwork From Distant Lands
ActivePublic

Authored by davidedmundson on Jul 15 2020, 10:27 PM.
diff --git a/shell/main.cpp b/shell/main.cpp
index c5e6a358e..20d849334 100644
--- a/shell/main.cpp
+++ b/shell/main.cpp
@@ -27,6 +27,7 @@
#include <QDBusConnection>
#include <QDBusMessage>
#include <QtQml/QQmlDebuggingEnabler>
+#include <QLoggingCategory>
#include <KAboutData>
#include <KQuickAddons/QtQuickSettings>
@@ -47,6 +48,18 @@
#include <QDir>
#include <QDBusConnectionInterface>
+static QLoggingCategory::CategoryFilter oldCategoryFilter;
+
+//
+void filterConnectionSyntaxWarning(QLoggingCategory *category)
+{
+ if (qstrcmp(category->categoryName(), "qt.qml.connections") == 0) {
+ category->setEnabled(QtWarningMsg, false);
+ } else if (oldCategoryFilter) {
+ oldCategoryFilter(category);
+ }
+}
+
int main(int argc, char *argv[])
{
if (qEnvironmentVariableIsSet("PLASMA_ENABLE_QML_DEBUG")) {
@@ -70,6 +83,9 @@ int main(int argc, char *argv[])
QQuickWindow::setDefaultAlphaBuffer(true);
+ oldCategoryFilter = QLoggingCategory::installFilter(filterConnectionSyntaxWarning);
+ qDebug() << "install " << (void*)oldCategoryFilter;
+
const bool qpaVariable = qEnvironmentVariableIsSet("QT_QPA_PLATFORM");
KWorkSpace::detectPlatform(argc, argv);
QApplication app(argc, argv);
davidedmundson edited the content of this paste. (Show Details)Jul 15 2020, 10:27 PM
davidedmundson changed the title of this paste from untitled to Masterwork From Distant Lands.