feat: 发送到桌面成功播放音频
添加发送到桌面的音频 Log: Influence: Task: https://pms.uniontech.com/task-view-229565.html Change-Id: Iaaac27fff53d45dacca407a4599a7a428ded772d
This commit is contained in:
parent
7b22381002
commit
be1f2950a0
1
debian/control
vendored
1
debian/control
vendored
@ -10,6 +10,7 @@ Build-Depends:
|
||||
qt5-qmake,
|
||||
qtbase5-dev,
|
||||
qttools5-dev,
|
||||
libdtkwidget-dev (>=5.4.19),
|
||||
libdtkcore-dev (>=5.4.14),
|
||||
libdtkcore5-bin (>=5.4.14),
|
||||
libxcb1-dev,
|
||||
|
@ -40,13 +40,14 @@
|
||||
#include <QEventLoop>
|
||||
|
||||
#include <DSysInfo>
|
||||
#include <DDesktopServices>
|
||||
|
||||
#include <regex>
|
||||
#include <stdlib.h>
|
||||
#include <thread>
|
||||
|
||||
DCORE_USE_NAMESPACE
|
||||
DCORE_USE_NAMESPACE
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
#define SETTING LauncherSettings::instance()
|
||||
|
||||
@ -275,11 +276,8 @@ bool Launcher::requestSendToDesktop(QString appId)
|
||||
if (!dinfo.getKeyFile()->saveToFile(filePath.toStdString()))
|
||||
return false;
|
||||
|
||||
std::thread thread([]() {
|
||||
// TODO 播放系统音效
|
||||
|
||||
});
|
||||
thread.detach();
|
||||
// 播放音频
|
||||
DDesktopServices::playSystemSoundEffect(DDesktopServices::SSE_SendFileComplete);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2,8 +2,10 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core DBus Concurrent Gui)
|
||||
find_package(DtkCore REQUIRED)
|
||||
find_package(DtkWidget REQUIRED)
|
||||
|
||||
pkg_check_modules(XCB REQUIRED IMPORTED_TARGET xcb-icccm xcb-ewmh xcb)
|
||||
pkg_check_modules(X11 REQUIRED IMPORTED_TARGET x11)
|
||||
@ -49,6 +51,7 @@ target_link_libraries(deepin-application-manager
|
||||
Qt5::DBus
|
||||
Qt5::Concurrent
|
||||
${DtkCore_LIBRARIES}
|
||||
${DtkWidget_LIBRARIES}
|
||||
pthread
|
||||
PkgConfig::XCB
|
||||
PkgConfig::X11
|
||||
|
Loading…
Reference in New Issue
Block a user