[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Fri Oct 7 19:33:06 CEST 2005
SVN commit 468318 by staikos:
delay loading of extensions - gives a big boost in the apparent startup time
when the JS extension is active, but it's not really a boost since it just
churns later.
M +16 -13 kst.cpp
M +1 -0 kst.h
--- trunk/extragear/graphics/kst/kst/kst.cpp #468317:468318
@@ -210,19 +210,6 @@
QTimer::singleShot(0, this, SLOT(updateActions()));
- // load any extensions
- ExtensionMgr *mgr = ExtensionMgr::self();
- mgr->setWindow(this);
- KService::List sl = KServiceType::offers("Kst Extension");
- for (KService::List::ConstIterator it = sl.begin(); it != sl.end(); ++it) {
- KService::Ptr service = *it;
- QString name = service->property("Name").toString();
- if (!mgr->enabled(name) && !service->property("X-Kst-Enabled").toBool()) {
- continue;
- }
- mgr->loadExtension(service);
- }
-
checkFontPresent("Symbol");
checkFontPresent("Helvetica");
@@ -250,6 +237,7 @@
}
connect(windowMenu(), SIGNAL(aboutToShow()), this, SLOT(addNewWindowMenu()));
}
+ QTimer::singleShot(0, this, SLOT(loadExtensions()));
}
@@ -289,6 +277,21 @@
}
+void KstApp::loadExtensions() {
+ ExtensionMgr *mgr = ExtensionMgr::self();
+ mgr->setWindow(this);
+ KService::List sl = KServiceType::offers("Kst Extension");
+ for (KService::List::ConstIterator it = sl.begin(); it != sl.end(); ++it) {
+ KService::Ptr service = *it;
+ QString name = service->property("Name").toString();
+ if (!mgr->enabled(name) && !service->property("X-Kst-Enabled").toBool()) {
+ continue;
+ }
+ mgr->loadExtension(service);
+ }
+}
+
+
void KstApp::addNewWindowMenu() {
int id = windowMenu()->insertItem(i18n("&New..."), this, SLOT(slotFileNewWindow()), 0, -1, 0);
windowMenu()->setWhatsThis(id, i18n("Create a new plot window."));
--- trunk/extragear/graphics/kst/kst/kst.h #468317:468318
@@ -204,6 +204,7 @@
private slots:
// Hack to update KStdActions
void updateActions();
+ void loadExtensions();
// for the kaction
void toggleDataMode();
More information about the Kst
mailing list