fix: 添加命名空间,防止和控制中心中的类产生符号冲突

GSettingWatcher这个类在控制中心和个性化的任务栏配置插件中均存在,用命名空间进行区分

Log:
Bug: https://pms.uniontech.com/zentao/bug-view-101282.html
Influence: 控制中心闪退问题
Change-Id: If71613fcdf4d7f7f931c8df58e4aac93c7098686
This commit is contained in:
范朋程 2021-11-04 19:35:28 +08:00 committed by fanpengcheng
parent f39d861b4f
commit 95e85b7119
5 changed files with 9 additions and 2 deletions

View File

@ -27,6 +27,7 @@
#include <QStandardItemModel>
#include <QVariant>
#include <QWidget>
using namespace dcc_dock_plugin;
/**
* @brief GSettingWatcher::GSettingWatcher \a baseSchemasId + "." + \a module

View File

@ -28,9 +28,12 @@
class QGSettings;
class QListView;
class QStandardItem;
namespace dcc_dock_plugin {
class GSettingWatcher : public QObject
{
Q_OBJECT
public:
GSettingWatcher(const QString &baseSchemasId, const QString &module, QObject *parent = nullptr);
~GSettingWatcher();
@ -45,5 +48,6 @@ private:
QMultiHash<QString, QWidget *> m_map;
QGSettings *m_gsettings;
};
}
#endif // GSETTINGWATCHER_H

View File

@ -19,7 +19,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "module_widget.h"
#include "gsetting_watcher.h"
#include <widgets/comboxwidget.h>
#include <widgets/titledslideritem.h>

View File

@ -28,6 +28,7 @@
#include <com_deepin_dde_daemon_dock.h>
#include "com_deepin_dde_dock.h"
#include "gsetting_watcher.h"
namespace dcc {
namespace widgets {
@ -42,11 +43,11 @@ class DTipLabel;
DWIDGET_END_NAMESPACE
class TitleLabel;
class GSettingWatcher;
class QStandardItemModel;
class QTimer;
using namespace dcc::widgets;
using namespace dcc_dock_plugin;
using DBusDock = com::deepin::dde::daemon::Dock;
using DBusInter = com::deepin::dde::Dock;

View File

@ -4,6 +4,8 @@
#include <gtest/gtest.h>
using namespace dcc_dock_plugin;
class Test_GSettingWatcher : public QObject, public ::testing::Test
{};