From: Soren Stoutner Date: Tue, 19 Nov 2024 20:05:23 +0000 (-0700) Subject: Fix displaying of the URL when opening a new tab from a link. https://redmine.stoutn... X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=72116e2193ffe20cfe3b44aff4ba48126800dd84;p=PrivacyBrowserPC.git Fix displaying of the URL when opening a new tab from a link. https://redmine.stoutner.com/issues/1228 --- diff --git a/src/com.stoutner.privacybrowser.desktop b/src/com.stoutner.privacybrowser.desktop index 6132f6f..ab64856 100644 --- a/src/com.stoutner.privacybrowser.desktop +++ b/src/com.stoutner.privacybrowser.desktop @@ -1,19 +1,20 @@ -# Copyright 2022-2023 Soren Stoutner . +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2022-2024 Soren Stoutner # -# This file is part of Privacy Browser PC . +# This file is part of Privacy Browser PC . # -# Privacy Browser PC is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# This program is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # -# Privacy Browser PC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU General Public License -# along with Privacy Browser PC. If not, see . +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . # The specification for the .desktop file can be found at . # The file can be validated by running `desktop-file-validate com.stoutner.privacybrowser.desktop`. @@ -44,3 +45,6 @@ X-DocPath=privacybrowser/index.html # Enumerate the supported MIME types. MimeType=text/html;application/xml;application/xhtml+xml;application/x-mimearchive;x-scheme-handler/http;x-scheme-handler/https; + +# Set the keywords, which are used for searching in addition to the Name and GenericName. +Keywords=HTTP;HTTPS diff --git a/src/privacybrowser.1 b/src/privacybrowser.1 index 82464c4..773b878 100644 --- a/src/privacybrowser.1 +++ b/src/privacybrowser.1 @@ -1,19 +1,20 @@ -.\" Copyright 2023-2024 Soren Stoutner . +.\" SPDX-License-Identifier: GPL-3.0-or-later +.\" SPDX-FileCopyrightText: 2023-2024 Soren Stoutner .\" .\" This file is part of Privacy Browser PC . .\" -.\" Privacy Browser PC is free software: you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation, either version 3 of the License, or -.\" (at your option) any later version. +.\" This program is free software: you can redistribute it and/or modify it +.\" under the terms of the GNU General Public License as published by the Free +.\" Software Foundation, either version 3 of the License, or (at your option) +.\" any later version. .\" -.\" Privacy Browser PC is distributed in the hope that it will be useful, -.\" but WITHOUT ANY WARRANTY; without even the implied warranty of -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.\" GNU General Public License for more details. +.\" This program is distributed in the hope that it will be useful, but WITHOUT +.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +.\" more details. .\" -.\" You should have received a copy of the GNU General Public License -.\" along with Privacy Browser PC. If not, see . +.\" You should have received a copy of the GNU General Public License along with +.\" this program. If not, see . .\" Title Header. .TH "Privacy Browser" 1 "30 September 2024" "version 0.6.2" "Privacy Browser User Manual" @@ -90,6 +91,11 @@ Bugs in currently implemented features may be reported at: https://redmine.stoutner.com/projects/privacy-browser-pc/issues +.\" Section Header - See Also. +.SH "SEE ALSO" +Additional documentation is available by pressing F1 inside of Privacy Browser. + + .\" Section Header - Author. .SH AUTHOR Soren Stoutner diff --git a/src/widgets/PrivacyWebEngineView.cpp b/src/widgets/PrivacyWebEngineView.cpp index fd6f897..1b5d2e7 100644 --- a/src/widgets/PrivacyWebEngineView.cpp +++ b/src/widgets/PrivacyWebEngineView.cpp @@ -1,20 +1,20 @@ -/* - * Copyright 2022-2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2022-2024 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ // Application headers. @@ -66,6 +66,9 @@ PrivacyWebEngineView::PrivacyWebEngineView(QWidget *parentWidgetPointer) : QWebE // Store the link URL whenever a link is hovered. connect(privacyWebEnginePagePointer, SIGNAL(linkHovered(const QString)), this, SLOT(saveHoveredLink(const QString))); + + // Store the URL when it changes. + connect(this, SIGNAL(urlChanged(const QUrl&)), this, SLOT(storeUpdatedUrl(const QUrl&))); } void PrivacyWebEngineView::addCookieToList(const QNetworkCookie &cookie) const @@ -420,3 +423,9 @@ void PrivacyWebEngineView::storeRequest(RequestStruct *requestStructPointer) emit(requestBlocked(blockedRequestsVector)); } } + +void PrivacyWebEngineView::storeUpdatedUrl(const QUrl &newUrl) +{ + // Store the new URL string (which changes when a new page is loaded as the current URL text. This is important when loading a new tab from a link. + currentUrlText = newUrl.toString(); +} diff --git a/src/widgets/PrivacyWebEngineView.h b/src/widgets/PrivacyWebEngineView.h index 18f87f4..3225642 100644 --- a/src/widgets/PrivacyWebEngineView.h +++ b/src/widgets/PrivacyWebEngineView.h @@ -1,20 +1,20 @@ -/* - * Copyright 2022-2024 Soren Stoutner . +/* SPDX-License-Identifier: GPL-3.0-or-later + * SPDX-FileCopyrightText: 2022-2024 Soren Stoutner * * This file is part of Privacy Browser PC . * - * Privacy Browser PC is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. * - * Privacy Browser PC is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser PC. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ #ifndef PRIVACY_WEBENGINE_VIEW_H @@ -96,6 +96,7 @@ private Q_SLOTS: void openWithFirefox() const; void saveHoveredLink(const QString &hoveredLink); void storeRequest(RequestStruct *requestStructPointer); + void storeUpdatedUrl(const QUrl &newUrl); private: // The private variables.