Rename KInstance and KAboutData to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 046d6d18d5
commit fd7791939e

@ -250,12 +250,12 @@ bool KDiff3Part::saveFile()
// It's usually safe to leave the factory code alone.. with the // It's usually safe to leave the factory code alone.. with the
// notable exception of the KAboutData data // notable exception of the TDEAboutData data
#include <kaboutdata.h> #include <kaboutdata.h>
#include <klocale.h> #include <klocale.h>
KInstance* KDiff3PartFactory::s_instance = 0L; TDEInstance* KDiff3PartFactory::s_instance = 0L;
KAboutData* KDiff3PartFactory::s_about = 0L; TDEAboutData* KDiff3PartFactory::s_about = 0L;
KDiff3PartFactory::KDiff3PartFactory() KDiff3PartFactory::KDiff3PartFactory()
: KParts::Factory() : KParts::Factory()
@ -284,13 +284,13 @@ KParts::Part* KDiff3PartFactory::createPartObject( TQWidget *parentWidget, const
return obj; return obj;
} }
KInstance* KDiff3PartFactory::instance() TDEInstance* KDiff3PartFactory::instance()
{ {
if( !s_instance ) if( !s_instance )
{ {
s_about = new KAboutData("kdiff3part", I18N_NOOP("KDiff3Part"), VERSION); s_about = new TDEAboutData("kdiff3part", I18N_NOOP("KDiff3Part"), VERSION);
s_about->addAuthor("Joachim Eibl", 0, "joachim.eibl at gmx.de"); s_about->addAuthor("Joachim Eibl", 0, "joachim.eibl at gmx.de");
s_instance = new KInstance(s_about); s_instance = new TDEInstance(s_about);
} }
return s_instance; return s_instance;
} }

@ -79,8 +79,8 @@ private:
bool m_bIsShell; bool m_bIsShell;
}; };
class KInstance; class TDEInstance;
class KAboutData; class TDEAboutData;
class KDiff3PartFactory : public KParts::Factory class KDiff3PartFactory : public KParts::Factory
{ {
@ -92,11 +92,11 @@ public:
virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
TQObject *parent, const char *name, TQObject *parent, const char *name,
const char *classname, const TQStringList &args ); const char *classname, const TQStringList &args );
static KInstance* instance(); static TDEInstance* instance();
private: private:
static KInstance* s_instance; static TDEInstance* s_instance;
static KAboutData* s_about; static TDEAboutData* s_about;
}; };
#endif // _KDIFF3PART_H_ #endif // _KDIFF3PART_H_

@ -45,7 +45,7 @@ static TQString s_description;
static TQString s_appName; static TQString s_appName;
static TQString s_version; static TQString s_version;
static TQString s_homepage; static TQString s_homepage;
static KAboutData* s_pAboutData; static TDEAboutData* s_pAboutData;
#ifdef _WIN32 #ifdef _WIN32
@ -372,7 +372,7 @@ void KMainWindow::slotAbout()
); );
d.addTab(tb1,i18n("&About")); d.addTab(tb1,i18n("&About"));
std::list<KAboutData::AboutDataEntry>::iterator i; std::list<TDEAboutData::AboutDataEntry>::iterator i;
TQString s2; TQString s2;
for( i=s_pAboutData->m_authorList.begin(); i!=s_pAboutData->m_authorList.end(); ++i ) for( i=s_pAboutData->m_authorList.begin(); i!=s_pAboutData->m_authorList.end(); ++i )
@ -847,7 +847,7 @@ TQPixmap KIconLoader::loadIcon( const TQString&, int )
return TQPixmap(); return TQPixmap();
} }
KAboutData::KAboutData( const TQString& /*name*/, const TQString& appName, const TQString& version, TDEAboutData::TDEAboutData( const TQString& /*name*/, const TQString& appName, const TQString& version,
const TQString& description, int, const TQString& description, int,
const TQString& copyright, int, const TQString& homepage, const TQString& email) const TQString& copyright, int, const TQString& homepage, const TQString& email)
{ {
@ -859,16 +859,16 @@ KAboutData::KAboutData( const TQString& /*name*/, const TQString& appName, const
s_homepage = homepage; s_homepage = homepage;
} }
KAboutData::KAboutData( const TQString& /*name*/, const TQString& /*appName*/, const TQString& /*version*/ ) TDEAboutData::TDEAboutData( const TQString& /*name*/, const TQString& /*appName*/, const TQString& /*version*/ )
{ {
} }
void KAboutData::addAuthor(const char* name, const char* task, const char* email, const char* weblink) void TDEAboutData::addAuthor(const char* name, const char* task, const char* email, const char* weblink)
{ {
m_authorList.push_back( AboutDataEntry( name, task, email, weblink) ); m_authorList.push_back( AboutDataEntry( name, task, email, weblink) );
} }
void KAboutData::addCredit(const char* name, const char* task, const char* email, const char* weblink) void TDEAboutData::addCredit(const char* name, const char* task, const char* email, const char* weblink)
{ {
m_creditList.push_back( AboutDataEntry( name, task, email, weblink) ); m_creditList.push_back( AboutDataEntry( name, task, email, weblink) );
} }
@ -896,7 +896,7 @@ TDECmdLineArgs* TDECmdLineArgs::parsedArgs() // static
return &s_cmdLineArgs; return &s_cmdLineArgs;
} }
void TDECmdLineArgs::init( int argc, char**argv, KAboutData* pAboutData ) // static void TDECmdLineArgs::init( int argc, char**argv, TDEAboutData* pAboutData ) // static
{ {
s_argc = argc; s_argc = argc;
s_argv = argv; s_argv = argv;

@ -325,13 +325,13 @@ struct KCmdLineOptions
#define KCmdLineLastOption {0,0,0} #define KCmdLineLastOption {0,0,0}
class KAboutData class TDEAboutData
{ {
public: public:
KAboutData( const TQString& name, const TQString& appName, const TQString& version, TDEAboutData( const TQString& name, const TQString& appName, const TQString& version,
const TQString& description, int licence, const TQString& description, int licence,
const TQString& copyright, int w, const TQString& homepage, const TQString& email); const TQString& copyright, int w, const TQString& homepage, const TQString& email);
KAboutData( const TQString& name, const TQString& appName, const TQString& version ); TDEAboutData( const TQString& name, const TQString& appName, const TQString& version );
void addAuthor(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0); void addAuthor(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
void addCredit(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0); void addCredit(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
enum { License_GPL }; enum { License_GPL };
@ -357,7 +357,7 @@ class TDECmdLineArgs
{ {
public: public:
static TDECmdLineArgs* parsedArgs(); static TDECmdLineArgs* parsedArgs();
static void init( int argc, char**argv, KAboutData* ); static void init( int argc, char**argv, TDEAboutData* );
static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options. static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options.
int count(); int count();
@ -450,10 +450,10 @@ namespace KIO
typedef TQProgressBar KProgress; typedef TQProgressBar KProgress;
class KInstance : public TQObject class TDEInstance : public TQObject
{ {
public: public:
KInstance(KAboutData*){} TDEInstance(TDEAboutData*){}
}; };
namespace KParts namespace KParts
@ -486,7 +486,7 @@ namespace KParts
public: public:
ReadOnlyPart(){} ReadOnlyPart(){}
ReadOnlyPart(TQObject*,const TQCString&){} ReadOnlyPart(TQObject*,const TQCString&){}
void setInstance( KInstance* ){} void setInstance( TDEInstance* ){}
TQString m_file; TQString m_file;
}; };

@ -170,8 +170,8 @@ int main(int argc, char *argv[])
#endif #endif
//TQApplication::setColorSpec( TQApplication::ManyColor ); // Grab all 216 colors //TQApplication::setColorSpec( TQApplication::ManyColor ); // Grab all 216 colors
KAboutData aboutData( "kdiff3", I18N_NOOP("KDiff3"), TDEAboutData aboutData( "kdiff3", I18N_NOOP("KDiff3"),
VERSION, description, KAboutData::License_GPL, VERSION, description, TDEAboutData::License_GPL,
"(c) 2002-2007 Joachim Eibl", 0, "http://kdiff3.sourceforge.net/", "joachim.eibl" "@" "gmx.de"); "(c) 2002-2007 Joachim Eibl", 0, "http://kdiff3.sourceforge.net/", "joachim.eibl" "@" "gmx.de");
aboutData.addAuthor("Joachim Eibl",0, "joachim.eibl" "@" "gmx.de"); aboutData.addAuthor("Joachim Eibl",0, "joachim.eibl" "@" "gmx.de");
aboutData.addCredit("Eike Sauer", "Bugfixes, Debian package maintainer" ); aboutData.addCredit("Eike Sauer", "Bugfixes, Debian package maintainer" );

Loading…
Cancel
Save