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
|
#endif
|
||||||
const QStringList plugins = pluginsDir.entryList(QDir::Files);
|
const QStringList plugins = pluginsDir.entryList(QDir::Files);
|
||||||
|
|
||||||
|
int pluginIndex = 0;
|
||||||
for (const QString file : plugins)
|
for (const QString file : plugins)
|
||||||
{
|
{
|
||||||
if (!QLibrary::isLibrary(file))
|
if (!QLibrary::isLibrary(file))
|
||||||
@ -94,9 +95,8 @@ void DockPluginsController::loadPlugins()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// interface->init(this);
|
|
||||||
// delay load
|
// 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::registerConsoleAppender();
|
||||||
DLogManager::registerFileAppender();
|
DLogManager::registerFileAppender();
|
||||||
|
|
||||||
|
qDebug() << "\n\ndde-dock startup";
|
||||||
|
|
||||||
#ifndef QT_DEBUG
|
#ifndef QT_DEBUG
|
||||||
QDir::setCurrent(QApplication::applicationDirPath());
|
QDir::setCurrent(QApplication::applicationDirPath());
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,6 +31,9 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void globalMouseRelease(int button, int x, int y, const QString &id);
|
void globalMouseRelease(int button, int x, int y, const QString &id);
|
||||||
|
|
||||||
|
private:
|
||||||
|
using Dtk::Widget::DArrowRectangle::show;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_model;
|
bool m_model;
|
||||||
QPoint m_lastPoint;
|
QPoint m_lastPoint;
|
||||||
|
@ -13,8 +13,8 @@ NetworkManager *NetworkManager::instance(QObject *parent)
|
|||||||
|
|
||||||
void NetworkManager::init()
|
void NetworkManager::init()
|
||||||
{
|
{
|
||||||
reloadDevices();
|
QTimer::singleShot(2000, this, &NetworkManager::reloadDevices);
|
||||||
reloadActiveConnections();
|
QTimer::singleShot(2500, this, &NetworkManager::reloadActiveConnections);
|
||||||
}
|
}
|
||||||
|
|
||||||
const NetworkDevice::NetworkTypes NetworkManager::states() const
|
const NetworkDevice::NetworkTypes NetworkManager::states() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user