+ // Get the arguments.
+ QStringList argumentsStringList = qApp->arguments();
+
+ // Check to see if the arguments lists contains a URL.
+ if (argumentsStringList.size() > 1)
+ {
+ // Load the URL from the arguments list.
+ webEngineViewPointer->setUrl(QUrl::fromUserInput(argumentsStringList.at(1)));
+ }
+ else
+ {
+ // Load the homepage.
+ goHome();
+ }
+}
+
+void MainView::applyApplicationSettings()
+{
+ // TODO.
+}
+
+void MainView::applyDomainSettings()
+{
+ // Set the JavaScript status.
+ webEngineSettingsPointer->setAttribute(QWebEngineSettings::JavascriptEnabled, Settings::javaScript());
+
+ // Update the JavaScript button.
+ if (Settings::javaScript())
+ {
+ javaScriptButtonPointer->setIcon(QIcon(":/icons/javascript-warning"));
+ }
+ else
+ {
+ javaScriptButtonPointer->setIcon(QIcon(":/icons/privacy-mode"));
+ }
+
+ // Reload the website.
+ webEngineViewPointer->reload();