From 722ce1efbac31c61b1d4b13f7e075c9f311e3e73 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Sun, 2 Mar 2014 20:05:33 +0100 Subject: Finish renaming tdevelop components --- src/tdeconf_update/CMakeLists.txt | 8 +- src/tdeconf_update/Makefile.am | 10 +- .../kdev-gen-settings-tdeconf_update.cpp | 113 --------------------- src/tdeconf_update/kdev-gen-settings.upd | 8 -- .../tdev-gen-settings-tdeconf_update.cpp | 113 +++++++++++++++++++++ src/tdeconf_update/tdev-gen-settings.upd | 8 ++ 6 files changed, 130 insertions(+), 130 deletions(-) delete mode 100644 src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp delete mode 100644 src/tdeconf_update/kdev-gen-settings.upd create mode 100644 src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp create mode 100644 src/tdeconf_update/tdev-gen-settings.upd (limited to 'src/tdeconf_update') diff --git a/src/tdeconf_update/CMakeLists.txt b/src/tdeconf_update/CMakeLists.txt index 4b605615..8eb5c732 100644 --- a/src/tdeconf_update/CMakeLists.txt +++ b/src/tdeconf_update/CMakeLists.txt @@ -20,13 +20,13 @@ link_directories( ##### other data ################################ -install( FILES kdev-gen-settings.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) +install( FILES tdev-gen-settings.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) -##### kdev-gen-settings-tdeconf_update (executable) +##### tdev-gen-settings-tdeconf_update (executable) -tde_add_executable( kdev-gen-settings-tdeconf_update - SOURCES kdev-gen-settings-tdeconf_update.cpp +tde_add_executable( tdev-gen-settings-tdeconf_update + SOURCES tdev-gen-settings-tdeconf_update.cpp LINK ${TQT_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR}/tdeconf_update_bin ) diff --git a/src/tdeconf_update/Makefile.am b/src/tdeconf_update/Makefile.am index f806baa2..4cf2dab5 100644 --- a/src/tdeconf_update/Makefile.am +++ b/src/tdeconf_update/Makefile.am @@ -1,18 +1,18 @@ AM_CPPFLAGS = -DKDE_NO_COMPAT -DQT_NO_COMPAT $(all_includes) -update_DATA = kdev-gen-settings.upd +update_DATA = tdev-gen-settings.upd updatedir = $(kde_datadir)/tdeconf_update # The Qt app cannot go into kde_datadir, that is not portable. # install to kde_bindir/tdeconf_update_bin instead. # KDE 3.2 will allow tdeconf_update scripts to run directly from there, # but for us that's too late. Use the .sh script as a workaround. -tdeconf_PROGRAMS = kdev-gen-settings-tdeconf_update +tdeconf_PROGRAMS = tdev-gen-settings-tdeconf_update tdeconfdir = $(libdir)/tdeconf_update_bin -kdev_gen_settings_tdeconf_update_SOURCES = kdev-gen-settings-tdeconf_update.cpp -kdev_gen_settings_tdeconf_update_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -kdev_gen_settings_tdeconf_update_LDADD = $(LIB_QT) +tdev_gen_settings_tdeconf_update_SOURCES = tdev-gen-settings-tdeconf_update.cpp +tdev_gen_settings_tdeconf_update_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +tdev_gen_settings_tdeconf_update_LDADD = $(LIB_QT) # vim: set noet: diff --git a/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp b/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp deleted file mode 100644 index 63e4a834..00000000 --- a/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - tdeconf_update app for migrating tdevelop's ui settings to the new - code that will be in 3.3. - - Copyright (c) 2005 by Matt Rogers - Based on code Copyright (c) 2003 by Martijn Klingens - - ************************************************************************* - * * - * 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 -#include -#include - -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: - diff --git a/src/tdeconf_update/kdev-gen-settings.upd b/src/tdeconf_update/kdev-gen-settings.upd deleted file mode 100644 index 1fd3803f..00000000 --- a/src/tdeconf_update/kdev-gen-settings.upd +++ /dev/null @@ -1,8 +0,0 @@ -#Update the KDevelop General Settings page to work with the -#new UI file created on 20050406 -Id=kdev-gen-settings-update/5 -File=tdeveloprc -Script=kdev-gen-settings-tdeconf_update -Options=overwrite -AllKeys - diff --git a/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp b/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp new file mode 100644 index 00000000..ae20ae57 --- /dev/null +++ b/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp @@ -0,0 +1,113 @@ +/* + tdeconf_update app for migrating tdevelop's ui settings to the new + code that will be in 3.3. + + Copyright (c) 2005 by Matt Rogers + Based on code Copyright (c) 2003 by Martijn Klingens + + ************************************************************************* + * * + * 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 +#include +#include + +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 TDevDesigner") + { + 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: + diff --git a/src/tdeconf_update/tdev-gen-settings.upd b/src/tdeconf_update/tdev-gen-settings.upd new file mode 100644 index 00000000..1fd3803f --- /dev/null +++ b/src/tdeconf_update/tdev-gen-settings.upd @@ -0,0 +1,8 @@ +#Update the KDevelop General Settings page to work with the +#new UI file created on 20050406 +Id=kdev-gen-settings-update/5 +File=tdeveloprc +Script=kdev-gen-settings-tdeconf_update +Options=overwrite +AllKeys + -- cgit v1.2.3