Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 4ede6a1bdb
commit c8fc7b9d45

@ -133,7 +133,7 @@ KDiff3App::KDiff3App(TQWidget* pParent, const char* name, KDiff3Part* pKDiff3Par
m_pOptionDialog->readOptions( isPart() ? m_pKDiff3Part->instance()->config() : kapp->config() ); m_pOptionDialog->readOptions( isPart() ? m_pKDiff3Part->instance()->config() : kapp->config() );
// Option handling: Only when pParent==0 (no parent) // Option handling: Only when pParent==0 (no parent)
KCmdLineArgs *args = isPart() ? 0 : KCmdLineArgs::parsedArgs(); TDECmdLineArgs *args = isPart() ? 0 : TDECmdLineArgs::parsedArgs();
if (args) if (args)
{ {

@ -883,7 +883,7 @@ void KAboutData::addCredit(const char* name, const char* task, const char* email
{ "+[File3]", I18N_NOOP("file3 to open"), 0 }, { "+[File3]", I18N_NOOP("file3 to open"), 0 },
*/ */
//////////////// ////////////////
static KCmdLineArgs s_cmdLineArgs; static TDECmdLineArgs s_cmdLineArgs;
static int s_argc; static int s_argc;
static char** s_argv; static char** s_argv;
static KCmdLineOptions* s_pOptions; static KCmdLineOptions* s_pOptions;
@ -891,38 +891,38 @@ static KCmdLineOptions* s_pOptions;
static std::vector<QCStringList> s_vOption; static std::vector<QCStringList> s_vOption;
static std::vector<const char*> s_vArg; static std::vector<const char*> s_vArg;
KCmdLineArgs* KCmdLineArgs::parsedArgs() // static TDECmdLineArgs* TDECmdLineArgs::parsedArgs() // static
{ {
return &s_cmdLineArgs; return &s_cmdLineArgs;
} }
void KCmdLineArgs::init( int argc, char**argv, KAboutData* pAboutData ) // static void TDECmdLineArgs::init( int argc, char**argv, KAboutData* pAboutData ) // static
{ {
s_argc = argc; s_argc = argc;
s_argv = argv; s_argv = argv;
s_pAboutData = pAboutData; s_pAboutData = pAboutData;
} }
void KCmdLineArgs::addCmdLineOptions( KCmdLineOptions* options ) // static void TDECmdLineArgs::addCmdLineOptions( KCmdLineOptions* options ) // static
{ {
s_pOptions = options; s_pOptions = options;
} }
int KCmdLineArgs::count() int TDECmdLineArgs::count()
{ {
return s_vArg.size(); return s_vArg.size();
} }
TQString KCmdLineArgs::arg(int idx) TQString TDECmdLineArgs::arg(int idx)
{ {
return TQString::fromLocal8Bit( s_vArg[idx] ); return TQString::fromLocal8Bit( s_vArg[idx] );
} }
void KCmdLineArgs::clear() void TDECmdLineArgs::clear()
{ {
} }
TQString KCmdLineArgs::getOption( const TQString& s ) TQString TDECmdLineArgs::getOption( const TQString& s )
{ {
// Find the option // Find the option
int j=0; int j=0;
@ -941,7 +941,7 @@ TQString KCmdLineArgs::getOption( const TQString& s )
return TQString(); return TQString();
} }
QCStringList KCmdLineArgs::getOptionList( const TQString& s ) QCStringList TDECmdLineArgs::getOptionList( const TQString& s )
{ {
// Find the option // Find the option
int j=0; int j=0;
@ -961,7 +961,7 @@ QCStringList KCmdLineArgs::getOptionList( const TQString& s )
return QCStringList(); return QCStringList();
} }
bool KCmdLineArgs::isSet(const TQString& s) bool TDECmdLineArgs::isSet(const TQString& s)
{ {
// Find the option // Find the option
int j=0; int j=0;

@ -353,10 +353,10 @@ public:
typedef TQValueList<TQCString> QCStringList; typedef TQValueList<TQCString> QCStringList;
class KCmdLineArgs class TDECmdLineArgs
{ {
public: public:
static KCmdLineArgs* parsedArgs(); static TDECmdLineArgs* parsedArgs();
static void init( int argc, char**argv, KAboutData* ); static void init( int argc, char**argv, KAboutData* );
static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options. static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options.

@ -105,7 +105,7 @@ void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList&
KCmdLineOptions last = KCmdLineLastOption; KCmdLineOptions last = KCmdLineLastOption;
vOptions.push_back(last); vOptions.push_back(last);
KCmdLineArgs::addCmdLineOptions( &vOptions[0] ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( &vOptions[0] ); // Add our own options.
} }
@ -190,7 +190,7 @@ int main(int argc, char *argv[])
aboutData.addCredit(I18N_NOOP("+ Many thanks to those who reported bugs and contributed ideas!")); aboutData.addCredit(I18N_NOOP("+ Many thanks to those who reported bugs and contributed ideas!"));
KCmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
std::vector<KCmdLineOptions> vOptions; std::vector<KCmdLineOptions> vOptions;
TQStringList ignorableOptions; TQStringList ignorableOptions;
initialiseCmdLineArgs(vOptions, ignorableOptions); initialiseCmdLineArgs(vOptions, ignorableOptions);

Loading…
Cancel
Save