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