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
// notable exception of the KAboutData data
// notable exception of the TDEAboutData data
#include <kaboutdata.h>
#include <klocale.h>
KInstance* KDiff3PartFactory::s_instance = 0L;
KAboutData* KDiff3PartFactory::s_about = 0L;
TDEInstance* KDiff3PartFactory::s_instance = 0L;
TDEAboutData* KDiff3PartFactory::s_about = 0L;
KDiff3PartFactory::KDiff3PartFactory()
: KParts::Factory()
@ -284,13 +284,13 @@ KParts::Part* KDiff3PartFactory::createPartObject( TQWidget *parentWidget, const
return obj;
}
KInstance* KDiff3PartFactory::instance()
TDEInstance* KDiff3PartFactory::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_instance = new KInstance(s_about);
s_instance = new TDEInstance(s_about);
}
return s_instance;
}

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

@ -45,7 +45,7 @@ static TQString s_description;
static TQString s_appName;
static TQString s_version;
static TQString s_homepage;
static KAboutData* s_pAboutData;
static TDEAboutData* s_pAboutData;
#ifdef _WIN32
@ -372,7 +372,7 @@ void KMainWindow::slotAbout()
);
d.addTab(tb1,i18n("&About"));
std::list<KAboutData::AboutDataEntry>::iterator i;
std::list<TDEAboutData::AboutDataEntry>::iterator i;
TQString s2;
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();
}
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& copyright, int, const TQString& homepage, const TQString& email)
{
@ -859,16 +859,16 @@ KAboutData::KAboutData( const TQString& /*name*/, const TQString& appName, const
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) );
}
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) );
}
@ -896,7 +896,7 @@ TDECmdLineArgs* TDECmdLineArgs::parsedArgs() // static
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_argv = argv;

@ -325,13 +325,13 @@ struct KCmdLineOptions
#define KCmdLineLastOption {0,0,0}
class KAboutData
class TDEAboutData
{
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& 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 addCredit(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
enum { License_GPL };
@ -357,7 +357,7 @@ class TDECmdLineArgs
{
public:
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.
int count();
@ -450,10 +450,10 @@ namespace KIO
typedef TQProgressBar KProgress;
class KInstance : public TQObject
class TDEInstance : public TQObject
{
public:
KInstance(KAboutData*){}
TDEInstance(TDEAboutData*){}
};
namespace KParts
@ -486,7 +486,7 @@ namespace KParts
public:
ReadOnlyPart(){}
ReadOnlyPart(TQObject*,const TQCString&){}
void setInstance( KInstance* ){}
void setInstance( TDEInstance* ){}
TQString m_file;
};

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

Loading…
Cancel
Save