X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fmainview.cpp;h=5c596624d3a130192f6aae13eea3363d07ac2c07;hp=b1adcbf2dc49f66c6796fb18a5e8a520c159e572;hb=5452b388e3fcfc1c86a234f8354edab04354aa3a;hpb=8e2e267828a6fbd7ed9950204c50a100e3f413fa diff --git a/src/mainview.cpp b/src/mainview.cpp index b1adcbf..5c59662 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -60,12 +60,15 @@ MainView::MainView(QWidget *parent) : QWidget(parent) // Set the focus on the WebEngine view. webEngineViewPointer->setFocus(); - // Load a website. - webEngineViewPointer->setUrl(QUrl(QStringLiteral("https://www.stoutner.com/"))); + // Load the homepage. TODO. Consider sanitizing the homepage input and adding things like protocols if they are missing. + webEngineViewPointer->setUrl(Settings::homepage()); } void MainView::loadUrl(const QString &urlFromUser) { + // Remove the focus from the URL line edit. + urlLineEditPointer->clearFocus(); + // Load the URL, adding standard protocol sections if needed. TODO. Replace this with logic that prefers HTTPS. webEngineViewPointer->setUrl(QUrl::fromUserInput(urlFromUser)); }