Modify for qt 6 build env
This commit is contained in:
parent
7a8106b539
commit
bbc348d859
@ -9,7 +9,7 @@
|
|||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QRegularExpression>
|
||||||
|
|
||||||
#define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg"
|
#define BG_PATH_FORMAT ":/NameCreater/resource/background_%1.jpg"
|
||||||
|
|
||||||
@ -89,8 +89,8 @@ QList<NameInfo_t> INameCreater::getNameByFile(Name_Type_e type, const QString& f
|
|||||||
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;
|
||||||
|
|
||||||
type_str = type_str.remove(QRegExp("\r"));
|
type_str = type_str.remove(QRegularExpression("\r"));
|
||||||
type_str = type_str.remove(QRegExp("\n"));
|
type_str = type_str.remove(QRegularExpression("\n"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -131,8 +131,8 @@ QList<NameInfo_t> INameCreater::getNameByFileContent(Name_Type_e type, const QBy
|
|||||||
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;
|
||||||
|
|
||||||
type_str = type_str.remove(QRegExp("\r"));
|
type_str = type_str.remove(QRegularExpression("\r"));
|
||||||
type_str = type_str.remove(QRegExp("\n"));
|
type_str = type_str.remove(QRegularExpression("\n"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
QT += core gui
|
QT += core gui
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
|
||||||
|
|
||||||
CONFIG += c++11 resources_big
|
CONFIG += c++11 resources_big
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QRegularExpression>
|
||||||
|
|
||||||
#define BG_MIX_PATH ":/NameCreater/resource/background.jpg"
|
#define BG_MIX_PATH ":/NameCreater/resource/background.jpg"
|
||||||
#define BG_BOY_PATH ":/NameCreater/resource/background_boy.jpg"
|
#define BG_BOY_PATH ":/NameCreater/resource/background_boy.jpg"
|
||||||
@ -67,7 +67,7 @@ QList<NameInfo_t> OldFiveCreater::getNameByFileContent(Name_Type_e type, const Q
|
|||||||
|
|
||||||
info.name1 = name1;
|
info.name1 = name1;
|
||||||
info.name2 = name2;
|
info.name2 = name2;
|
||||||
info.bg_type = type_str.contains(QRegExp("boy")) ? 1 : (type_str.contains(QRegExp("girl"))) ? 2 : 0;
|
info.bg_type = type_str.contains(QRegularExpression("boy")) ? 1 : (type_str.contains(QRegularExpression("girl"))) ? 2 : 0;
|
||||||
|
|
||||||
nameList.append(info);
|
nameList.append(info);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user