Skip to content

Commit

Permalink
use QString::replace(QChar, QChar) instead of (QString, QString)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteven4 committed May 8, 2024
1 parent 0a2c5ca commit ae91618
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion garmin_txt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ GarminTxtFormat::write()
};

QString grid_str = gt_get_mps_grid_longname(grid_index, MYNAME);
grid_str = grid_str.replace('*', "°");
grid_str = grid_str.replace('*', u'°');
*fout << "Grid\t" << grid_str << "\r\n";

datum_str = gt_get_mps_datum_name(datum_index);
Expand Down
6 changes: 3 additions & 3 deletions unicsv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ UnicsvFormat::rd_init(const QString& fname)
fin = new gpsbabel::TextStream;
fin->open(fname, QIODevice::ReadOnly, MYNAME, opt_codec);
if (opt_fields) {
QString fields = QString(opt_fields).replace("+", ",");
QString fields = QString(opt_fields).replace('+', ',');
unicsv_fondle_header(fields);
} else if (buff = fin->readLine(), !buff.isNull()) {
unicsv_fondle_header(buff);
Expand Down Expand Up @@ -1090,8 +1090,8 @@ UnicsvFormat::unicsv_print_str(const QString& s) const
// slavish re-implementation of (what I think) the original C code
// was doing.
t.replace("\r\n", ",");
t.replace("\r", ",");
t.replace("\n", ",");
t.replace('\r', ',');
t.replace('\n', ',');
}
*fout << t.trimmed();
}
Expand Down

0 comments on commit ae91618

Please sign in to comment.