diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-06 19:33:18 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-06 19:33:18 -0600 |
commit | 64eaa62d202fd64fe08f77487e14c2ed9a4a01a3 (patch) | |
tree | 718dc5d6eec7745b1449942359e79173721c809e | |
parent | 4e2575b1e7a28448cea0bad1bc70e43f4b486d61 (diff) | |
download | kdiff3-64eaa62d202fd64fe08f77487e14c2ed9a4a01a3.tar.gz kdiff3-64eaa62d202fd64fe08f77487e14c2ed9a4a01a3.zip |
Rename KCmd to avoid conflicts with KDE4
-rw-r--r-- | src/kreplacements/kreplacements.cpp | 4 | ||||
-rw-r--r-- | src/kreplacements/kreplacements.h | 6 | ||||
-rw-r--r-- | src/main.cpp | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/kreplacements/kreplacements.cpp b/src/kreplacements/kreplacements.cpp index 499ceac..94e62a4 100644 --- a/src/kreplacements/kreplacements.cpp +++ b/src/kreplacements/kreplacements.cpp @@ -886,7 +886,7 @@ void TDEAboutData::addCredit(const char* name, const char* task, const char* ema static TDECmdLineArgs s_cmdLineArgs; static int s_argc; static char** s_argv; -static KCmdLineOptions* s_pOptions; +static TDECmdLineOptions* s_pOptions; static std::vector<QCStringList> s_vOption; static std::vector<const char*> s_vArg; @@ -903,7 +903,7 @@ void TDECmdLineArgs::init( int argc, char**argv, TDEAboutData* pAboutData ) // s_pAboutData = pAboutData; } -void TDECmdLineArgs::addCmdLineOptions( KCmdLineOptions* options ) // static +void TDECmdLineArgs::addCmdLineOptions( TDECmdLineOptions* options ) // static { s_pOptions = options; } diff --git a/src/kreplacements/kreplacements.h b/src/kreplacements/kreplacements.h index 5f4e811..a96f2fa 100644 --- a/src/kreplacements/kreplacements.h +++ b/src/kreplacements/kreplacements.h @@ -316,14 +316,14 @@ public: TQString findResource(const TQString& resource, const TQString& appName); }; -struct KCmdLineOptions +struct TDECmdLineOptions { const char* name; const char* description; int def; }; -#define KCmdLineLastOption {0,0,0} +#define TDECmdLineLastOption {0,0,0} class TDEAboutData { @@ -358,7 +358,7 @@ class TDECmdLineArgs public: static TDECmdLineArgs* parsedArgs(); static void init( int argc, char**argv, TDEAboutData* ); - static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options. + static void addCmdLineOptions( TDECmdLineOptions* options ); // Add our own options. int count(); TQString arg(int); diff --git a/src/main.cpp b/src/main.cpp index e3a163c..510961d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,7 +34,7 @@ static const char *description = I18N_NOOP("Tool for Comparison and Merge of Files and Directories"); -static KCmdLineOptions options[] = +static TDECmdLineOptions options[] = { { "m", 0, 0 }, { "merge", I18N_NOOP("Merge the input."), 0 }, @@ -54,7 +54,7 @@ static KCmdLineOptions options[] = { "confighelp", I18N_NOOP("Show list of config settings and current values."), 0 }, { "config file", I18N_NOOP("Use a different config file."), 0 } }; -static KCmdLineOptions options2[] = +static TDECmdLineOptions options2[] = { { "+[File1]", I18N_NOOP("file1 to open (base, if not specified via --base)"), 0 }, { "+[File2]", I18N_NOOP("file2 to open"), 0 }, @@ -62,9 +62,9 @@ static KCmdLineOptions options2[] = }; -void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList& ignorableOptions) +void initialiseCmdLineArgs(std::vector<TDECmdLineOptions>& vOptions, TQStringList& ignorableOptions) { - vOptions.insert( vOptions.end(), options, (KCmdLineOptions*)((char*)options+sizeof(options))); + vOptions.insert( vOptions.end(), options, (TDECmdLineOptions*)((char*)options+sizeof(options))); TQString configFileName = TDEStandardDirs().findResource("config","kdiff3rc"); TQFile configFile( configFileName ); if ( configFile.open( IO_ReadOnly ) ) @@ -85,7 +85,7 @@ void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList& ignorableOptions = TQStringList::split( ';', sl.front() ); for (TQStringList::iterator i=ignorableOptions.begin(); i!=ignorableOptions.end(); ++i) { - KCmdLineOptions ignoreOption; + TDECmdLineOptions ignoreOption; (*i).remove('-'); if (!(*i).isEmpty()) { @@ -101,9 +101,9 @@ void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, TQStringList& } } } - vOptions.insert(vOptions.end(),options2,(KCmdLineOptions*)((char*)options2+sizeof(options2))); + vOptions.insert(vOptions.end(),options2,(TDECmdLineOptions*)((char*)options2+sizeof(options2))); - KCmdLineOptions last = KCmdLineLastOption; + TDECmdLineOptions last = TDECmdLineLastOption; vOptions.push_back(last); TDECmdLineArgs::addCmdLineOptions( &vOptions[0] ); // Add our own options. } @@ -191,7 +191,7 @@ int main(int argc, char *argv[]) aboutData.addCredit(I18N_NOOP("+ Many thanks to those who reported bugs and contributed ideas!")); TDECmdLineArgs::init( argc, argv, &aboutData ); - std::vector<KCmdLineOptions> vOptions; + std::vector<TDECmdLineOptions> vOptions; TQStringList ignorableOptions; initialiseCmdLineArgs(vOptions, ignorableOptions); |