refactor: remove load plugins timer

This commit is contained in:
justforlxz.com 2019-06-25 18:41:46 +08:00 committed by 流年匆忙
parent 42e1cf492a
commit d7b3b4a59a
4 changed files with 6 additions and 9 deletions

View File

@ -133,7 +133,7 @@ void AbstractPluginsController::startLoader(PluginLoader *loader)
QGSettings gsetting("com.deepin.dde.dock", "/com/deepin/dde/dock/");
QTimer::singleShot(gsetting.get("delay-plugins-time").toUInt(),
loader, [=] { loader->start(QThread::LowestPriority); });
loader, [=] { loader->start(QThread::NormalPriority); });
}
void AbstractPluginsController::displayModeChanged()

View File

@ -46,8 +46,6 @@ void PluginLoader::run()
continue;
emit pluginFounded(pluginsDir.absoluteFilePath(file));
msleep(500);
}
emit finished();

View File

@ -141,7 +141,7 @@ void MainWindow::launch()
});
qApp->processEvents();
QTimer::singleShot(300, this, &MainWindow::show);
QTimer::singleShot(0, this, &MainWindow::show);
}
bool MainWindow::event(QEvent *e)

View File

@ -50,10 +50,10 @@ TrayPlugin::TrayPlugin(QObject *parent)
m_refreshSNIItemsTimer(new QTimer(this)),
m_tipsLabel(new TipsWidget)
{
m_refreshXEmbedItemsTimer->setInterval(500);
m_refreshXEmbedItemsTimer->setInterval(0);
m_refreshXEmbedItemsTimer->setSingleShot(true);
m_refreshSNIItemsTimer->setInterval(500);
m_refreshSNIItemsTimer->setInterval(0);
m_refreshSNIItemsTimer->setSingleShot(true);
m_tipsLabel->setObjectName("tray");
@ -92,9 +92,8 @@ void TrayPlugin::init(PluginProxyInterface *proxyInter)
QTimer::singleShot(0, this, &TrayPlugin::loadIndicator);
QTimer::singleShot(0, m_systemTraysController, &SystemTraysController::startLoader);
QTimer::singleShot(3000, this, &TrayPlugin::initSNI);
QTimer::singleShot(4000, this, &TrayPlugin::initXEmbed);
QTimer::singleShot(0, this, &TrayPlugin::initSNI);
QTimer::singleShot(0, this, &TrayPlugin::initXEmbed);
}
bool TrayPlugin::pluginIsDisable()