feat: 发送到桌面成功播放音频

添加发送到桌面的音频

Log:
Influence:
Task: https://pms.uniontech.com/task-view-229565.html
Change-Id: Iaaac27fff53d45dacca407a4599a7a428ded772d
This commit is contained in:
songwentao 2022-12-20 11:03:54 +08:00
parent 7b22381002
commit be1f2950a0
3 changed files with 8 additions and 6 deletions

1
debian/control vendored
View File

@ -10,6 +10,7 @@ Build-Depends:
qt5-qmake, qt5-qmake,
qtbase5-dev, qtbase5-dev,
qttools5-dev, qttools5-dev,
libdtkwidget-dev (>=5.4.19),
libdtkcore-dev (>=5.4.14), libdtkcore-dev (>=5.4.14),
libdtkcore5-bin (>=5.4.14), libdtkcore5-bin (>=5.4.14),
libxcb1-dev, libxcb1-dev,

View File

@ -40,13 +40,14 @@
#include <QEventLoop> #include <QEventLoop>
#include <DSysInfo> #include <DSysInfo>
#include <DDesktopServices>
#include <regex> #include <regex>
#include <stdlib.h> #include <stdlib.h>
#include <thread> #include <thread>
DCORE_USE_NAMESPACE DCORE_USE_NAMESPACE
DCORE_USE_NAMESPACE DWIDGET_USE_NAMESPACE
#define SETTING LauncherSettings::instance() #define SETTING LauncherSettings::instance()
@ -275,11 +276,8 @@ bool Launcher::requestSendToDesktop(QString appId)
if (!dinfo.getKeyFile()->saveToFile(filePath.toStdString())) if (!dinfo.getKeyFile()->saveToFile(filePath.toStdString()))
return false; return false;
std::thread thread([]() { // 播放音频
// TODO 播放系统音效 DDesktopServices::playSystemSoundEffect(DDesktopServices::SSE_SendFileComplete);
});
thread.detach();
return true; return true;
} }

View File

@ -2,8 +2,10 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
find_package(PkgConfig REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core DBus Concurrent Gui) find_package(Qt5 REQUIRED COMPONENTS Core DBus Concurrent Gui)
find_package(DtkCore REQUIRED) find_package(DtkCore REQUIRED)
find_package(DtkWidget REQUIRED)
pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb-icccm xcb-ewmh xcb) pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb-icccm xcb-ewmh xcb)
pkg_check_modules(X11 REQUIRED IMPORTED_TARGET x11) pkg_check_modules(X11 REQUIRED IMPORTED_TARGET x11)
@ -49,6 +51,7 @@ target_link_libraries(deepin-application-manager
Qt5::DBus Qt5::DBus
Qt5::Concurrent Qt5::Concurrent
${DtkCore_LIBRARIES} ${DtkCore_LIBRARIES}
${DtkWidget_LIBRARIES}
pthread pthread
PkgConfig::XCB PkgConfig::XCB
PkgConfig::X11 PkgConfig::X11