Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/plugins/cooperation/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ elseif (CMAKE_SYSTEM MATCHES "Linux")
"${CMAKE_CURRENT_SOURCE_DIR}/maincontroller/linux/*.cpp"
)
find_package(Dtk COMPONENTS Widget REQUIRED)
find_path(FEATURE_DISPLAY_DIR dfeaturedisplaydialog.h PATHS ${DtkWidget_INCLUDE_DIRS})
if (FEATURE_DISPLAY_DIR)
message(STATUS "Found dfeaturedisplaydialog.h at ${FEATURE_DISPLAY_DIR}")
add_definitions(-DHAVE_DTK_FEATUREDISPLAY)
else()
message(STATUS "Could not find dfeaturedisplaydialog.h")
endif()
else()
message (FATAL_ERROR "not support on ${CMAKE_SYSTEM} yet.")
endif()
Expand Down Expand Up @@ -94,6 +101,7 @@ target_link_libraries(${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::DBus
co
)

Expand Down
4 changes: 3 additions & 1 deletion src/plugins/cooperation/core/cooperationcoreplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
# include "proxy/cooperationproxy.h"
#else
# include "base/reportlog/reportlogmanager.h"
#ifdef HAVE_DTK_FEATUREDISPLAY
# include <DFeatureDisplayDialog>
DWIDGET_USE_NAMESPACE
#endif
#endif

using namespace cooperation_core;
using namespace deepin_cross;
Expand Down Expand Up @@ -58,7 +60,7 @@ bool CooperaionCorePlugin::start()

if (CommonUitls::isFirstStart()) {
emit MainController::instance()->firstStart();
#ifdef linux
#ifdef HAVE_DTK_FEATUREDISPLAY
DFeatureDisplayDialog *dlg = qApp->featureDisplayDialog();
auto btn = dlg->getButton(0);
connect(btn, &QAbstractButton::clicked, qApp, &SingleApplication::helpActionTriggered);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/cooperation/core/utils/cooperationutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ QString CooperationUtil::localIPAddress()

void CooperationUtil::showFeatureDisplayDialog(QDialog *dlg1)
{
#ifdef linux
#ifdef HAVE_DTK_FEATUREDISPLAY
DFeatureDisplayDialog *dlg = static_cast<DFeatureDisplayDialog *>(dlg1);
auto btn = dlg->getButton(0);
btn->setText(tr("View Help Manual"));
Expand Down
7 changes: 6 additions & 1 deletion src/plugins/data-transfer/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ else()
endif()

if (WIN32)
set(qt_required_components Core Gui Network Widgets Sql WinExtras)
set(qt_required_components Core Gui Network Widgets Sql WinExtras)
else()
set(qt_required_components Core Gui Network Widgets DBus)
endif()
Expand All @@ -81,13 +81,18 @@ target_include_directories(${PROJECT_NAME}
${CMAKE_SOURCE_DIR}/src/
)

if (Qt5DBus_FOUND)
include_directories(${Qt5DBus_INCLUDE_DIRS})
endif (Qt5DBus_FOUND)

# 公共依赖库,添加到这里
target_link_libraries(${PROJECT_NAME}
deepin_cross::framework
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::DBus
co
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <QToolButton>
#include <QStackedWidget>
#include <QMovie>
#include <QApplication>

#include <utils/transferhepler.h>

Expand Down
1 change: 1 addition & 0 deletions src/plugins/data-transfer/core/gui/type_defines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#ifdef linux
# include <DFontSizeManager>
# include <DApplication>
DWIDGET_USE_NAMESPACE
#endif

Expand Down