mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 添加命名空间,防止和控制中心中的类产生符号冲突
GSettingWatcher这个类在控制中心和个性化的任务栏配置插件中均存在,用命名空间进行区分 Log: Bug: https://pms.uniontech.com/zentao/bug-view-101282.html Influence: 控制中心闪退问题 Change-Id: If71613fcdf4d7f7f931c8df58e4aac93c7098686
This commit is contained in:
parent
f39d861b4f
commit
95e85b7119
@ -27,6 +27,7 @@
|
|||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
using namespace dcc_dock_plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief GSettingWatcher::GSettingWatcher 用于监听处于 \a baseSchemasId + "." + \a module 配置下的配置项内容变化,并将变化应用到绑定的控件上
|
* @brief GSettingWatcher::GSettingWatcher 用于监听处于 \a baseSchemasId + "." + \a module 配置下的配置项内容变化,并将变化应用到绑定的控件上
|
||||||
|
@ -28,9 +28,12 @@
|
|||||||
class QGSettings;
|
class QGSettings;
|
||||||
class QListView;
|
class QListView;
|
||||||
class QStandardItem;
|
class QStandardItem;
|
||||||
|
|
||||||
|
namespace dcc_dock_plugin {
|
||||||
class GSettingWatcher : public QObject
|
class GSettingWatcher : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GSettingWatcher(const QString &baseSchemasId, const QString &module, QObject *parent = nullptr);
|
GSettingWatcher(const QString &baseSchemasId, const QString &module, QObject *parent = nullptr);
|
||||||
~GSettingWatcher();
|
~GSettingWatcher();
|
||||||
@ -45,5 +48,6 @@ private:
|
|||||||
QMultiHash<QString, QWidget *> m_map;
|
QMultiHash<QString, QWidget *> m_map;
|
||||||
QGSettings *m_gsettings;
|
QGSettings *m_gsettings;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#endif // GSETTINGWATCHER_H
|
#endif // GSETTINGWATCHER_H
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "module_widget.h"
|
#include "module_widget.h"
|
||||||
#include "gsetting_watcher.h"
|
|
||||||
|
|
||||||
#include <widgets/comboxwidget.h>
|
#include <widgets/comboxwidget.h>
|
||||||
#include <widgets/titledslideritem.h>
|
#include <widgets/titledslideritem.h>
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <com_deepin_dde_daemon_dock.h>
|
#include <com_deepin_dde_daemon_dock.h>
|
||||||
|
|
||||||
#include "com_deepin_dde_dock.h"
|
#include "com_deepin_dde_dock.h"
|
||||||
|
#include "gsetting_watcher.h"
|
||||||
|
|
||||||
namespace dcc {
|
namespace dcc {
|
||||||
namespace widgets {
|
namespace widgets {
|
||||||
@ -42,11 +43,11 @@ class DTipLabel;
|
|||||||
DWIDGET_END_NAMESPACE
|
DWIDGET_END_NAMESPACE
|
||||||
|
|
||||||
class TitleLabel;
|
class TitleLabel;
|
||||||
class GSettingWatcher;
|
|
||||||
class QStandardItemModel;
|
class QStandardItemModel;
|
||||||
class QTimer;
|
class QTimer;
|
||||||
|
|
||||||
using namespace dcc::widgets;
|
using namespace dcc::widgets;
|
||||||
|
using namespace dcc_dock_plugin;
|
||||||
using DBusDock = com::deepin::dde::daemon::Dock;
|
using DBusDock = com::deepin::dde::daemon::Dock;
|
||||||
using DBusInter = com::deepin::dde::Dock;
|
using DBusInter = com::deepin::dde::Dock;
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
using namespace dcc_dock_plugin;
|
||||||
|
|
||||||
class Test_GSettingWatcher : public QObject, public ::testing::Test
|
class Test_GSettingWatcher : public QObject, public ::testing::Test
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user