diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-07-16 15:44:05 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-07-16 15:44:05 +0900 |
commit | a30a266067d9d952edc91305bef757557c03717e (patch) | |
tree | 7bcabd84594f751001c66b16f3c42a8d459b7773 /src/UiGuiIniFileParser.cpp | |
parent | d017bd37253ae35b29d82e3277b9adcbb4517dd0 (diff) | |
download | universal-indent-gui-tqt-a30a266067d9d952edc91305bef757557c03717e.tar.gz universal-indent-gui-tqt-a30a266067d9d952edc91305bef757557c03717e.zip |
Raw Qt->TQt conversion using tde/scripts/conversions/qt3-tqt3/convert_existing_qt3_app_to_tqt3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/UiGuiIniFileParser.cpp')
-rwxr-xr-x | src/UiGuiIniFileParser.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/UiGuiIniFileParser.cpp b/src/UiGuiIniFileParser.cpp index 9e1a023..3f1ee7f 100755 --- a/src/UiGuiIniFileParser.cpp +++ b/src/UiGuiIniFileParser.cpp @@ -19,10 +19,10 @@ #include "UiGuiIniFileParser.h" -#include <tqfile.h> -#include <tqstringlist.h> -#include <tqvariant.h> -#include <tqtextstream.h> +#include <tntqfile.h> +#include <tntqstringlist.h> +#include <tntqvariant.h> +#include <tntqtextstream.h> //! \defgroup grp_Settings All concerning applications settings. @@ -35,8 +35,8 @@ "keyname=keyvalue". Groups can be defined by writing the groupname in the style [groupname] before some key-value pairs. - The reason why I use my own class instead of QSettings is mainly, that - QSettings always internally sorts the groups alphabetically and also + The reason why I use my own class instead of TQSettings is mainly, that + TQSettings always internally sorts the groups alphabetically and also rewrites a settings file sorted. Very annoying for me. */ @@ -51,7 +51,7 @@ UiGuiIniFileParser::UiGuiIniFileParser(void) { /*! \brief Directly loads and parses the file with name \a iniFileName. */ -UiGuiIniFileParser::UiGuiIniFileParser(const QString &iniFileName) { +UiGuiIniFileParser::UiGuiIniFileParser(const TQString &iniFileName) { init(); _iniFileName = iniFileName; parseIniFile(); @@ -70,10 +70,10 @@ UiGuiIniFileParser::~UiGuiIniFileParser(void) { /*! - \brief Returns the group/section names in the same order as they occurr in the ini file as QStringList. + \brief Returns the group/section names in the same order as they occurr in the ini file as TQStringList. */ -QStringList UiGuiIniFileParser::childGroups() { - QStringList sectionsStringList; +TQStringList UiGuiIniFileParser::childGroups() { + TQStringList sectionsStringList; for( unsigned int i = 0; i < _sections.size(); i++ ) { sectionsStringList << _sections[i]; @@ -84,14 +84,14 @@ QStringList UiGuiIniFileParser::childGroups() { /*! - \brief Returns the value of the defined \a keyName as QVariant. + \brief Returns the value of the defined \a keyName as TQVariant. The \a keyName is assembled by a section name, a slash and the key name itself. For example if you wish to access the value of the following setting: <code>[NiceSection]</br>niceKeyName=2</code> you would have to call value("NiceSection/niceKeyName"). */ -QVariant UiGuiIniFileParser::value(const QString &keyName, const QString &defaultValue) { +TQVariant UiGuiIniFileParser::value(const TQString &keyName, const TQString &defaultValue) { return _keyValueMap.value( keyName, defaultValue ); } @@ -100,18 +100,18 @@ QVariant UiGuiIniFileParser::value(const QString &keyName, const QString &defaul \brief Parses the ini file and stores the key value pairs in the internal vectors \a keys and \a values. */ void UiGuiIniFileParser::parseIniFile() { - QFile iniFile(_iniFileName); + TQFile iniFile(_iniFileName); - if ( iniFile.open(QFile::ReadOnly) ) { + if ( iniFile.open(TQFile::ReadOnly) ) { // Clear the vectors holding the keys and values. _sections.clear(); _keyValueMap.clear(); - QTextStream iniFileStream( &iniFile ); - QString line; - QString currentSectionName = ""; - QString keyName = ""; - QString valueAsString = ""; + TQTextStream iniFileStream( &iniFile ); + TQString line; + TQString currentSectionName = ""; + TQString keyName = ""; + TQString valueAsString = ""; while ( !iniFileStream.atEnd() ) { line = iniFileStream.readLine().trimmed(); |