mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
delay load plugins
Change-Id: Ida0ee8d2f92103272aa64d3ec9873d7230867d07
This commit is contained in:
parent
dac174d756
commit
70253afad8
@ -75,6 +75,7 @@ void DockPluginsController::loadPlugins()
|
||||
#endif
|
||||
const QStringList plugins = pluginsDir.entryList(QDir::Files);
|
||||
|
||||
int pluginIndex = 0;
|
||||
for (const QString file : plugins)
|
||||
{
|
||||
if (!QLibrary::isLibrary(file))
|
||||
@ -94,9 +95,8 @@ void DockPluginsController::loadPlugins()
|
||||
continue;
|
||||
}
|
||||
|
||||
// interface->init(this);
|
||||
// delay load
|
||||
QTimer::singleShot(100, [=] {interface->init(this);});
|
||||
QTimer::singleShot(100 + (++pluginIndex) * 50, [=] {interface->init(this);});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,8 @@ int main(int argc, char *argv[])
|
||||
DLogManager::registerConsoleAppender();
|
||||
DLogManager::registerFileAppender();
|
||||
|
||||
qDebug() << "\n\ndde-dock startup";
|
||||
|
||||
#ifndef QT_DEBUG
|
||||
QDir::setCurrent(QApplication::applicationDirPath());
|
||||
#endif
|
||||
|
@ -31,6 +31,9 @@ protected:
|
||||
private slots:
|
||||
void globalMouseRelease(int button, int x, int y, const QString &id);
|
||||
|
||||
private:
|
||||
using Dtk::Widget::DArrowRectangle::show;
|
||||
|
||||
private:
|
||||
bool m_model;
|
||||
QPoint m_lastPoint;
|
||||
|
@ -13,8 +13,8 @@ NetworkManager *NetworkManager::instance(QObject *parent)
|
||||
|
||||
void NetworkManager::init()
|
||||
{
|
||||
reloadDevices();
|
||||
reloadActiveConnections();
|
||||
QTimer::singleShot(2000, this, &NetworkManager::reloadDevices);
|
||||
QTimer::singleShot(2500, this, &NetworkManager::reloadActiveConnections);
|
||||
}
|
||||
|
||||
const NetworkDevice::NetworkTypes NetworkManager::states() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user