mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Plugins: Load plugins before creating first window
This commit is contained in:
parent
01b4fd971f
commit
b4f9a354d7
|
@ -245,10 +245,6 @@ MainApplication::MainApplication(int &argc, char** argv)
|
|||
connect(m_autoSaver, SIGNAL(save()), this, SLOT(saveSession()));
|
||||
|
||||
translateApp();
|
||||
|
||||
BrowserWindow* window = createWindow(Qz::BW_FirstAppWindow, startUrl);
|
||||
connect(window, SIGNAL(startingCompleted()), this, SLOT(restoreOverrideCursor()));
|
||||
|
||||
loadSettings();
|
||||
|
||||
m_plugins = new PluginProxy;
|
||||
|
@ -257,6 +253,10 @@ MainApplication::MainApplication(int &argc, char** argv)
|
|||
m_plugins->loadPlugins();
|
||||
}
|
||||
|
||||
BrowserWindow* window = createWindow(Qz::BW_FirstAppWindow, startUrl);
|
||||
connect(window, SIGNAL(startingCompleted()), this, SLOT(restoreOverrideCursor()));
|
||||
|
||||
|
||||
if (!isPrivate()) {
|
||||
Settings settings;
|
||||
m_isStartingAfterCrash = settings.value("SessionRestore/isRunning", false).toBool();
|
||||
|
@ -882,9 +882,11 @@ void MainApplication::loadSettings()
|
|||
#endif
|
||||
|
||||
setWheelScrollLines(settings.value("wheelScrollLines", wheelScrollLines()).toInt());
|
||||
webSettings->setUserStyleSheetUrl(userStyleSheet(settings.value("userStyleSheet", QString()).toString()));
|
||||
const QString userCss = settings.value("userStyleSheet", QString()).toString();
|
||||
settings.endGroup();
|
||||
|
||||
webSettings->setUserStyleSheetUrl(userStyleSheet(userCss));
|
||||
|
||||
settings.beginGroup("Browser-Fonts");
|
||||
webSettings->setFontFamily(QWebSettings::StandardFont, settings.value("StandardFont", webSettings->fontFamily(QWebSettings::StandardFont)).toString());
|
||||
webSettings->setFontFamily(QWebSettings::CursiveFont, settings.value("CursiveFont", webSettings->fontFamily(QWebSettings::CursiveFont)).toString());
|
||||
|
@ -953,8 +955,7 @@ void MainApplication::loadTheme(const QString &name)
|
|||
|
||||
void MainApplication::translateApp()
|
||||
{
|
||||
Settings settings;
|
||||
QString file = settings.value(QSL("Language/language"), QLocale::system().name()).toString();
|
||||
QString file = Settings().value(QSL("Language/language"), QLocale::system().name()).toString();
|
||||
|
||||
if (!file.isEmpty() && !file.endsWith(QL1S(".qm"))) {
|
||||
file.append(QL1S(".qm"));
|
||||
|
|
|
@ -76,5 +76,3 @@ void QzSettings::saveSettings()
|
|||
settings.setValue("TabsOnTop", tabsOnTop);
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ void TestPlugin::init(InitState state, const QString &settingsPath)
|
|||
// State can be either StartupInitState or LateInitState, and it
|
||||
// indicates when the plugin have been loaded.
|
||||
// Currently, it can be from preferences, or automatically at startup.
|
||||
// Plugins are loaded before first BrowserWindow is created.
|
||||
Q_UNUSED(state)
|
||||
|
||||
// Registering this plugin as a MousePressHandler.
|
||||
|
|
Loading…
Reference in New Issue
Block a user