Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
467 changes: 467 additions & 0 deletions LICENSES/LGPL-2.1-only.txt

Large diffs are not rendered by default.

163 changes: 163 additions & 0 deletions LICENSES/LGPL-3.0-only.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
GNU LESSER GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.

This version of the GNU Lesser General Public License incorporates the terms
and conditions of version 3 of the GNU General Public License, supplemented
by the additional permissions listed below.

0. Additional Definitions.



As used herein, "this License" refers to version 3 of the GNU Lesser General
Public License, and the "GNU GPL" refers to version 3 of the GNU General Public
License.



"The Library" refers to a covered work governed by this License, other than
an Application or a Combined Work as defined below.



An "Application" is any work that makes use of an interface provided by the
Library, but which is not otherwise based on the Library. Defining a subclass
of a class defined by the Library is deemed a mode of using an interface provided
by the Library.



A "Combined Work" is a work produced by combining or linking an Application
with the Library. The particular version of the Library with which the Combined
Work was made is also called the "Linked Version".



The "Minimal Corresponding Source" for a Combined Work means the Corresponding
Source for the Combined Work, excluding any source code for portions of the
Combined Work that, considered in isolation, are based on the Application,
and not on the Linked Version.



The "Corresponding Application Code" for a Combined Work means the object
code and/or source code for the Application, including any data and utility
programs needed for reproducing the Combined Work from the Application, but
excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License without
being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a facility
refers to a function or data to be supplied by an Application that uses the
facility (other than as an argument passed when the facility is invoked),
then you may convey a copy of the modified version:

a) under this License, provided that you make a good faith effort to ensure
that, in the event an Application does not supply the function or data, the
facility still operates, and performs whatever part of its purpose remains
meaningful, or

b) under the GNU GPL, with none of the additional permissions of this License
applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from a header
file that is part of the Library. You may convey such object code under terms
of your choice, provided that, if the incorporated material is not limited
to numerical parameters, data structure layouts and accessors, or small macros,
inline functions and templates (ten or fewer lines in length), you do both
of the following:

a) Give prominent notice with each copy of the object code that the Library
is used in it and that the Library and its use are covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that, taken together,
effectively do not restrict modification of the portions of the Library contained
in the Combined Work and reverse engineering for debugging such modifications,
if you also do each of the following:

a) Give prominent notice with each copy of the Combined Work that the Library
is used in it and that the Library and its use are covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during execution, include
the copyright notice for the Library among these notices, as well as a reference
directing the user to the copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this License,
and the Corresponding Application Code in a form suitable for, and under terms
that permit, the user to recombine or relink the Application with a modified
version of the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying Corresponding Source.

1) Use a suitable shared library mechanism for linking with the Library. A
suitable mechanism is one that (a) uses at run time a copy of the Library
already present on the user's computer system, and (b) will operate properly
with a modified version of the Library that is interface-compatible with the
Linked Version.

e) Provide Installation Information, but only if you would otherwise be required
to provide such information under section 6 of the GNU GPL, and only to the
extent that such information is necessary to install and execute a modified
version of the Combined Work produced by recombining or relinking the Application
with a modified version of the Linked Version. (If you use option 4d0, the
Installation Information must accompany the Minimal Corresponding Source and
Corresponding Application Code. If you use option 4d1, you must provide the
Installation Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the Library side
by side in a single library together with other library facilities that are
not Applications and are not covered by this License, and convey such a combined
library under terms of your choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based on the
Library, uncombined with any other library facilities, conveyed under the
terms of this License.

b) Give prominent notice with the combined library that part of it is a work
based on the Library, and explaining where to find the accompanying uncombined
form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions of the
GNU Lesser General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to address
new problems or concerns.

Each version is given a distinguishing version number. If the Library as you
received it specifies that a certain numbered version of the GNU Lesser General
Public License "or any later version" applies to it, you have the option of
following the terms and conditions either of that published version or of
any later version published by the Free Software Foundation. If the Library
as you received it does not specify a version number of the GNU Lesser General
Public License, you may choose any version of the GNU Lesser General Public
License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide whether
future versions of the GNU Lesser General Public License shall apply, that
proxy's public statement of acceptance of any version is permanent authorization
for you to choose that version for the Library.
12 changes: 12 additions & 0 deletions LICENSES/LicenseRef-KDE-Accepted-LGPL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the license or (at your option) any later version
that is accepted by the membership of KDE e.V. (or its successor
approved by the membership of KDE e.V.), which shall act as a
proxy as defined in Section 6 of version 3 of the license.

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.
1 change: 1 addition & 0 deletions archlinux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ makedepends=('git'
'ninja'
'extra-cmake-modules'
'wayland-protocols'
'libnm'
)
conflicts=('dde-shell')
provides=('dde-shell')
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Build-Depends:
libxres-dev,
libxtst-dev,
libdframeworkdbus-dev,
libnm-dev (>= 1.4.0~),
Standards-Version: 3.9.8
Homepage: http://www.deepin.org

Expand Down
3 changes: 3 additions & 0 deletions debian/dde-shell.install
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ usr/lib/*/dde-shell/org.deepin.ds.notification*
usr/share/dde-shell/org.deepin.ds.notification*/
usr/lib/*/dde-shell/org.deepin.ds.dde-appearance*
usr/share/dde-shell/org.deepin.ds.dde-appearance*/
usr/lib/*/dde-shell/org.deepin.ds.dde-am*
usr/share/dde-shell/org.deepin.ds.dde-am*/
usr/libexec/dockplugin-loader
usr/lib/*/qt5/plugins/wayland-shell-integration
usr/lib/*/libdde-dockplugin-interface.so.*
Expand All @@ -18,3 +20,4 @@ usr/lib/dde-dock/tmp/plugins
usr/lib/dde-dock/tmp/plugins/quick-trays
usr/share/dde-dock/tmp/translations
usr/share/dde-shell/*/translations
usr/share/dock-network-plugin/tmp/translations
47 changes: 25 additions & 22 deletions panels/dock/tray/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,6 @@ endfunction(generation_dbus_interface)

file(GLOB INTERFACES "interfaces/*.h")
add_definitions(-DCVERSION="${VERSION}")
#因为单元测试需要直接测试源代码,而主程序代码中include的单元使用了相对路径
#单元测试的CMakeLists和主程序的CMakeLists路径不同,编译单元测试时会提示找不到文件
#因此设置搜索路径
include_directories(
frame/accessible
frame/controller
frame/dbus
frame/dbus/sni
frame/display
frame/item
frame/item/components
frame/item/resources
frame/model
frame/util
frame/window
frame/window/components
frame/window/tray
frame/window/tray/widgets
frame/xcb
../widgets
../interfaces
)
aux_source_directory(frame/accessible ACCESSIBLE)
aux_source_directory(frame/controller CONTROLLER)
aux_source_directory(frame/dbus DBUS)
Expand Down Expand Up @@ -129,9 +107,34 @@ file(GLOB SRC_PATH
${XCB}
)

add_subdirectory("networkmanager-qt")
add_subdirectory("frame")
add_subdirectory("plugins")
add_subdirectory("libdbusmenu-qt")

#因为单元测试需要直接测试源代码,而主程序代码中include的单元使用了相对路径
#单元测试的CMakeLists和主程序的CMakeLists路径不同,编译单元测试时会提示找不到文件
#因此设置搜索路径
# include_directories(
# frame/accessible
# frame/controller
# frame/dbus
# frame/dbus/sni
# frame/display
# frame/item
# frame/item/components
# frame/item/resources
# frame/model
# frame/util
# frame/window
# frame/window/components
# frame/window/tray
# frame/window/tray/widgets
# frame/xcb
# ../widgets
# ../interfaces
# )

## qm files
file(GLOB QM_FILES "translations/*.qm")
install(FILES ${QM_FILES}
Expand Down
1 change: 1 addition & 0 deletions panels/dock/tray/frame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ target_include_directories(${BIN_NAME} PUBLIC
accessible
controller
dbus
dbus/sni
display
item
item/components
Expand Down
101 changes: 101 additions & 0 deletions panels/dock/tray/networkmanager-qt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
cmake_minimum_required(VERSION 3.16)

set(KF_VERSION "5.103.0") # handled by release scripts
project(NetworkManagerQt VERSION ${KF_VERSION})

include(FeatureSummary)
find_package(ECM 5.103.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)


set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})

find_package(PkgConfig)
pkg_search_module(NetworkManager REQUIRED IMPORTED_TARGET libnm>=1.4.0)
pkg_search_module(Gio REQUIRED IMPORTED_TARGET gio-2.0)

include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)

include(KDEGitCommitHooks)
include(ECMDeprecationSettings)

set(REQUIRED_QT_VERSION 6.6.1)
set(QT_MAJOR_VERSION 6)
find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} REQUIRED Core DBus Network)

remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY)


include(GenerateExportHeader)

include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(ECMAddQch)
include(ECMQtDeclareLoggingCategory)

set(BUILD_TESTING OFF)
option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")

ecm_setup_version(PROJECT VARIABLE_PREFIX NETWORKMANAGERQT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/networkmanagerqt_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5NetworkManagerQtConfigVersion.cmake"
SOVERSION 6)
ecm_set_disabled_deprecation_versions(
QT 6.6.1
)

# Enable unit testing
if (BUILD_TESTING)
add_subdirectory(src/fakenetwork)
add_subdirectory(autotests)
endif ()

add_subdirectory(src)
################## examples ################################
option(BUILD_EXAMPLES "Build example applications" FALSE)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif(BUILD_EXAMPLES)

# create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5NetworkManagerQt")

if (BUILD_QCH)
ecm_install_qch_export(
TARGETS KF5NetworkManagerQt_QCH
FILE KF5NetworkManagerQtQchTargets.cmake
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5NetworkManagerQtQchTargets.cmake\")")
endif()

include(CMakePackageConfigHelpers)

configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5NetworkManagerQtConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5NetworkManagerQtConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)

# install(FILES
# "${CMAKE_CURRENT_BINARY_DIR}/KF5NetworkManagerQtConfig.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/KF5NetworkManagerQtConfigVersion.cmake"
# DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
# COMPONENT Devel
# )

# install(EXPORT KF5NetworkManagerQtTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5NetworkManagerQtTargets.cmake NAMESPACE KF5:: )

# install(FILES
# ${CMAKE_CURRENT_BINARY_DIR}/networkmanagerqt_version.h
# DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/NetworkManagerQt COMPONENT Devel
# )

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(Qt@QT_MAJOR_VERSION@Core @REQUIRED_QT_VERSION@)
find_dependency(Qt@QT_MAJOR_VERSION@DBus @REQUIRED_QT_VERSION@)

find_package(PkgConfig)
pkg_search_module(NetworkManager REQUIRED IMPORTED_TARGET libnm>=1.4.0)
pkg_search_module(Gio REQUIRED IMPORTED_TARGET gio-2.0)

include("${CMAKE_CURRENT_LIST_DIR}/KF5NetworkManagerQtTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
Loading