fully-fledged webkit-free welcome mode

pros:
- the non-webkit version is not castrated any more
- i18n should become simpler
  - but need to make the buttons non-labels for optimal results
- if we introduce delayed loading of the help plugin, we would get
  webkit loading out of the startup's critical path alltogether

cons:
- the page might be a bit harder to modify for some
This commit is contained in:
Oswald Buddenhagen
2009-04-22 18:17:50 +02:00
parent b4245ac15c
commit f48f23c89d
39 changed files with 1071 additions and 708 deletions

View File

@@ -68,6 +68,11 @@
#include <QtGui/QComboBox>
#include <QtHelp/QHelpEngine>
#ifndef QT_NO_WEBKIT
#include <QtGui/QApplication>
#include <QtWebKit/QWebSettings>
#endif
using namespace Help;
using namespace Help::Internal;
@@ -139,6 +144,13 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
qApp->installTranslator(qtr);
}
#ifndef QT_NO_WEBKIT
QWebSettings *webSettings = QWebSettings::globalSettings();
const QFont applicationFont = QApplication::font();
webSettings->setFontFamily(QWebSettings::StandardFont, applicationFont.family());
//webSettings->setFontSize(QWebSettings::DefaultFontSize, applicationFont.pointSize());
#endif
// FIXME shouldn't the help engine create the directory if it doesn't exist?
QFileInfo fi(m_core->settings()->fileName());
QDir directory(fi.absolutePath()+"/qtcreator");
@@ -510,7 +522,7 @@ void HelpPlugin::extensionsInitialized()
m_bookmarkManager->setupBookmarkModels();
if (Core::Internal::WelcomeMode *welcomeMode = qobject_cast<Core::Internal::WelcomeMode*>(m_core->modeManager()->mode(Core::Constants::MODE_WELCOME))) {
connect(welcomeMode, SIGNAL(requestHelp(QString)), this, SLOT(openGettingStarted()));
connect(welcomeMode, SIGNAL(requestHelp()), this, SLOT(openGettingStarted()));
}
}