diff options
Diffstat (limited to 'kradio3/convert-presets/convert-presets.cpp')
-rw-r--r-- | kradio3/convert-presets/convert-presets.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kradio3/convert-presets/convert-presets.cpp b/kradio3/convert-presets/convert-presets.cpp index 93e99ea..8ee0d4f 100644 --- a/kradio3/convert-presets/convert-presets.cpp +++ b/kradio3/convert-presets/convert-presets.cpp @@ -64,7 +64,7 @@ bool convertFile(const TQString &file) xmlData = ins.read(); } - if (xmlData.tqfind("<format>", 0, false) >= 0) { + if (xmlData.find("<format>", 0, false) >= 0) { kdDebug() << "file " << file << " already in new format" << endl; // but add <?xml line at beginning if missing @@ -75,7 +75,7 @@ bool convertFile(const TQString &file) xmlData = ins.read(); } - if (xmlData.tqfind("<?xml", 0, false) < 0) { + if (xmlData.find("<?xml", 0, false) < 0) { xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xmlData; } @@ -98,21 +98,21 @@ bool convertFile(const TQString &file) station.setMinimal(true); xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xmlData; - xmlData.tqreplace(stationlist, "<stationlist>\n\t\t<format>kradio-1.0</format>"); - xmlData.tqreplace(qselect, ""); - xmlData.tqreplace(docking, ""); - xmlData.tqreplace(station, "<FrequencyRadioStation>\n" + xmlData.replace(stationlist, "<stationlist>\n\t\t<format>kradio-1.0</format>"); + xmlData.replace(qselect, ""); + xmlData.replace(docking, ""); + xmlData.replace(station, "<FrequencyRadioStation>\n" "\t\t\t<" stationIDElement "></" stationIDElement ">" "\\1</FrequencyRadioStation>" ); int p = 0; int f = 0; - while ( (f = xmlData.tqfind("<" stationIDElement "></" stationIDElement ">", p) ) >= 0) { + while ( (f = xmlData.find("<" stationIDElement "></" stationIDElement ">", p) ) >= 0) { xmlData.insert(f + 2 + TQString(stationIDElement).length(), createStationID()); } - xmlData.tqreplace(emptyLines, "\n"); + xmlData.replace(emptyLines, "\n"); } presetFile.close(); |