Skip to content
Open
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
16 changes: 8 additions & 8 deletions src/dde-control-center/dccmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#include "dccmanager.h"

#include "dccapp.h"
#include "dccimageprovider.h"

Check warning on line 7 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "dccimageprovider.h" not found.

Check warning on line 7 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "dccimageprovider.h" not found.
#include "dccobject_p.h"

Check warning on line 8 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "dccobject_p.h" not found.

Check warning on line 8 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "dccobject_p.h" not found.
#include "navigationmodel.h"
#include "pluginmanager.h"
#include "dccpluginmanager.h"
#include "searchmodel.h"

#include <DGuiApplicationHelper>

Check warning on line 13 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DGuiApplicationHelper> not found. Please note: Cppcheck does not need standard library headers to get proper results.

Check warning on line 13 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DGuiApplicationHelper> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <DIconTheme>

#include <QCoreApplication>
Expand All @@ -29,11 +29,11 @@
#include <QQuickWindow>
#include <QScreen>
#include <QTimer>
#include <QTranslator>

Check warning on line 32 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QTranslator> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <QWindow>

Check warning on line 33 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QWindow> not found. Please note: Cppcheck does not need standard library headers to get proper results.

#ifdef HAVE_DDE_API_EVENTLOGGER
#include <dde-api/eventlogger.hpp>

Check warning on line 36 in src/dde-control-center/dccmanager.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <dde-api/eventlogger.hpp> not found. Please note: Cppcheck does not need standard library headers to get proper results.

// Event ID for control center page stay (10-digit number)
constexpr qint64 EVENT_LOGGER_CONTROL_CENTER_STAY = 1000600012;
Expand All @@ -58,7 +58,7 @@
, m_hideObjects(new DccObject(this))
, m_noAddObjects(new DccObject(this))
, m_noParentObjects(new DccObject(this))
, m_plugins(new PluginManager(this))
, m_plugins(new DccPluginManager(this))
, m_window(nullptr)
, m_dconfig(DConfig::create("org.deepin.dde.control-center", "org.deepin.dde.control-center", QString(), this))
, m_engine(nullptr)
Expand Down Expand Up @@ -97,8 +97,8 @@
#endif

initConfig();
connect(m_plugins, &PluginManager::addObject, this, &DccManager::addObject);
connect(m_plugins, &PluginManager::loadAllFinished, this, &DccManager::handleShowReady, Qt::QueuedConnection);
connect(m_plugins, &DccPluginManager::addObject, this, &DccManager::addObject);
connect(m_plugins, &DccPluginManager::loadAllFinished, this, &DccManager::handleShowReady, Qt::QueuedConnection);
m_showTimer = new QTimer(this);
m_showTimer->setInterval(60);
m_showTimer->setSingleShot(true);
Expand Down Expand Up @@ -380,7 +380,7 @@
setDelayedReply(true);
QObject::connect(
m_plugins,
&PluginManager::loadAllFinished,
&DccPluginManager::loadAllFinished,
this,
[this, json, message]() {
const auto &ret = this->search(json);
Expand Down Expand Up @@ -1166,11 +1166,9 @@
#ifdef DCC_ENABLE_MEMORY_MANAGEMENT
// TODO: delete m_engine会有概率崩溃
m_window = nullptr;
qCDebug(dccLog()) << "delete root begin";
DccObject *root = m_root;
m_root = nullptr;
Q_EMIT rootChanged(m_root);
qCDebug(dccLog()) << "delete root end";

qCDebug(dccLog()) << "delete clearData hide:" << m_hideObjects->getChildren().size() << "noAdd:" << m_noAddObjects->getChildren().size() << "noParent" << m_noParentObjects->getChildren().size();
delete m_noParentObjects;
Expand All @@ -1181,7 +1179,9 @@
delete m_engine;
qCDebug(dccLog()) << "clear QmlEngine";
m_engine = nullptr;
qCDebug(dccLog()) << "delete root begin";
delete root;
qCDebug(dccLog()) << "delete root end";
#endif
}

Expand All @@ -1191,7 +1191,7 @@
QEventLoop loop;
QTimer timer;
connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
connect(m_plugins, &PluginManager::loadAllFinished, &loop, &QEventLoop::quit);
connect(m_plugins, &DccPluginManager::loadAllFinished, &loop, &QEventLoop::quit);
timer.start(5000);
loop.exec();
}
Expand Down
4 changes: 2 additions & 2 deletions src/dde-control-center/dccmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ QT_END_NAMESPACE
namespace dccV25 {
class NavigationModel;
class SearchModel;
class PluginManager;
class DccPluginManager;
class DccImageProvider;

class DccManager : public DccApp, protected QDBusContext
Expand Down Expand Up @@ -135,7 +135,7 @@ private Q_SLOTS:
QVector<DccObject *> m_currentObjects; // 当前显示的页面路径,从根页面到当前页面
QVector<DccObject *> m_triggeredObjects; // 用户交互触发的对象路径,从根菜单到当前子控件

PluginManager *m_plugins;
DccPluginManager *m_plugins;
QPointer<QWindow> m_window;
Dtk::Core::DConfig *m_dconfig;
QSet<QString> m_hideModule;
Expand Down
Loading
Loading