1 /* 2 This file is part of the KDE project 3 SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org> 4 SPDX-FileCopyrightText: 1999-2005 David Faure <faure@kde.org> 5 6 SPDX-License-Identifier: LGPL-2.0-or-later 7 */ 8 9 #ifndef _KPARTS_PARTBASE_P_H 10 #define _KPARTS_PARTBASE_P_H 11 12 #include "partbase.h" 13 14 #if KPARTS_BUILD_DEPRECATED_SINCE(5, 77) 15 #include <KAboutData> 16 #endif 17 18 namespace KParts 19 { 20 class PartBasePrivate 21 { 22 public: Q_DECLARE_PUBLIC(PartBase)23 Q_DECLARE_PUBLIC(PartBase) 24 25 PartBasePrivate(PartBase *qq) 26 : q_ptr(qq) 27 , m_pluginLoadingMode(PartBase::LoadPlugins) 28 , m_pluginInterfaceVersion(0) 29 , m_obj(nullptr) 30 #if KPARTS_BUILD_DEPRECATED_SINCE(5, 77) 31 , m_componentData(KAboutData::applicationData()) 32 #endif 33 { 34 } 35 ~PartBasePrivate()36 virtual ~PartBasePrivate() 37 { 38 } 39 40 #if KPARTS_BUILD_DEPRECATED_SINCE(5, 77) 41 // allows the KPart-subclasses to catch in its overridden method 42 // the deprecated setting of KAboutData and update its KPluginMetaData to that setComponentData(const KAboutData & componentData)43 virtual void setComponentData(const KAboutData &componentData) 44 { 45 m_componentData = componentData; 46 } componentData()47 const KAboutData &componentData() const 48 { 49 return m_componentData; 50 } 51 #endif 52 53 PartBase *q_ptr; 54 PartBase::PluginLoadingMode m_pluginLoadingMode; 55 int m_pluginInterfaceVersion; 56 QObject *m_obj; 57 58 #if KPARTS_BUILD_DEPRECATED_SINCE(5, 77) 59 private: 60 KAboutData m_componentData; 61 #endif 62 }; 63 64 } // namespace 65 66 #endif 67