diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-22 19:58:33 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-22 19:58:33 -0600 |
commit | e4de7e2686ddbd20a6bef471d2ea57fcefd58532 (patch) | |
tree | 5e1f0132426a228f8aef2803d000ce1d1bb7617f /src | |
parent | 35b5bf688e0a6eff51db9cfcf348fd3d96661b26 (diff) | |
download | piklab-e4de7e2686ddbd20a6bef471d2ea57fcefd58532.tar.gz piklab-e4de7e2686ddbd20a6bef471d2ea57fcefd58532.zip |
Rename KInstance and KAboutData to avoid conflicts with KDE4
Diffstat (limited to 'src')
-rw-r--r-- | src/common/global/about.cpp | 4 | ||||
-rw-r--r-- | src/common/global/about.h | 4 | ||||
-rw-r--r-- | src/common/nokde/nokde_kaboutdata.cpp | 74 | ||||
-rw-r--r-- | src/common/nokde/nokde_kaboutdata.h | 18 | ||||
-rw-r--r-- | src/common/nokde/nokde_kcmdlineargs.cpp | 14 | ||||
-rw-r--r-- | src/common/nokde/nokde_kcmdlineargs.h | 18 | ||||
-rw-r--r-- | src/libgui/likeback.cpp | 10 | ||||
-rw-r--r-- | src/libgui/likeback.h | 8 |
8 files changed, 75 insertions, 75 deletions
diff --git a/src/common/global/about.cpp b/src/common/global/about.cpp index cd470b4..e895f60 100644 --- a/src/common/global/about.cpp +++ b/src/common/global/about.cpp @@ -41,7 +41,7 @@ const KCmdLineOptions *Piklab::OptionList::ptr() const } //----------------------------------------------------------------------------- -void Piklab::init(KAboutData *about, int argc, char **argv, bool gui, const KCmdLineOptions *options) +void Piklab::init(TDEAboutData *about, int argc, char **argv, bool gui, const KCmdLineOptions *options) { Q_ASSERT(about); #if defined(NO_KDE) @@ -72,7 +72,7 @@ void Piklab::init(KAboutData *about, int argc, char **argv, bool gui, const KCmd //--------------------------------------------------------------------------- Piklab::AboutData::AboutData(const char *executable, const char *name, const char *description) - : KAboutData(executable, name, VERSION, description, KAboutData::License_GPL, + : TDEAboutData(executable, name, VERSION, description, TDEAboutData::License_GPL, "(c) 2005-2007 Nicolas Hadacek\n(c) 2002-2005 Alain Gibaud\n(c) 2003-2004 Stephen Landamore\n(c) 2005 Lorenz Möenlechner and Matthias Kranz\n(c) 2001-2005 Craig Franklin", 0, URLS[Homepage], URLS[BugReport]) { diff --git a/src/common/global/about.h b/src/common/global/about.h index 4d53914..adfa86b 100644 --- a/src/common/global/about.h +++ b/src/common/global/about.h @@ -29,10 +29,10 @@ private: //--------------------------------------------------------------------------- enum UrlType { Homepage = 0, Support, BugReport, Nb_UrlTypes }; extern const char * const URLS[Nb_UrlTypes]; -extern void init(KAboutData *about, int argc, char **argv, bool gui, const KCmdLineOptions *options); +extern void init(TDEAboutData *about, int argc, char **argv, bool gui, const KCmdLineOptions *options); //--------------------------------------------------------------------------- -class AboutData : public KAboutData +class AboutData : public TDEAboutData { public: AboutData(const char *executable, const char *name, const char *description); diff --git a/src/common/nokde/nokde_kaboutdata.cpp b/src/common/nokde/nokde_kaboutdata.cpp index 4bcb504..fe8ab22 100644 --- a/src/common/nokde/nokde_kaboutdata.cpp +++ b/src/common/nokde/nokde_kaboutdata.cpp @@ -74,16 +74,16 @@ TQString KAboutTranslator::emailAddress() const return mEmail; } -class KAboutDataPrivate +class TDEAboutDataPrivate { public: - KAboutDataPrivate() + TDEAboutDataPrivate() : translatorName("_: NAME OF TRANSLATORS\nYour names") , translatorEmail("_: EMAIL OF TRANSLATORS\nYour emails") , productName(0) // , programLogo(0) {} - ~KAboutDataPrivate() + ~TDEAboutDataPrivate() { // delete programLogo; } @@ -95,7 +95,7 @@ public: -KAboutData::KAboutData( const char *appName, +TDEAboutData::TDEAboutData( const char *appName, const char *programName, const char *version, const char *shortDescription, @@ -115,7 +115,7 @@ KAboutData::KAboutData( const char *appName, mBugEmailAddress( bugsEmailAddress ), mLicenseText (0) { - d = new KAboutDataPrivate; + d = new TDEAboutDataPrivate; if( appName ) { const char *p = strrchr(appName, '/'); @@ -127,7 +127,7 @@ KAboutData::KAboutData( const char *appName, mAppName = 0; } -KAboutData::~KAboutData() +TDEAboutData::~TDEAboutData() { if (mLicenseKey == License_File) delete [] mLicenseText; @@ -135,108 +135,108 @@ KAboutData::~KAboutData() } void -KAboutData::addAuthor( const char *name, const char *task, +TDEAboutData::addAuthor( const char *name, const char *task, const char *emailAddress, const char *webAddress ) { mAuthorList.append(KAboutPerson(name,task,emailAddress,webAddress)); } void -KAboutData::addCredit( const char *name, const char *task, +TDEAboutData::addCredit( const char *name, const char *task, const char *emailAddress, const char *webAddress ) { mCreditList.append(KAboutPerson(name,task,emailAddress,webAddress)); } void -KAboutData::setTranslator( const char *name, const char *emailAddress) +TDEAboutData::setTranslator( const char *name, const char *emailAddress) { d->translatorName=name; d->translatorEmail=emailAddress; } void -KAboutData::setLicenseText( const char *licenseText ) +TDEAboutData::setLicenseText( const char *licenseText ) { mLicenseText = licenseText; mLicenseKey = License_Custom; } void -KAboutData::setLicenseTextFile( const TQString &file ) +TDEAboutData::setLicenseTextFile( const TQString &file ) { mLicenseText = tqstrdup(TQFile::encodeName(file)); mLicenseKey = License_File; } void -KAboutData::setAppName( const char *appName ) +TDEAboutData::setAppName( const char *appName ) { mAppName = appName; } void -KAboutData::setProgramName( const char* programName ) +TDEAboutData::setProgramName( const char* programName ) { mProgramName = programName; } void -KAboutData::setVersion( const char* version ) +TDEAboutData::setVersion( const char* version ) { mVersion = version; } void -KAboutData::setShortDescription( const char *shortDescription ) +TDEAboutData::setShortDescription( const char *shortDescription ) { mShortDescription = shortDescription; } void -KAboutData::setLicense( LicenseKey licenseKey) +TDEAboutData::setLicense( LicenseKey licenseKey) { mLicenseKey = licenseKey; } void -KAboutData::setCopyrightStatement( const char *copyrightStatement ) +TDEAboutData::setCopyrightStatement( const char *copyrightStatement ) { mCopyrightStatement = copyrightStatement; } void -KAboutData::setOtherText( const char *otherText ) +TDEAboutData::setOtherText( const char *otherText ) { mOtherText = otherText; } void -KAboutData::setHomepage( const char *homepage ) +TDEAboutData::setHomepage( const char *homepage ) { mHomepageAddress = homepage; } void -KAboutData::setBugAddress( const char *bugAddress ) +TDEAboutData::setBugAddress( const char *bugAddress ) { mBugEmailAddress = bugAddress; } void -KAboutData::setProductName( const char *productName ) +TDEAboutData::setProductName( const char *productName ) { d->productName = productName; } const char * -KAboutData::appName() const +TDEAboutData::appName() const { return mAppName; } const char * -KAboutData::productName() const +TDEAboutData::productName() const { if (d->productName) return d->productName; @@ -245,7 +245,7 @@ KAboutData::productName() const } TQString -KAboutData::programName() const +TDEAboutData::programName() const { if (mProgramName && *mProgramName) return i18n(mProgramName); @@ -254,13 +254,13 @@ KAboutData::programName() const } /* TQImage -KAboutData::programLogo() const +TDEAboutData::programLogo() const { return d->programLogo ? (*d->programLogo) : TQImage(); } void -KAboutData::setProgramLogo(const TQImage& image) +TDEAboutData::setProgramLogo(const TQImage& image) { if (!d->programLogo) d->programLogo = new TQImage( image ); @@ -269,13 +269,13 @@ KAboutData::setProgramLogo(const TQImage& image) } */ TQString -KAboutData::version() const +TDEAboutData::version() const { return TQString::fromLatin1(mVersion); } TQString -KAboutData::shortDescription() const +TDEAboutData::shortDescription() const { if (mShortDescription && *mShortDescription) return i18n(mShortDescription); @@ -284,31 +284,31 @@ KAboutData::shortDescription() const } TQString -KAboutData::homepage() const +TDEAboutData::homepage() const { return TQString::fromLatin1(mHomepageAddress); } TQString -KAboutData::bugAddress() const +TDEAboutData::bugAddress() const { return TQString::fromLatin1(mBugEmailAddress); } const TQValueList<KAboutPerson> -KAboutData::authors() const +TDEAboutData::authors() const { return mAuthorList; } const TQValueList<KAboutPerson> -KAboutData::credits() const +TDEAboutData::credits() const { return mCreditList; } const TQValueList<KAboutTranslator> -KAboutData::translators() const +TDEAboutData::translators() const { TQValueList<KAboutTranslator> personList; @@ -369,7 +369,7 @@ KAboutData::translators() const } TQString -KAboutData::aboutTranslationTeam() +TDEAboutData::aboutTranslationTeam() { return i18n("replace this with information about your translation team", "<p>TDE is translated into many languages thanks to the work " @@ -377,7 +377,7 @@ KAboutData::aboutTranslationTeam() } TQString -KAboutData::otherText() const +TDEAboutData::otherText() const { if (mOtherText && *mOtherText) return i18n(mOtherText); @@ -387,7 +387,7 @@ KAboutData::otherText() const TQString -KAboutData::license() const +TDEAboutData::license() const { TQString result; if (!copyrightStatement().isEmpty()) @@ -458,7 +458,7 @@ KAboutData::license() const } TQString -KAboutData::copyrightStatement() const +TDEAboutData::copyrightStatement() const { if (mCopyrightStatement && *mCopyrightStatement) return i18n(mCopyrightStatement); diff --git a/src/common/nokde/nokde_kaboutdata.h b/src/common/nokde/nokde_kaboutdata.h index aec6575..731a29f 100644 --- a/src/common/nokde/nokde_kaboutdata.h +++ b/src/common/nokde/nokde_kaboutdata.h @@ -38,20 +38,20 @@ #define _KABOUTDATA_H_ class KAboutPersonPrivate; -class KAboutDataPrivate; +class TDEAboutDataPrivate; /** * This structure is used to store information about a person or developer. * It can store the person's name, a task, an email address and a * link to a home page. This class is intended for use in the - * KAboutData class, but it can be used elsewhere as well. + * TDEAboutData class, but it can be used elsewhere as well. * Normally you should at least define the person's name. * * Example Usage within a main(): * - * KAboutData about("khello", I18N_NOOP("KHello"), "0.1", + * TDEAboutData about("khello", I18N_NOOP("KHello"), "0.1", * I18N_NOOP("A TDE version of Hello, world!"), - * KAboutData::License_LGPL, + * TDEAboutData::License_LGPL, * I18N_NOOP("Copyright (c) 2003 Developer")); * * about.addAuthor("Joe Developer", I18N_NOOP("developer"), "joe@host.com", 0); @@ -130,7 +130,7 @@ class KAboutTranslatorPrivate; /** * This structure is used to store information about a translator. * It can store the translator's name and an email address. - * This class is intended for use in the KAboutData class, + * This class is intended for use in the TDEAboutData class, * but it can be used elsewhere as well. * Normally you should at least define the translator's name. * @@ -187,7 +187,7 @@ private: * classes. * @author Espen Sand (espen@kde.org), David Faure (faure@kde.org) */ -class TDECORE_EXPORT KAboutData +class TDECORE_EXPORT TDEAboutData { public: /** @@ -243,7 +243,7 @@ class TDECORE_EXPORT KAboutData * This defaults to the kde.org bug system. * */ - KAboutData( const char *appName, + TDEAboutData( const char *appName, const char *programName, const char *version, const char *shortDescription = 0, @@ -254,7 +254,7 @@ class TDECORE_EXPORT KAboutData const char *bugsEmailAddress = "submit@bugs.kde.org" ); - ~KAboutData(); + ~TDEAboutData(); /** * Defines an author. You can call this function as many times you @@ -564,7 +564,7 @@ class TDECORE_EXPORT KAboutData TQValueList<KAboutPerson> mCreditList; const char *mLicenseText; - KAboutDataPrivate *d; + TDEAboutDataPrivate *d; }; #endif diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index f80ecf5..dea5d6a 100644 --- a/src/common/nokde/nokde_kcmdlineargs.cpp +++ b/src/common/nokde/nokde_kcmdlineargs.cpp @@ -132,7 +132,7 @@ int TDECmdLineArgs::argc = 0; char **TDECmdLineArgs::argv = 0; char *TDECmdLineArgs::mCwd = 0; //static KStaticDeleter <char> mCwdd; -const KAboutData *TDECmdLineArgs::about = 0; +const TDEAboutData *TDECmdLineArgs::about = 0; bool TDECmdLineArgs::parsed = false; bool TDECmdLineArgs::ignoreUnknown = false; @@ -145,7 +145,7 @@ TDECmdLineArgs::init(int _argc, char **_argv, const char *_appname, const char* const char *_description, const char *_version, bool noKApp) { init(_argc, _argv, - new KAboutData(_appname, programName, _version, _description), + new TDEAboutData(_appname, programName, _version, _description), noKApp); } @@ -154,7 +154,7 @@ TDECmdLineArgs::init(int _argc, char **_argv, const char *_appname, const char *_description, const char *_version, bool noKApp) { init(_argc, _argv, - new KAboutData(_appname, _appname, _version, _description), + new TDEAboutData(_appname, _appname, _version, _description), noKApp); } @@ -162,12 +162,12 @@ void TDECmdLineArgs::initIgnore(int _argc, char **_argv, const char *_appname ) { init(_argc, _argv, - new KAboutData(_appname, _appname, "unknown", "TDE Application", false)); + new TDEAboutData(_appname, _appname, "unknown", "TDE Application", false)); ignoreUnknown = true; } void -TDECmdLineArgs::init(const KAboutData* ab) +TDECmdLineArgs::init(const TDEAboutData* ab) { char **_argv = (char **) malloc(sizeof(char *)); _argv[0] = (char *) ab->appName(); @@ -176,7 +176,7 @@ TDECmdLineArgs::init(const KAboutData* ab) void -TDECmdLineArgs::init(int _argc, char **_argv, const KAboutData *_about, bool /*noKApp*/) +TDECmdLineArgs::init(int _argc, char **_argv, const TDEAboutData *_about, bool /*noKApp*/) { argc = _argc; argv = _argv; @@ -761,7 +761,7 @@ TDECmdLineArgs::enable_i18n() return; if (!KGlobal::_instance) { - KInstance *instance = new KInstance(about); + TDEInstance *instance = new TDEInstance(about); (void) instance->config(); // Don't delete instance! }*/ diff --git a/src/common/nokde/nokde_kcmdlineargs.h b/src/common/nokde/nokde_kcmdlineargs.h index 7f3c958..8622f10 100644 --- a/src/common/nokde/nokde_kcmdlineargs.h +++ b/src/common/nokde/nokde_kcmdlineargs.h @@ -83,7 +83,7 @@ class TDEApplication; class KUniqueApplication; class KCmdLineParsedOptions; class KCmdLineParsedArgs; -class KAboutData; +class TDEAboutData; class TDECmdLineArgsPrivate; /** @@ -274,17 +274,17 @@ public: * Initialize class. * * This function should be called as the very first thing in - * your application. It uses KAboutData to replace some of the + * your application. It uses TDEAboutData to replace some of the * arguments that would otherwise be required. * * @param _argc As passed to @p main(...). * @param _argv As passed to @p main(...). - * @param about A KAboutData object describing your program. + * @param about A TDEAboutData object describing your program. * @param noKApp Set this true to not add commandline options for * TQApplication / TDEApplication */ static void init(int _argc, char **_argv, - const KAboutData *about, bool noKApp = false); + const TDEAboutData *about, bool noKApp = false); /** * Initialize Class @@ -292,14 +292,14 @@ public: * This function should be called as the very first thing in your * application. This method will rarely be used, since it doesn't * provide any argument parsing. It does provide access to the - * KAboutData information. + * TDEAboutData information. * This method is exactly the same as calling - * init(0,0, const KAboutData *about, true). + * init(0,0, const TDEAboutData *about, true). * * @param about the about data. - * \see KAboutData + * \see TDEAboutData */ - static void init(const KAboutData *about); + static void init(const TDEAboutData *about); /** * Add options to your application. @@ -685,7 +685,7 @@ private: bool isTQt; static TDECmdLineArgsList *argsList; // All options. - static const KAboutData *about; + static const TDEAboutData *about; static int argc; // The original argc static char **argv; // The original argv diff --git a/src/libgui/likeback.cpp b/src/libgui/likeback.cpp index a012ec2..6740322 100644 --- a/src/libgui/likeback.cpp +++ b/src/libgui/likeback.cpp @@ -196,7 +196,7 @@ TQ_UINT16 LikeBack::s_hostPort = 16; int LikeBack::s_disabledCount = 0; LikeBack* LikeBack::s_instance = 0; KConfig* LikeBack::s_config = 0; -KAboutData* LikeBack::s_about = 0; +TDEAboutData* LikeBack::s_about = 0; LikeBack* LikeBack::instance() { @@ -223,7 +223,7 @@ TQ_UINT16 LikeBack::hostPort() return s_hostPort; } -KAboutData* LikeBack::about() +TDEAboutData* LikeBack::about() { return s_about; } @@ -403,7 +403,7 @@ void LikeBack::askEMail() setEmailAddress(email); } -// FIXME: Should be moved to KAboutData? Cigogne will also need it. +// FIXME: Should be moved to TDEAboutData? Cigogne will also need it. bool LikeBack::isDevelopmentVersion(const TQString &version) { TQString theVersion = (version.isEmpty() ? s_about->version() : version); @@ -415,7 +415,7 @@ bool LikeBack::isDevelopmentVersion(const TQString &version) theVersion.find("cvs", /*index=*/0, /*caseSensitive=*/false) != -1; } -void LikeBack::init(KConfig* config, KAboutData* about, Button buttons) +void LikeBack::init(KConfig* config, TDEAboutData* about, Button buttons) { s_config = config; s_about = about; @@ -432,7 +432,7 @@ void LikeBack::init(bool isDevelopmentVersion, Button buttons) if (s_config == 0) s_config = kapp->config(); if (s_about == 0) - s_about = (KAboutData*) kapp->aboutData(); + s_about = (TDEAboutData*) kapp->aboutData(); if (LikeBack::userWantToParticipate() && isDevelopmentVersion) new LikeBack(buttons); diff --git a/src/libgui/likeback.h b/src/libgui/likeback.h index e8db1d1..95046c3 100644 --- a/src/libgui/likeback.h +++ b/src/libgui/likeback.h @@ -28,7 +28,7 @@ class TQToolButton; class TQPushButton; class KProcess; class KConfig; -class KAboutData; +class TDEAboutData; /** * @author S�astien Laot <slaout@linux62.org> @@ -64,9 +64,9 @@ class LikeBack : public TQWidget static bool isDevelopmentVersion(const TQString &version = TQString()); /// << @Returns true if version is an alpha/beta/rc/svn/cvs version. Use kapp->aboutData()->version is @p version is empty static void init(Button buttons = AllButtons); /// << Initialize the LikeBack system: enable it if the application version is a development one. static void init(bool isDevelopmentVersion, Button buttons = AllButtons); /// << Initialize the LikeBack system: enable it if @p isDevelopmentVersion is true. - static void init(KConfig* config, KAboutData* about, Button buttons = AllButtons); + static void init(KConfig* config, TDEAboutData* about, Button buttons = AllButtons); static TQString activeWindowPath(); - static KAboutData* about(); + static TDEAboutData* about(); public slots: void iLike(); void iDoNotLike(); @@ -97,7 +97,7 @@ class LikeBack : public TQWidget static LikeBack *s_instance; static int s_disabledCount; static KConfig *s_config; - static KAboutData *s_about; + static TDEAboutData *s_about; }; class LikeBackDialog : public KDialog |