marco mac/windows handle /r/n string
This commit is contained in:
parent
6025cc2913
commit
27a4eb5c8b
@ -122,7 +122,11 @@ QList<NameInfo_t> getNameByFile(const QString& filename) {
|
|||||||
QString name1 = csvList.at(0);
|
QString name1 = csvList.at(0);
|
||||||
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
|
QString type_str = csvList.last();//QString::fromLocal8Bit(csvList.last());
|
||||||
qDebug() << "row :" << row << " " << name1;
|
qDebug() << "row :" << row << " " << name1;
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
type_str = type_str.remove(QRegExp("\n"));
|
||||||
|
#else
|
||||||
type_str = type_str.remove(QRegExp("\r\n"));
|
type_str = type_str.remove(QRegExp("\r\n"));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (name1.compare("name_1") == 0) {
|
if (name1.compare("name_1") == 0) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user