From 59863b25fcd04e51d31ec5a57e40ddf19f8a9a03 Mon Sep 17 00:00:00 2001 From: "huheng@kylinos.cn" Date: Wed, 15 May 2024 17:06:32 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=90=9E=20fix(dbus):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9dbus=E5=BA=93=E7=89=88=E6=9C=AC=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2=E6=8E=A5=E5=8F=A3=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kylinconnectivitymanager/connectivitymanager.cpp | 4 ++-- kylinconnectivitymanager/connectivitymanager.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kylinconnectivitymanager/connectivitymanager.cpp b/kylinconnectivitymanager/connectivitymanager.cpp index b34f07b..f35b6f4 100644 --- a/kylinconnectivitymanager/connectivitymanager.cpp +++ b/kylinconnectivitymanager/connectivitymanager.cpp @@ -18,7 +18,7 @@ const QString DSOFTBUS_UUID_PATH = "/data/data"; const char *IPC_SERVER_SOCKET_ADDR = "/tmp/ipc.socket.server"; const char *IPC_CLIENT_SOCKET_ADDR = "/tmp/ipc.socket.client"; const char *SERVER_UNIX_SOCKET_ADDR = "/tmp/kylin.deviceDiscover.socket"; -static const QStringList programWhiteList = {"/usr/sbin/ksc-defender", "/usr/bin/kylin-connectivity"}; +static const QStringList programWhiteList = {"/usr/bin/kylin-connectivity"}; void outLog(QString str) { @@ -26,7 +26,7 @@ void outLog(QString str) syslog(LOG_INFO, "%s\n", str.toStdString().c_str()); } -ConnectivityManager::ConnectivityManager() +ConnectivityManager::ConnectivityManager(QObject *parent) : QObject(parent) { } diff --git a/kylinconnectivitymanager/connectivitymanager.h b/kylinconnectivitymanager/connectivitymanager.h index 6af0098..328fc18 100644 --- a/kylinconnectivitymanager/connectivitymanager.h +++ b/kylinconnectivitymanager/connectivitymanager.h @@ -4,7 +4,10 @@ #include #include #include -#include +#include +#include +#include +#include void outLog(QString str); @@ -15,7 +18,7 @@ class ConnectivityManager Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.kylin.connectivity.manager") public: - ConnectivityManager(); + explicit ConnectivityManager(QObject *parent = nullptr); ~ConnectivityManager(); private: -- Gitee From c504284ccab38aa6fd468140591249cb208a3d3c Mon Sep 17 00:00:00 2001 From: "huheng@kylinos.cn" Date: Mon, 20 May 2024 09:06:09 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix(return-error):=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- filesearch/database/searchdatabase.cpp | 1 + .../connectivitymanager.cpp | 24 +++++++++---------- .../connectivitymanager.h | 12 +++++----- projection/device/baseserver.cpp | 2 ++ 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/filesearch/database/searchdatabase.cpp b/filesearch/database/searchdatabase.cpp index 53d60ea..971f948 100644 --- a/filesearch/database/searchdatabase.cpp +++ b/filesearch/database/searchdatabase.cpp @@ -73,6 +73,7 @@ int SearchDataBase::initDataBase(const QString &dbPath) } } } + return DB_OP_SUCC; } int SearchDataBase::creatVirtualDBTable() diff --git a/kylinconnectivitymanager/connectivitymanager.cpp b/kylinconnectivitymanager/connectivitymanager.cpp index f35b6f4..eeba927 100644 --- a/kylinconnectivitymanager/connectivitymanager.cpp +++ b/kylinconnectivitymanager/connectivitymanager.cpp @@ -85,10 +85,10 @@ bool ConnectivityManager::isAllowedCaller() return false; } -int ConnectivityManager::mountFtp(QString urlStr, QString userName, QString pwd, QString path) +void ConnectivityManager::mountFtp(QString urlStr, QString userName, QString pwd, QString path) { if (!isAllowedCaller()) { - return -EPERM; + return; } QDir dir; if (!dir.exists(path)) { @@ -103,10 +103,10 @@ int ConnectivityManager::mountFtp(QString urlStr, QString userName, QString pwd, startCommand(common); } -int ConnectivityManager::umountFtp(QString path) +void ConnectivityManager::umountFtp(QString path) { if (!isAllowedCaller()) { - return -EPERM; + return; } m_isMount = false; QString common = "umount -f " + path; @@ -177,10 +177,10 @@ void ConnectivityManager::killProcess(const char *cmd) pclose(fp); } -int ConnectivityManager::startDiscServer() +void ConnectivityManager::startDiscServer() { if (!isAllowedCaller()) { - return -EPERM; + return; } outLog("disc softbus init"); m_discServer = new QProcess(this); @@ -200,10 +200,10 @@ int ConnectivityManager::startDiscServer() m_discServer->start(DISC_SERVER_PATH); } -int ConnectivityManager::stopDiscServer() +void ConnectivityManager::stopDiscServer() { if (!isAllowedCaller()) { - return -EPERM; + return; } outLog("stop disc server"); if (m_discServer) { @@ -215,10 +215,10 @@ int ConnectivityManager::stopDiscServer() } } -int ConnectivityManager::killServerPortProcess() +void ConnectivityManager::killServerPortProcess() { if (!isAllowedCaller()) { - return -EPERM; + return; } killProcess("lsof -i:27189"); killProcess("ps -aux | grep connectivity_softbus"); @@ -227,10 +227,10 @@ int ConnectivityManager::killServerPortProcess() remove(SERVER_UNIX_SOCKET_ADDR); } -int ConnectivityManager::killConnectivity() +void ConnectivityManager::killConnectivity() { if (!isAllowedCaller()) { - return -EPERM; + return; } outLog("Connecicvity quit!"); QCoreApplication::quit(); diff --git a/kylinconnectivitymanager/connectivitymanager.h b/kylinconnectivitymanager/connectivitymanager.h index 328fc18..16fa602 100644 --- a/kylinconnectivitymanager/connectivitymanager.h +++ b/kylinconnectivitymanager/connectivitymanager.h @@ -32,12 +32,12 @@ Q_SIGNALS: void sigInitDiscServer(bool); public Q_SLOTS: - int mountFtp(QString urlStr, QString userName, QString pwd, QString path); - int umountFtp(QString path); - int startDiscServer(); - int stopDiscServer(); - int killServerPortProcess(); - int killConnectivity(); + void mountFtp(QString urlStr, QString userName, QString pwd, QString path); + void umountFtp(QString path); + void startDiscServer(); + void stopDiscServer(); + void killServerPortProcess(); + void killConnectivity(); private: bool m_isMount = true; diff --git a/projection/device/baseserver.cpp b/projection/device/baseserver.cpp index 562d9fc..81f2ede 100644 --- a/projection/device/baseserver.cpp +++ b/projection/device/baseserver.cpp @@ -43,10 +43,12 @@ BaseServer::ServerParams BaseServer::getParams() bool BaseServer::start(BaseServer::ServerParams params) { + return true; } bool BaseServer::connectTo() { + return true; } void BaseServer::onConnectTimer() -- Gitee From 5fe4d13191510ce6d95d709124803b10e1cb8c75 Mon Sep 17 00:00:00 2001 From: "huheng@kylinos.cn" Date: Mon, 20 May 2024 11:03:32 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=90=9E=20fix(=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=89=93=E5=BC=80):=20=E4=BF=AE=E5=A4=8D=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E6=89=93=E5=BC=80=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/fileinfo.cpp | 142 +++++--------------------------------------- 1 file changed, 16 insertions(+), 126 deletions(-) diff --git a/common/fileinfo.cpp b/common/fileinfo.cpp index b402487..ec80013 100644 --- a/common/fileinfo.cpp +++ b/common/fileinfo.cpp @@ -750,149 +750,37 @@ QMap FileInfo::initIconNameMap() QSet FileInfo::initimageSet() { QSet set; - set << "bmp" - << "gif" - << "jpg" - << "jpeg" - << "png" - << "pbm" - << "pgm" - << "ppm" - << "xbm" - << "xpm" - << "svg" - << "dds" - << "icns" - << "jp2" - << "mng" - << "tga" - << "tiff" - << "tif" - << "wbmp" - << "webp" - << "sr" - << "exr" - << "jpe" - << "pnm" - << "ras" - << "dib" - << "ico" - << "j2k" - << "psd" - << "jfi" - << "jif" - << "apng" - << "jng"; + set << "bmp" << "gif" << "jpg" << "jpeg" << "png" << "pbm" << "pgm" << "ppm" << "xbm" << "xpm" << "svg" << "dds" + << "icns" << "jp2" << "mng" << "tga" << "tiff" << "tif" << "wbmp" << "webp" << "sr" << "exr" << "jpe" << "pnm" + << "ras" << "dib" << "ico" << "j2k" << "psd" << "jfi" << "jif" << "apng" << "jng"; return set; } QSet FileInfo::inittextSet() { QSet set; - set << "txt" - << "java" - << "pot" - << "conf" - << "cpp" - << "c" - << "h" - << "htm" - << "html" - << "log" - << "prop" - << "rc" - << "sh" - << "rc" - << "xml"; + set << "txt" << "java" << "pot" << "conf" << "cpp" << "c" << "h" << "htm" << "html" << "log" << "prop" << "rc" + << "sh" << "rc" << "xml"; return set; } QSet FileInfo::initaudioSet() { QSet set; - set << "mp2" - << "mp3" - << "ogg" - << "oga" - << "wav" - << "wma" - << "aac" - << "ac3" - << "dts" - << "ra" - << "ape" - << "flac" - << "thd" - << "mka" - << "m4a" - << "opus" - << "m3u" - << "m4b" - << "m4p" - << "mpga" - << "aif" - << "mmf" - << "amr" - << "m4r" - << "mid" - << "wv" - << "mpa"; + set << "mp2" << "mp3" << "ogg" << "oga" << "wav" << "wma" << "aac" << "ac3" << "dts" << "ra" << "ape" << "flac" + << "thd" << "mka" << "m4a" << "opus" << "m3u" << "m4b" << "m4p" << "mpga" << "aif" << "mmf" << "amr" << "m4r" + << "mid" << "wv" << "mpa"; return set; } QSet FileInfo::initvideoSet() { QSet set; - set << "avi" - << "vfw" - << "divx" - << "mpg" - << "mpe" - << "mpeg" - << "mpg" - << "mpg4" - << "m1v" - << "m2v" - << "mpv" - << "dv" - << "3gp" - << "3g2" - << "mov" - << "mp4" - << "m4v" - << "dat" - << "vcd" - << "ogm" - << "ogv" - << "ogx" - << "asf" - << "wmv" - << "iso" - << "vob" - << "mkv" - << "nsv" - << "ram" - << "flv" - << "rm" - << "swf" - << "ts" - << "rmvb" - << "dvr-ms" - << "m2t" - << "m2ts" - << "mts" - << "rec" - << "wtv" - << "f4v" - << "hdmov" - << "webm" - << "vp8" - << "bik" - << "smk" - << "wtv" - << "part" - << "m4u" - << "h264"; + set << "avi" << "vfw" << "divx" << "mpg" << "mpe" << "mpeg" << "mpg" << "mpg4" << "m1v" << "m2v" << "mpv" << "dv" + << "3gp" << "3g2" << "mov" << "mp4" << "m4v" << "dat" << "vcd" << "ogm" << "ogv" << "ogx" << "asf" << "wmv" + << "iso" << "vob" << "mkv" << "nsv" << "ram" << "flv" << "rm" << "swf" << "ts" << "rmvb" << "dvr-ms" << "m2t" + << "m2ts" << "mts" << "rec" << "wtv" << "f4v" << "hdmov" << "webm" << "vp8" << "bik" << "smk" << "wtv" << "part" + << "m4u" << "h264"; return set; } FileInfo::FileInfo() @@ -1092,7 +980,9 @@ FileInfo::FileType FileInfo::judgmentType(QString fileName) } else if (fileType == "pptx" || fileType == "dps") { // ppt return FileType::Ppt; - } else if (fileType == "zip") { + } else if (fileType == "zip" || fileType == "7z" || fileType == "ar" || fileType == "ear" || fileType == "gz" || + fileType == "jar" || fileType == "tar" || fileType == "lzma" || fileType == "bz2" || fileType == "xz" || + fileType == "war") { // zip return FileType::Zip; } else { -- Gitee From d1b080e361c51e13cc190c20a319d651fb774f7d Mon Sep 17 00:00:00 2001 From: "huheng@kylinos.cn" Date: Mon, 20 May 2024 11:18:33 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=9E=20fix(=E7=BF=BB=E8=AF=91):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=94=E7=94=A8=E5=90=8D=E9=A6=96=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E5=A4=A7=E5=86=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kylin-connectivity.desktop | 16 ++++++++-------- translations/kylin-connectivity_de.ts | 10 +++++----- translations/kylin-connectivity_en.ts | 10 +++++----- translations/kylin-connectivity_es.ts | 10 +++++----- translations/kylin-connectivity_ug_CN.ts | 10 +++++----- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/kylin-connectivity.desktop b/kylin-connectivity.desktop index ab11177..62cea86 100755 --- a/kylin-connectivity.desktop +++ b/kylin-connectivity.desktop @@ -6,21 +6,21 @@ Name[bo_CN]=ཕན་ཚུན་འབྲེལ་མཐུད་བྱེད Name[mn]=ᠣᠯᠠᠨ ᠦᠵᠦᠬᠦᠷ ᠲᠤ᠌ ᠬᠠᠮᠵᠢᠯᠴᠠᠬᠤ Name[zh_HK]=多端協同 Name[kk]=килин қосылымы -Name[ug]=kylin-ئۇلىنىش +Name[ug]=Kylin-ئۇلىنىش Name[ky]=килин-туташуу -Name[de]=kylin-connectivity -Name[es]=kylin-conectividad +Name[de]=Kylin-connectivity +Name[es]=Kylin-conectividad Name[fr]=Connectivité kylin -Name=kylin-connectivity +Name=Kylin-connectivity GenericName[bo_CN]=ཕན་ཚུན་འབྲེལ་མཐུད་བྱེད་པ། -GenericName=kylin-connectivity +GenericName=Kylin-connectivity GenericName[zh_CN]=多端协同 GenericName[mn]=ᠣᠯᠠᠨ ᠦᠵᠦᠬᠦᠷ ᠲᠤ᠌ ᠬᠠᠮᠵᠢᠯᠴᠠᠬᠤ GenericName[kk]=килин қосылымы -GenericName[ug]=kylin-ئۇلىنىش +GenericName[ug]=Kylin-ئۇلىنىش GenericName[ky]=килин-туташуу -GenericName[de]=kylin-connectivity -GenericName[es]=kylin-conectividad +GenericName[de]=Kylin-connectivity +GenericName[es]=Kylin-conectividad GenericName[fr]=Connectivité kylin Exec=/usr/bin/kylin-connectivity %u Icon=kylin-connectivity diff --git a/translations/kylin-connectivity_de.ts b/translations/kylin-connectivity_de.ts index a4d63cb..ce60837 100644 --- a/translations/kylin-connectivity_de.ts +++ b/translations/kylin-connectivity_de.ts @@ -312,7 +312,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -582,7 +582,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -754,7 +754,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -830,7 +830,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -885,7 +885,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity diff --git a/translations/kylin-connectivity_en.ts b/translations/kylin-connectivity_en.ts index d4d607a..fb54d8f 100644 --- a/translations/kylin-connectivity_en.ts +++ b/translations/kylin-connectivity_en.ts @@ -310,7 +310,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -559,7 +559,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -740,7 +740,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -816,7 +816,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity @@ -871,7 +871,7 @@ kylin-connectivity - kylin-connectivity + Kylin-connectivity diff --git a/translations/kylin-connectivity_es.ts b/translations/kylin-connectivity_es.ts index 4f0d73b..e501366 100644 --- a/translations/kylin-connectivity_es.ts +++ b/translations/kylin-connectivity_es.ts @@ -312,7 +312,7 @@ kylin-connectivity - kylin-conectividad + Kylin-connectivity @@ -582,7 +582,7 @@ kylin-connectivity - kylin-conectividad + Kylin-connectivity @@ -754,7 +754,7 @@ kylin-connectivity - kylin-conectividad + Kylin-connectivity @@ -830,7 +830,7 @@ kylin-connectivity - kylin-conectividad + Kylin-connectivity @@ -885,7 +885,7 @@ kylin-connectivity - kylin-conectividad + Kylin-connectivity diff --git a/translations/kylin-connectivity_ug_CN.ts b/translations/kylin-connectivity_ug_CN.ts index 1e87251..0f431f3 100644 --- a/translations/kylin-connectivity_ug_CN.ts +++ b/translations/kylin-connectivity_ug_CN.ts @@ -312,7 +312,7 @@ kylin-connectivity - kylin-ئۇلىنىش + Kylin-ئۇلىنىش @@ -582,7 +582,7 @@ kylin-connectivity - kylin-ئۇلىنىش + Kylin-ئۇلىنىش @@ -754,7 +754,7 @@ kylin-connectivity - kylin-ئۇلىنىش + Kylin-ئۇلىنىش @@ -830,7 +830,7 @@ kylin-connectivity - kylin-ئۇلىنىش + Kylin-ئۇلىنىش @@ -885,7 +885,7 @@ kylin-connectivity - kylin-ئۇلىنىش + Kylin-ئۇلىنىش -- Gitee From 56b6045667245bf04b16fd7ba5e6d60322e7e786 Mon Sep 17 00:00:00 2001 From: "huheng@kylinos.cn" Date: Mon, 20 May 2024 11:27:35 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=94=A7=20build(debian):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 068e555..93effe0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ + + kylin-connectivity (1.1.0.1-ok0.25) yangtze; urgency=medium - * BUG: 无 + * BUG: #I8OE0X 【多端协同】无法搜索到附近设备 * 需求:无 - * 其他改动说明:修复设备搜索无法使用问题 + * 其他改动说明:修复设备搜索无法使用问题;修改翻译 * 其他改动影响域:无 - -- huheng Mon, 06 May 2024 15:50:53 +0800 + -- huheng Mon, 20 May 2024 11:25:16 +0800 kylin-connectivity (1.1.0.1-ok0.24) yangtze; urgency=medium -- Gitee From df4ed33c19ee80721d74992d8e1dcab53283ffaf Mon Sep 17 00:00:00 2001 From: "huheng@kylinos.cn" Date: Mon, 20 May 2024 13:59:12 +0800 Subject: [PATCH 6/6] =?UTF-8?q?build(debian):=E4=BF=AE=E6=94=B9changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 93effe0..051e776 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,7 @@ kylin-connectivity (1.1.0.1-ok0.25) yangtze; urgency=medium * BUG: #I8OE0X 【多端协同】无法搜索到附近设备 * 需求:无 - * 其他改动说明:修复设备搜索无法使用问题;修改翻译 + * 其他改动说明:修复设备搜索无法使用问题;修改翻译;更新翻译处理 * 其他改动影响域:无 -- huheng Mon, 20 May 2024 11:25:16 +0800 -- Gitee