diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-22 20:23:50 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-22 20:23:50 -0600 |
commit | 3a044decb0a5d7be822c888b2d5374573d7df96e (patch) | |
tree | ddf4681e0233c25203fc927596aa7b3bdb5f2efa /lib | |
parent | 5c0390ebaa2be82d8684af5a6bc2b16740f4cc1b (diff) | |
download | tdevelop-3a044decb0a5d7be822c888b2d5374573d7df96e.tar.gz tdevelop-3a044decb0a5d7be822c888b2d5374573d7df96e.zip |
Rename KInstance and KAboutData to avoid conflicts with KDE4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/interfaces/kdevgenericfactory.h | 14 | ||||
-rw-r--r-- | lib/interfaces/kdevplugin.h | 2 | ||||
-rw-r--r-- | lib/interfaces/kdevplugininfo.cpp | 24 | ||||
-rw-r--r-- | lib/interfaces/kdevplugininfo.h | 6 |
4 files changed, 23 insertions, 23 deletions
diff --git a/lib/interfaces/kdevgenericfactory.h b/lib/interfaces/kdevgenericfactory.h index c705e9cd..24e3204a 100644 --- a/lib/interfaces/kdevgenericfactory.h +++ b/lib/interfaces/kdevgenericfactory.h @@ -39,7 +39,7 @@ Data should be a const static object. This way it complies with the requirements for data objecs of KDevGenericFactory constructor. <b>Important:</b><br> -There is no need to create @ref KAboutData objects. It is more useful to create +There is no need to create @ref TDEAboutData objects. It is more useful to create a static const @ref KDevPluginInfo object which can be used also in the constructor of a plugin. @@ -59,33 +59,33 @@ DummyPlugin::DummyPlugin(TQObject *parent, const char *name, const TQStringList In the example above the duplication of information is avoided as same @ref KDevPluginInfo objects are used for plugin and for plugin factory. This is possible because @ref KDevPluginInfo -class has an operator to cast @ref KDevPluginInfo to @ref KAboutData. +class has an operator to cast @ref KDevPluginInfo to @ref TDEAboutData. */ template <class T, class ParentType = TQObject> class KDevGenericFactory: public KGenericFactory<T, ParentType> { public: /**Constructor. - @param data A reference to KAboutData with an information about the plugin. + @param data A reference to TDEAboutData with an information about the plugin. Data should have: - plugin name as an application name; - untranslated plugin generic name as a product name; - license type number. . data object should live as long as factory lives.*/ - KDevGenericFactory(KAboutData *data) + KDevGenericFactory(TDEAboutData *data) :KGenericFactory<T, ParentType>(data->appName()), aboutData(data) { } /**Creates an instance.*/ - KInstance *createInstance() + TDEInstance *createInstance() { - return new KInstance(aboutData); + return new TDEInstance(aboutData); } private: - KAboutData *aboutData; + TDEAboutData *aboutData; }; diff --git a/lib/interfaces/kdevplugin.h b/lib/interfaces/kdevplugin.h index fed92e69..b0cb3a8f 100644 --- a/lib/interfaces/kdevplugin.h +++ b/lib/interfaces/kdevplugin.h @@ -125,7 +125,7 @@ public: virtual ~KDevPlugin(); /**Provides an information about the plugin. - @return KAboutData object which was initialized in the constructor.*/ + @return TDEAboutData object which was initialized in the constructor.*/ const KDevPluginInfo* info(); /**@return A reference to the toplevel widget.*/ diff --git a/lib/interfaces/kdevplugininfo.cpp b/lib/interfaces/kdevplugininfo.cpp index 81d58902..4af7fb8e 100644 --- a/lib/interfaces/kdevplugininfo.cpp +++ b/lib/interfaces/kdevplugininfo.cpp @@ -42,7 +42,7 @@ struct KDevPluginInfo::Private { TQValueList<KAboutPerson> m_authors; TQValueList<KAboutPerson> m_credits; - KAboutData *m_data; + TDEAboutData *m_data; }; @@ -67,21 +67,21 @@ KDevPluginInfo::KDevPluginInfo(const TQString &pluginName) TQString lic = offer->property("X-TDevelop-Plugin-License").toString(); if (lic == "GPL") - d->m_licenseType = KAboutData::License_GPL; + d->m_licenseType = TDEAboutData::License_GPL; else if (lic == "LGPL") - d->m_licenseType = KAboutData::License_LGPL; + d->m_licenseType = TDEAboutData::License_LGPL; else if (lic == "BSD") - d->m_licenseType = KAboutData::License_BSD; + d->m_licenseType = TDEAboutData::License_BSD; else if (lic == "QPL") - d->m_licenseType = KAboutData::License_QPL; + d->m_licenseType = TDEAboutData::License_QPL; else if (lic == "Artistic") - d->m_licenseType = KAboutData::License_Artistic; + d->m_licenseType = TDEAboutData::License_Artistic; else if (lic == "Custom") - d->m_licenseType = KAboutData::License_Custom; + d->m_licenseType = TDEAboutData::License_Custom; else - d->m_licenseType = KAboutData::License_Unknown; + d->m_licenseType = TDEAboutData::License_Unknown; - d->m_data = new KAboutData(d->m_pluginName.ascii(), d->m_rawGenericName.ascii(), "1", 0, d->m_licenseType); + d->m_data = new TDEAboutData(d->m_pluginName.ascii(), d->m_rawGenericName.ascii(), "1", 0, d->m_licenseType); } else kdDebug() << "Unable to load information for plugin: " << pluginName @@ -89,7 +89,7 @@ KDevPluginInfo::KDevPluginInfo(const TQString &pluginName) } -KDevPluginInfo::operator KAboutData *() const +KDevPluginInfo::operator TDEAboutData *() const { return d->m_data; } @@ -127,8 +127,8 @@ int KDevPluginInfo::licenseType() const TQString KDevPluginInfo::license() const { KDevPluginInfo &info = *const_cast<KDevPluginInfo*>(this); -// return KAboutData(info).license(); - KAboutData *data = info; +// return TDEAboutData(info).license(); + TDEAboutData *data = info; return data->license(); } diff --git a/lib/interfaces/kdevplugininfo.h b/lib/interfaces/kdevplugininfo.h index 3ade0e46..8a3e172f 100644 --- a/lib/interfaces/kdevplugininfo.h +++ b/lib/interfaces/kdevplugininfo.h @@ -44,9 +44,9 @@ public: and the same as the location of plugin resource files.*/ KDevPluginInfo(const TQString &pluginName); - /**Casts KDevPluginInfo to KAboutData. Uses KDevPluginInfo::pluginName as KAboutData::appName, - KDevPluginInfo::rawGenericName as KAboutData::programName KDevPluginInfo::licenseType as KAboutData::licenseType. Other parameters are ignored.*/ - operator KAboutData*() const; + /**Casts KDevPluginInfo to TDEAboutData. Uses KDevPluginInfo::pluginName as TDEAboutData::appName, + KDevPluginInfo::rawGenericName as TDEAboutData::programName KDevPluginInfo::licenseType as TDEAboutData::licenseType. Other parameters are ignored.*/ + operator TDEAboutData*() const; /**@return A name of a plugin (always untranslated).*/ TQString pluginName() const; |