delete pinyin document
This commit is contained in:
parent
b72363ce68
commit
650c93d2f8
|
@ -1,5 +1,6 @@
|
|||
#include "app-match.h"
|
||||
#include <glib.h>
|
||||
#include "chinesecharacterstopinyin.h"
|
||||
AppMatch::AppMatch(QObject *parent) : QObject(parent)
|
||||
{
|
||||
this->getDesktopFilePath();
|
||||
|
@ -188,9 +189,11 @@ void AppMatch::appNameMatch(QString appname,QString desktoppath){
|
|||
if(appname.contains(m_soureText)){
|
||||
m_returnResult.append(desktoppath);
|
||||
}
|
||||
QString pinyin=UkuiChineseLetter::getPinyins(appname).toLower(); // 中文转拼音
|
||||
QString pinyin=chineseCharactersToPinyin::find(appname).toLower(); // 中文转拼音
|
||||
if(pinyin.contains(m_soureText,Qt::CaseInsensitive)){
|
||||
m_returnResult.append(desktoppath);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <QDir>
|
||||
#include <QLocale>
|
||||
#include <QDebug>
|
||||
#include <ukuichineseletter.h>
|
||||
class AppMatch : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -2,8 +2,6 @@ INCLUDEPATH += $$PWD
|
|||
|
||||
HEADERS += \
|
||||
$$PWD/app-match.h \
|
||||
$$PWD/ukuichineseletter.h \
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/app-match.cpp \
|
||||
$$PWD/ukuichineseletter.cpp \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef UKUICHINESELETTER_H
|
||||
#define UKUICHINESELETTER_H
|
||||
#include <QString>
|
||||
|
||||
|
||||
class UkuiChineseLetter
|
||||
{
|
||||
public:
|
||||
UkuiChineseLetter();
|
||||
static bool In(wchar_t start, wchar_t end, wchar_t code);
|
||||
|
||||
static char Convert(int n);
|
||||
|
||||
// 获取第一个汉字的首字母
|
||||
static QString getFirstLetter(const QString &src);
|
||||
|
||||
// 获取所有汉字的首字母
|
||||
static QString getFirstLetters(const QString &src);
|
||||
|
||||
static QString getFirstLettersAll(const QString &src);
|
||||
|
||||
// 获取一个汉字编码的汉语拼音
|
||||
static QString getPinyin(int code);
|
||||
|
||||
// 获取所有汉字的汉语拼音
|
||||
static QString getPinyins(const QString& text);
|
||||
};
|
||||
|
||||
#endif // UKUICHINESELETTER_H
|
Loading…
Reference in New Issue