void LiteApp::load(bool bUseSession, IApplication *baseApp) { QSplashScreen *splash = 0; bool bSplash = m_settings->value(LITEAPP_SPLASHVISIBLE,true).toBool(); if (baseApp) { bSplash = false; } if (bSplash) { splash = new QSplashScreen(QPixmap::fromImage(makeSplashImage(this)),Qt::WindowStaysOnTopHint); } if (bSplash) { splash->show(); } if (bSplash) { splash->showMessage("Scanning plugins...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); loadMimeType(); loadPlugins(); if (bSplash) { splash->showMessage("Loading plugins...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); initPlugins(); if (bSplash) { splash->showMessage("Loading state...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); loadState(); if (baseApp) { if (baseApp->mainWindow()->isMaximized()) { m_mainwindow->resize(800,600); m_mainwindow->show(); } else { QRect rc = baseApp->mainWindow()->geometry(); rc.adjust(20,20,20,20); m_mainwindow->setGeometry(rc); m_mainwindow->show(); } } else { m_mainwindow->show(); } emit loaded(); m_projectManager->setCurrentProject(0); if (bSplash) { splash->showMessage("Loading session...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); bool b = m_settings->value(LITEAPP_AUTOLOADLASTSESSION,true).toBool(); if (b && bUseSession) { loadSession("default"); } if (bSplash) { m_mainwindow->raise(); splash->finish(m_mainwindow); splash->deleteLater(); } this->appendLog("HtmlWidgetFactory",m_htmlWidgetManager->classNameList().join(" ")); this->appendLog("DefaultHtmlWidgetFactory",m_htmlWidgetManager->defaultClassName()); m_goProxy->call("version"); appendLog("LiteApp","Finished loading"); }
void LiteApp::load(bool bUseSession) { QSplashScreen *splash = 0; bool bSplash = m_settings->value(LITEAPP_SPLASHVISIBLE,true).toBool(); if (bSplash) { splash = new QSplashScreen(QPixmap::fromImage(makeSplashImage(this)),Qt::WindowStaysOnTopHint); } if (bSplash) { splash->show(); } if (bSplash) { splash->showMessage("liteide scan plugins ...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); loadMimeType(); loadPlugins(); if (bSplash) { splash->showMessage("liteide load plugins ...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); initPlugins(); if (bSplash) { splash->showMessage("liteide load state ...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); loadState(); m_mainwindow->show(); emit loaded(); m_projectManager->setCurrentProject(0); if (bSplash) { splash->showMessage("liteide load session ...",Qt::AlignLeft|Qt::AlignBottom); } qApp->processEvents(); appendLog("LiteApp","loaded"); bool b = m_settings->value(LITEAPP_AUTOLOADLASTSESSION,true).toBool(); if (b && bUseSession) { loadSession("default"); } if (bSplash) { m_mainwindow->raise(); splash->finish(m_mainwindow); splash->deleteLater(); } this->appendLog("HtmlWidgetFactory",m_htmlWidgetManager->classNameList().join(" ")); this->appendLog("DefaultHtmlWidgetFactory",m_htmlWidgetManager->defaultClassName()); m_goProxy->call("version"); m_goProxy->call("cmdlist"); }