Skip to content

Commit

Permalink
refactor: replace QString::SkipEmptyParts with Qt::SkipEmptyParts
Browse files Browse the repository at this point in the history
QString::SkipEmptyParts已标记弃用
  • Loading branch information
myml committed Nov 16, 2024
1 parent 427467a commit 0e523ee
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/kcalendarcore/src/icalformat_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent, const Incidence::Ptr &
// We can't change that -- in order to retain backwards compatibility.
text = icalproperty_get_categories(p);
const QString val = QString::fromUtf8(text);
const QStringList lstVal = val.split(QLatin1Char(','), QString::SkipEmptyParts);
const QStringList lstVal = val.split(QLatin1Char(','), Qt::SkipEmptyParts);
for (const QString &cat : lstVal) {
// ensure no duplicates
if (!categories.contains(cat)) {
Expand Down
4 changes: 2 additions & 2 deletions calendar-client/src/widget/dayWidget/daymonthview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ void CDayMonthView::updateDateLunarDay()
{
if (!m_huanglistate) return;
m_currentLuna->setTextStr(m_huangLiInfo.mGanZhiYear + "" + "" + m_huangLiInfo.mZodiac + "年】" + m_huangLiInfo.mGanZhiMonth + "" + m_huangLiInfo.mGanZhiDay + "");
QStringList yiList = m_huangLiInfo.mSuit.split(".", QString::SkipEmptyParts);
QStringList jiList = m_huangLiInfo.mAvoid.split(".", QString::SkipEmptyParts);
QStringList yiList = m_huangLiInfo.mSuit.split(".", Qt::SkipEmptyParts);
QStringList jiList = m_huangLiInfo.mAvoid.split(".", Qt::SkipEmptyParts);
m_yiLabel->setHuangLiText(yiList);
m_jiLabel->setHuangLiText(jiList, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion calendar-common/src/compatibledata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ QString DDE_Calendar::getExternalSchedule(const DSchedule::Map &scheduleMap)
void DDE_Calendar::setAlarmByOldRemind(const DSchedule::Ptr &schedule, const QString &remind)
{
//提醒规则
QStringList strList = remind.split(";", QString::SkipEmptyParts);
QStringList strList = remind.split(";", Qt::SkipEmptyParts);

int remindNum = strList.at(0).toInt();
//小于0表示不提醒
Expand Down
2 changes: 1 addition & 1 deletion calendar-service/src/dbmanager/ddatabasemanagement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ DSchedule::List DDataBaseManagement::queryOldJobData(QSqlDatabase &db, const boo
QString remind = query.value("remind").toString();
if (!remind.isEmpty()) {
//提醒规则
QStringList strList = remind.split(";", QString::SkipEmptyParts);
QStringList strList = remind.split(";", Qt::SkipEmptyParts);

int remindNum = strList.at(0).toInt();
//小于0表示不提醒
Expand Down
2 changes: 1 addition & 1 deletion calendar-service/src/lunarandfestival/lunardateinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ LunarDateInfo::LunnarRRule LunarDateInfo::ParseRRule(const QString &rule)
//无规则的不走这里判断所以此处默认rule不为空
//局部变量初始化
LunnarRRule options = RRule_None;
QStringList rruleslist = rule.split(";", QString::SkipEmptyParts);
QStringList rruleslist = rule.split(";", Qt::SkipEmptyParts);
//rpeat重复规则 0 无 1 每天 2 每个工作日 3 每周 4每月 5每年
//type结束重复类型 0 永不 1 多少次结束 2 结束日期
if (rruleslist.contains("FREQ=MONTHLY")) {
Expand Down
2 changes: 1 addition & 1 deletion calendar-service/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bool loadTranslator(QCoreApplication *app, QList<QLocale> localeFallback = QList
app->installTranslator(translator);
bsuccess = true;
}
QStringList parseLocalNameList = locale.name().split("_", QString::SkipEmptyParts);
QStringList parseLocalNameList = locale.name().split("_", Qt::SkipEmptyParts);
if (parseLocalNameList.length() > 0 && !bsuccess) {
translateFilename = QString("%1_%2").arg(app->applicationName()).arg(parseLocalNameList.at(0));
QString parseTranslatePath = QString("%1/%2.qm").arg(CalendarServiceTranslationsDir).arg(translateFilename);
Expand Down

0 comments on commit 0e523ee

Please sign in to comment.