// 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));
}
You should have received a copy of the GNU General Public License
along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>. -->
+ <!-- The options are partially displayed at <https://api.kde.org/frameworks/kconfig/html/classKConfigSkeleton.html>. -->
<kcfg
xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<kcfgfile name="settings"/>
<group name="General">
+ <entry name="homepage" type="Url">
+ <default>https://www.mojeek.com/</default>
+ </entry>
+
<entry name="zoomFactor" type="Double">
<default>1.00</default>
</entry>
<layout class="QFormLayout">
<item row="0" column="0">
+ <widget class="QLabel" name="homepageLabel">
+ <property name="text">
+ <string>Homepage</string>
+ </property>
+
+ <property name="toolTip">
+ <string>Set the hompage.</string>
+ </property>
+
+ <property name="whatsThis">
+ <string>Set the homepage. The default is https://www.mojeek.com/.</string>
+ </property>
+ </widget>
+ </item>
+
+ <item row="0" column="1">
+ <widget class="KLineEdit" name="kcfg_homepage">
+ <property name="toolTip">
+ <string>Set the hompage.</string>
+ </property>
+
+ <property name="whatsThis">
+ <string>Set the homepage. The default is https://www.mojeek.com/.</string>
+ </property>
+ </widget>
+ </item>
+
+
+ <item row="1" column="0">
<widget class="QLabel" name="zoomFactorLabel">
<property name="text">
<string>Zoom factor</string>
</property>
+
+ <property name="toolTip">
+ <string>Set the zoom factor between 0.25 and 5.00.</string>
+ </property>
+
+ <property name="whatsThis">
+ <string>Set the zoom factor between 0.25 and 5.00. The default is 1.00.</string>
+ </property>
</widget>
</item>
- <item row="0" column="1">
+ <item row="1" column="1">
<widget class="QDoubleSpinBox" name="kcfg_zoomFactor">
<property name="toolTip">
<string>Set the zoom factor between 0.25 and 5.00.</string>