Rename KAbout to avoid conflicts with KDE4

r14.0.x
Timothy Pearson 12 years ago
parent 5075b3a008
commit 54e8e7815a

@ -29,13 +29,13 @@
#include <tqstringlist.h> #include <tqstringlist.h>
TQString TQString
KAboutPerson::name() const TDEAboutPerson::name() const
{ {
return TQString::fromUtf8(mName); return TQString::fromUtf8(mName);
} }
TQString TQString
KAboutPerson::task() const TDEAboutPerson::task() const
{ {
if (mTask && *mTask) if (mTask && *mTask)
return i18n(mTask); return i18n(mTask);
@ -44,32 +44,32 @@ KAboutPerson::task() const
} }
TQString TQString
KAboutPerson::emailAddress() const TDEAboutPerson::emailAddress() const
{ {
return TQString::fromUtf8(mEmailAddress); return TQString::fromUtf8(mEmailAddress);
} }
TQString TQString
KAboutPerson::webAddress() const TDEAboutPerson::webAddress() const
{ {
return TQString::fromUtf8(mWebAddress); return TQString::fromUtf8(mWebAddress);
} }
KAboutTranslator::KAboutTranslator(const TQString & name, TDEAboutTranslator::TDEAboutTranslator(const TQString & name,
const TQString & emailAddress) const TQString & emailAddress)
{ {
mName=name; mName=name;
mEmail=emailAddress; mEmail=emailAddress;
} }
TQString KAboutTranslator::name() const TQString TDEAboutTranslator::name() const
{ {
return mName; return mName;
} }
TQString KAboutTranslator::emailAddress() const TQString TDEAboutTranslator::emailAddress() const
{ {
return mEmail; return mEmail;
} }
@ -138,14 +138,14 @@ void
TDEAboutData::addAuthor( const char *name, const char *task, TDEAboutData::addAuthor( const char *name, const char *task,
const char *emailAddress, const char *webAddress ) const char *emailAddress, const char *webAddress )
{ {
mAuthorList.append(KAboutPerson(name,task,emailAddress,webAddress)); mAuthorList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
} }
void void
TDEAboutData::addCredit( const char *name, const char *task, TDEAboutData::addCredit( const char *name, const char *task,
const char *emailAddress, const char *webAddress ) const char *emailAddress, const char *webAddress )
{ {
mCreditList.append(KAboutPerson(name,task,emailAddress,webAddress)); mCreditList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
} }
void void
@ -295,22 +295,22 @@ TDEAboutData::bugAddress() const
return TQString::fromLatin1(mBugEmailAddress); return TQString::fromLatin1(mBugEmailAddress);
} }
const TQValueList<KAboutPerson> const TQValueList<TDEAboutPerson>
TDEAboutData::authors() const TDEAboutData::authors() const
{ {
return mAuthorList; return mAuthorList;
} }
const TQValueList<KAboutPerson> const TQValueList<TDEAboutPerson>
TDEAboutData::credits() const TDEAboutData::credits() const
{ {
return mCreditList; return mCreditList;
} }
const TQValueList<KAboutTranslator> const TQValueList<TDEAboutTranslator>
TDEAboutData::translators() const TDEAboutData::translators() const
{ {
TQValueList<KAboutTranslator> personList; TQValueList<TDEAboutTranslator> personList;
if(d->translatorName == 0) if(d->translatorName == 0)
return personList; return personList;
@ -359,9 +359,9 @@ TDEAboutData::translators() const
TQString name=*nit; TQString name=*nit;
#if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000 #if [[[TQT_VERSION IS DEPRECATED]]] < 0x040000
personList.append(KAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace())); personList.append(TDEAboutTranslator(name.stripWhiteSpace(), email.stripWhiteSpace()));
#else #else
personList.append(KAboutTranslator(name.trimmed(), email.trimmed())); personList.append(TDEAboutTranslator(name.trimmed(), email.trimmed()));
#endif #endif
} }

@ -37,7 +37,7 @@
#ifndef _KABOUTDATA_H_ #ifndef _KABOUTDATA_H_
#define _KABOUTDATA_H_ #define _KABOUTDATA_H_
class KAboutPersonPrivate; class TDEAboutPersonPrivate;
class TDEAboutDataPrivate; class TDEAboutDataPrivate;
/** /**
@ -59,7 +59,7 @@ class TDEAboutDataPrivate;
* "joe.user@host.org", 0); * "joe.user@host.org", 0);
* TDECmdLineArgs::init(argc, argv, &about); * TDECmdLineArgs::init(argc, argv, &about);
*/ */
class TDECORE_EXPORT KAboutPerson class TDECORE_EXPORT TDEAboutPerson
{ {
public: public:
/** /**
@ -75,7 +75,7 @@ public:
* *
* @param webAddress Home page of the person. * @param webAddress Home page of the person.
*/ */
KAboutPerson( const char *name, const char *task, TDEAboutPerson( const char *name, const char *task,
const char *emailAddress, const char *webAddress ) const char *emailAddress, const char *webAddress )
{ {
mName = name; mName = name;
@ -87,7 +87,7 @@ public:
* @internal * @internal
* Don't use. Required by TQValueList * Don't use. Required by TQValueList
*/ */
KAboutPerson() {} TDEAboutPerson() {}
/** /**
* The person's name * The person's name
@ -123,10 +123,10 @@ private:
const char *mEmailAddress; const char *mEmailAddress;
const char *mWebAddress; const char *mWebAddress;
KAboutPersonPrivate *d; TDEAboutPersonPrivate *d;
}; };
class KAboutTranslatorPrivate; class TDEAboutTranslatorPrivate;
/** /**
* This structure is used to store information about a translator. * This structure is used to store information about a translator.
* It can store the translator's name and an email address. * It can store the translator's name and an email address.
@ -134,12 +134,12 @@ class KAboutTranslatorPrivate;
* but it can be used elsewhere as well. * but it can be used elsewhere as well.
* Normally you should at least define the translator's name. * Normally you should at least define the translator's name.
* *
* It's not possible to use KAboutPerson for this, because * It's not possible to use TDEAboutPerson for this, because
* KAboutPerson stores internally only const char* pointers, but the * TDEAboutPerson stores internally only const char* pointers, but the
* translator information is generated dynamically from the translation * translator information is generated dynamically from the translation
* of a dummy string. * of a dummy string.
*/ */
class TDECORE_EXPORT KAboutTranslator class TDECORE_EXPORT TDEAboutTranslator
{ {
public: public:
/** /**
@ -149,7 +149,7 @@ public:
* *
* @param emailAddress The email address of the person. * @param emailAddress The email address of the person.
*/ */
KAboutTranslator(const TQString & name=TQString(), TDEAboutTranslator(const TQString & name=TQString(),
const TQString & emailAddress=TQString()); const TQString & emailAddress=TQString());
/** /**
@ -169,7 +169,7 @@ public:
private: private:
TQString mName; TQString mName;
TQString mEmail; TQString mEmail;
KAboutTranslatorPrivate* d; TDEAboutTranslatorPrivate* d;
}; };
@ -177,10 +177,10 @@ private:
* This class is used to store information about a program. It can store * This class is used to store information about a program. It can store
* such values as version number, program name, home page, email address * such values as version number, program name, home page, email address
* for bug reporting, multiple authors and contributors * for bug reporting, multiple authors and contributors
* (using KAboutPerson), license and copyright information. * (using TDEAboutPerson), license and copyright information.
* *
* Currently, the values set here are shown by the "About" box * Currently, the values set here are shown by the "About" box
* (see KAboutDialog), used by the bug report dialog (see KBugReport), * (see TDEAboutDialog), used by the bug report dialog (see KBugReport),
* and by the help shown on command line (see TDECmdLineArgs). * and by the help shown on command line (see TDECmdLineArgs).
* *
* @short Holds information needed by the "About" box and other * @short Holds information needed by the "About" box and other
@ -326,7 +326,7 @@ class TDECORE_EXPORT TDEAboutData
* *
* @param name the name of the translator * @param name the name of the translator
* @param emailAddress the email address of the translator * @param emailAddress the email address of the translator
* @see KAboutTranslator * @see TDEAboutTranslator
*/ */
void setTranslator(const char* name, const char* emailAddress); void setTranslator(const char* name, const char* emailAddress);
@ -509,19 +509,19 @@ class TDECORE_EXPORT TDEAboutData
* Returns a list of authors. * Returns a list of authors.
* @return author information (list of persons). * @return author information (list of persons).
*/ */
const TQValueList<KAboutPerson> authors() const; const TQValueList<TDEAboutPerson> authors() const;
/** /**
* Returns a list of persons who contributed. * Returns a list of persons who contributed.
* @return credit information (list of persons). * @return credit information (list of persons).
*/ */
const TQValueList<KAboutPerson> credits() const; const TQValueList<TDEAboutPerson> credits() const;
/** /**
* Returns a list of translators. * Returns a list of translators.
* @return translators information (list of persons) * @return translators information (list of persons)
*/ */
const TQValueList<KAboutTranslator> translators() const; const TQValueList<TDEAboutTranslator> translators() const;
/** /**
* Returns a message about the translation team. * Returns a message about the translation team.
@ -560,8 +560,8 @@ class TDECORE_EXPORT TDEAboutData
const char *mOtherText; const char *mOtherText;
const char *mHomepageAddress; const char *mHomepageAddress;
const char *mBugEmailAddress; const char *mBugEmailAddress;
TQValueList<KAboutPerson> mAuthorList; TQValueList<TDEAboutPerson> mAuthorList;
TQValueList<KAboutPerson> mCreditList; TQValueList<TDEAboutPerson> mCreditList;
const char *mLicenseText; const char *mLicenseText;
TDEAboutDataPrivate *d; TDEAboutDataPrivate *d;

@ -632,10 +632,10 @@ TDECmdLineArgs::parseAllArgs()
} else if ( ::qstrcmp( option, "author") == 0 ) { } else if ( ::qstrcmp( option, "author") == 0 ) {
enable_i18n(); enable_i18n();
if ( about ) { if ( about ) {
const TQValueList<KAboutPerson> authors = about->authors(); const TQValueList<TDEAboutPerson> authors = about->authors();
if ( !authors.isEmpty() ) { if ( !authors.isEmpty() ) {
TQString authorlist; TQString authorlist;
for (TQValueList<KAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) { for (TQValueList<TDEAboutPerson>::ConstIterator it = authors.begin(); it != authors.end(); ++it ) {
TQString email; TQString email;
if ( !(*it).emailAddress().isEmpty() ) if ( !(*it).emailAddress().isEmpty() )
email = " <" + (*it).emailAddress() + ">"; email = " <" + (*it).emailAddress() + ">";

Loading…
Cancel
Save