<commit_before>#include <QVariant>
#include <QSettings>
#include <QGuiApplication>
#include <QScreen>
#include <QFont>
#include <QPalette>
#include <QTimer>
#include <QIcon>
#include <QRegExp>
#ifdef QT_WIDGETS_LIB
#include <QStyle>
#include <QStyleFactory>
#include <QApplication>
#include <QWidget>
#endif
#include <QFile>
#include <QFileSystemWatcher>

#include <stdlib.h>

#include <lthemeengine/lthemeengine.h>
#include "lthemeengineplatformtheme.h"
#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) && !defined(QT_NO_DBUS)
#include <private/qdbusmenubar_p.h>
#endif
#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
#include <QDBusArgument>
#include <private/qdbustrayicon_p.h>
#endif



Q_LOGGING_CATEGORY(llthemeengine, "lthemeengine")

//QT_QPA_PLATFORMTHEME=lthemeengine

lthemeenginePlatformTheme::lthemeenginePlatformTheme(){
  if(QGuiApplication::desktopSettingsAware()){
    readSettings();
    QMetaObject::invokeMethod(this, "applySettings", Qt::QueuedConnection);
#ifdef QT_WIDGETS_LIB
    QMetaObject::invokeMethod(this, "createFSWatcher", Qt::QueuedConnection);
#endif
    QGuiApplication::setFont(m_generalFont);
    }
  qCDebug(llthemeengine) << "using lthemeengine plugin";
#ifdef QT_WIDGETS_LIB
  if(!QStyleFactory::keys().contains("lthemeengine-style"))
    qCCritical(llthemeengine) << "unable to find lthemeengine proxy style";
#endif
}

lthemeenginePlatformTheme::~lthemeenginePlatformTheme(){
  if(m_customPalette)
    delete m_customPalette;
}

#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) && !defined(QT_NO_DBUS)
QPlatformMenuBar *lthemeenginePlatformTheme::createPlatformMenuBar() const{
  if(m_checkDBusGlobalMenu){
    QDBusConnection conn = QDBusConnection::sessionBus();
    m_dbusGlobalMenuAvailable = conn.interface()->isServiceRegistered("com.canonical.AppMenu.Registrar");
    qCDebug(llthemeengine) << "D-Bus global menu:" << (m_dbusGlobalMenuAvailable ? "yes" : "no");
    }
  return (m_dbusGlobalMenuAvailable ? new QDBusMenuBar() : nullptr);
}<commit_msg>Turn of some stdout messages within the Qt theme plugin.<commit_after>#include <QVariant>
#include <QSettings>
#include <QGuiApplication>
#include <QScreen>
#include <QFont>
#include <QPalette>
#include <QTimer>
#include <QIcon>
#include <QRegExp>
#ifdef QT_WIDGETS_LIB
#include <QStyle>
#include <QStyleFactory>
#include <QApplication>
#include <QWidget>
#endif
#include <QFile>
#include <QFileSystemWatcher>

#include <stdlib.h>

#include <lthemeengine/lthemeengine.h>
#include "lthemeengineplatformtheme.h"
#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) && !defined(QT_NO_DBUS)
#include <private/qdbusmenubar_p.h>
#endif
#if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON)
#include <QDBusArgument>
#include <private/qdbustrayicon_p.h>
#endif



Q_LOGGING_CATEGORY(llthemeengine, "lthemeengine")

//QT_QPA_PLATFORMTHEME=lthemeengine

lthemeenginePlatformTheme::lthemeenginePlatformTheme(){
  if(QGuiApplication::desktopSettingsAware()){
    readSettings();
    QMetaObject::invokeMethod(this, "applySettings", Qt::QueuedConnection);
#ifdef QT_WIDGETS_LIB
    QMetaObject::invokeMethod(this, "createFSWatcher", Qt::QueuedConnection);
#endif
    QGuiApplication::setFont(m_generalFont);
    }
  //qCDebug(llthemeengine) << "using lthemeengine plugin";
#ifdef QT_WIDGETS_LIB
  if(!QStyleFactory::keys().contains("lthemeengine-style"))
    qCCritical(llthemeengine) << "unable to find lthemeengine proxy style";
#endif
}

lthemeenginePlatformTheme::~lthemeenginePlatformTheme(){
  if(m_customPalette)
    delete m_customPalette;
}

#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) && !defined(QT_NO_DBUS)
QPlatformMenuBar *lthemeenginePlatformTheme::createPlatformMenuBar() const{
  if(m_checkDBusGlobalMenu){
    QDBusConnection conn = QDBusConnection::sessionBus();
    m_dbusGlobalMenuAvailable = conn.interface()->isServiceRegistered("com.canonical.AppMenu.Registrar");
    //qCDebug(llthemeengine) << "D-Bus global menu:" << (m_dbusGlobalMenuAvailable ? "yes" : "no");
    }
  return (m_dbusGlobalMenuAvailable ? new QDBusMenuBar() : nullptr);
}
{'fraction_non_alphanumeric': 0.1319358816276202, 'fraction_numerical': 0.002959309494451295, 'mean_word_length': 7.914285714285715, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4445983', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1423, 'n_words': 245}