diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:06:29 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:06:29 -0600 |
commit | c0b24fe164924298d7e6ae33964b3c65fadbcba3 (patch) | |
tree | 2ba50375d78b077b266b224e4413150ef3e60a15 /src/kconf_update/kdev-gen-settings-kconf_update.cpp | |
parent | 33d15e862e09fbcbb05e209f832414bd8a01291e (diff) | |
download | tdevelop-c0b24fe164924298d7e6ae33964b3c65fadbcba3.tar.gz tdevelop-c0b24fe164924298d7e6ae33964b3c65fadbcba3.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'src/kconf_update/kdev-gen-settings-kconf_update.cpp')
-rw-r--r-- | src/kconf_update/kdev-gen-settings-kconf_update.cpp | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/src/kconf_update/kdev-gen-settings-kconf_update.cpp b/src/kconf_update/kdev-gen-settings-kconf_update.cpp deleted file mode 100644 index 64c0b791..00000000 --- a/src/kconf_update/kdev-gen-settings-kconf_update.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - kconf_update app for migrating tdevelop's ui settings to the new - code that will be in 3.3. - - Copyright (c) 2005 by Matt Rogers <mattr@kde.org> - Based on code Copyright (c) 2003 by Martijn Klingens <klingens@kde.org> - - ************************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - ************************************************************************* -*/ - -#include <tqmap.h> -#include <tqtextstream.h> -#include <tqregexp.h> - -static TQTextStream qcin ( stdin, IO_ReadOnly ); -static TQTextStream qcout( stdout, IO_WriteOnly ); -static TQTextStream qcerr( stderr, IO_WriteOnly ); - -// Group cache. Yes, I know global vars are ugly :) -bool needFlush = false; -TQString newKeyValue; -int newDataValue; - -void parseKey( const TQString &group, const TQString &key, - const TQString &value, const TQString &rawLine ) -{ - - //qcerr << "*** group='" << group << "'" << endl; - if ( group == "General Options" && key == "Embed KDevDesigner") - { - newKeyValue = "Designer App"; - if ( value.lower() == "true" ) - newDataValue = 0; - else - newDataValue = 2; - qcout << newKeyValue << "=" << newDataValue << endl; - qcout << "# DELETE [" << key << "]" << endl; - - } - else if ( group == "General Options" && key == "Application Font" ) - { - newKeyValue = "OutputViewFont"; - qcout << newKeyValue << "=" << value << endl; - qcout << "# DELETE [" << key << "]" << endl; - } - else if ( group == "MakeOutputView" && key == "Messages Font" ) - { - qcout << "# DELETE [" << key << "]" << endl; - } - else if ( group == "TerminalEmulator" && key == "UseKDESetting" ) - { - newKeyValue = "UseKDESetting"; - if ( value.lower() == "true" ) - newDataValue = 0; - else - newDataValue = 1; - qcout << newKeyValue << "=" << newDataValue << endl; - } - else - { - // keys we don't convert. output the raw line instead. - qcout << rawLine << endl; - } -} - -int main() -{ - qcin.setEncoding( TQTextStream::UnicodeUTF8 ); - qcout.setEncoding( TQTextStream::UnicodeUTF8 ); - - TQString curGroup; - - TQRegExp groupRegExp( "^\\[(.*)\\]" ); - TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); - TQRegExp commentRegExp( "^(#.*)?$" ); - - while ( !qcin.atEnd() ) - { - TQString line = qcin.readLine(); - - if ( commentRegExp.exactMatch( line ) ) - { - // We found a comment, leave unchanged - qcout << line << endl; - } - else if ( groupRegExp.exactMatch( line ) ) - { - curGroup = groupRegExp.capturedTexts()[ 1 ]; - qcout << line << endl; - } - else if ( keyRegExp.exactMatch( line ) ) - { - // We found the a key line - parseKey( curGroup, keyRegExp.capturedTexts()[ 1 ], keyRegExp.capturedTexts()[ 2 ], line ); - } - else - { - qcout << line << endl; - } - } - - return 0; -} - -// vim: set noet ts=4 sts=4 sw=4: - |