mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
feat: use gsettings value delay load plugins
Change-Id: I11a92de9a2b2773ccaeef883042b18f7e25ede80
This commit is contained in:
parent
a6b87571c6
commit
3ac07aedb3
Notes:
gerrit
2018-05-23 08:56:46 +08:00
Code-Review+2: sbwtw <sbw@sbw.so> Verified+1: Anonymous Coward #1000004 Submitted-by: kirigayakazushin <lxz@ilxz.me> Submitted-at: Wed, 23 May 2018 08:56:45 +0800 Reviewed-on: https://cr.deepin.io/34327 Project: dde/dde-dock Branch: refs/heads/master
@ -17,6 +17,7 @@ find_package(DtkWidget REQUIRED)
|
||||
|
||||
pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11)
|
||||
pkg_check_modules(DFrameworkDBus REQUIRED dframeworkdbus)
|
||||
pkg_check_modules(QGSettings REQUIRED gsettings-qt)
|
||||
|
||||
# driver-manager
|
||||
add_executable(${BIN_NAME} ${SRCS} ${INTERFACES} item/resources.qrc)
|
||||
@ -25,6 +26,7 @@ target_include_directories(${BIN_NAME} PUBLIC ${DtkWidget_INCLUDE_DIRS}
|
||||
${DFrameworkDBus_INCLUDE_DIRS}
|
||||
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}
|
||||
${QGSettings_INCLUDE_DIRS}
|
||||
../interfaces)
|
||||
target_link_libraries(${BIN_NAME} PRIVATE
|
||||
${XCB_EWMH_LIBRARIES}
|
||||
@ -34,6 +36,7 @@ target_link_libraries(${BIN_NAME} PRIVATE
|
||||
${Qt5Concurrent_LIBRARIES}
|
||||
${Qt5X11Extras_LIBRARIES}
|
||||
${Qt5DBus_LIBRARIES}
|
||||
${QGSettings_LIBRARIES}
|
||||
)
|
||||
|
||||
# bin
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QGSettings>
|
||||
|
||||
#define API_VERSION "1.0"
|
||||
|
||||
@ -35,7 +36,9 @@ DockPluginsController::DockPluginsController(DockItemController *itemControllerI
|
||||
{
|
||||
qApp->installEventFilter(this);
|
||||
|
||||
QTimer::singleShot(2000, this, &DockPluginsController::startLoader);
|
||||
QGSettings gsetting("com.deepin.dde.dock", "/com/deepin/dde/dock/");
|
||||
|
||||
QTimer::singleShot(gsetting.get("delay-plugins-time").toUInt(), this, &DockPluginsController::startLoader);
|
||||
}
|
||||
|
||||
void DockPluginsController::itemAdded(PluginsItemInterface * const itemInter, const QString &itemKey)
|
||||
|
Loading…
x
Reference in New Issue
Block a user