From da01fe178a627a1f3cbd8f674dc9aa23a86bf1b2 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 14 Jul 2022 11:54:32 +0200 Subject: [PATCH] plugin initialization moved to SkinnyNamespace.cpp --- support/SkinnyPlugin.cpp | 64 ---------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 support/SkinnyPlugin.cpp diff --git a/support/SkinnyPlugin.cpp b/support/SkinnyPlugin.cpp deleted file mode 100644 index 0b37eab7..00000000 --- a/support/SkinnyPlugin.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the 3-clause BSD License - *****************************************************************************/ - -#if defined( PLUGIN_PATH ) - -#include -#include - -#define STRINGIFY(x) #x -#define STRING(x) STRINGIFY(x) - -static int initPluginPath() -{ - const char env[] = "QT_PLUGIN_PATH"; - - QByteArray value = qgetenv( env ); - if ( !value.isEmpty() ) - { - if ( QChar( value.at( value.size() - 1 ) ) != QDir::listSeparator() ) - value += QDir::listSeparator().toLatin1(); - } - - value += STRING( PLUGIN_PATH ); - - qputenv( env, value ); - return 0; -} - -// some plugins are loaded before entering QCoreApplication -static bool pluginPath = initPluginPath(); - -#endif // PLUGIN_PATH - -#if defined( ENSURE_SKINS ) - -#include -#include -#include -#include -#include - -static void initSkins() -{ - if ( qskSkinManager->skinNames().isEmpty() ) - { - using namespace std; - - /* - To avoid having problems with not finding the skin plugins - we manually add them here. - */ - - qskSkinManager->registerFactory( "SquiekFactory", new QskSquiekSkinFactory() ); - qskSkinManager->registerFactory( "Material3Factory", new QskMaterial3SkinFactory() ); - - cout << "Couldn't find skin plugins, adding some manually." << endl; - } -} - -Q_COREAPP_STARTUP_FUNCTION( initSkins ) - -#endif // ENSURE_SKINS