<para>
<ulink url="https://easylist.to/easylist/fanboy-annoyance.txt">Fanboy’s Annoyance List</ulink> is released under the
<ulink url="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported license</ulink>, which is
- <ulink url="https://www.gnu.org/licenses/license-list.en.html#ccby">compatible with the GPLv3+</ulink>. This lists is included unchanged in Privacy Browser.
+ <ulink url="https://www.gnu.org/licenses/license-list.en.html#ccby">compatible with the GPLv3+</ulink>. This list is included unchanged in Privacy Browser.
</para>
<para>
/* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2023-2024 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2023-2024, 2026 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
*
// Qt toolkit headers.
#include <QDebug>
+#include <QScrollBar>
#include <QStandardItemModel>
// Construct the class.
void BookmarksDialog::populateBookmarks() const
{
+ // Store the current vertical scroll value.
+ int verticalScrollValue = draggableTreeViewPointer->verticalScrollBar()->value();
+
// Clear the current contents of the tree model.
treeModelPointer->clear();
// Populate the subfolders, starting with the root folder ID (`0`).
populateSubfolders(rootItemNamePointer, 0);
- // Expand all the folder.
+ // Expand all the folders.
draggableTreeViewPointer->expandAll();
+ // Restore the vertical scroll value.
+ draggableTreeViewPointer->verticalScrollBar()->setValue(verticalScrollValue);
+
// Update the UI.
updateUi();
}
QFile filterListFile(filterListFileName);
// Open the filter list file.
- filterListFile.open(QIODevice::ReadOnly);
+ bool fileOpenSuccessful = filterListFile.open(QIODevice::ReadOnly);
+
+ // Exit here if the file open was not successful.
+ if (!fileOpenSuccessful)
+ return new FilterListStruct;
// Create a filter list text stream.
QTextStream filterListTextStream(&filterListFile);
// Define the public user agent constants.
const QString UserAgentHelper::PRIVACY_BROWSER_USER_AGENT = QLatin1String("PrivacyBrowser/1.0");
-const QString UserAgentHelper::FIREFOX_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0");
-const QString UserAgentHelper::CHROMIUM_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36");
-const QString UserAgentHelper::FIREFOX_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0");
-const QString UserAgentHelper::CHROME_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36");
-const QString UserAgentHelper::EDGE_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0");
-const QString UserAgentHelper::SAFARI_MACOS_USER_AGENT = QLatin1String("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_Z) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15");
+const QString UserAgentHelper::FIREFOX_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0");
+const QString UserAgentHelper::CHROMIUM_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36");
+const QString UserAgentHelper::FIREFOX_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0");
+const QString UserAgentHelper::CHROME_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36");
+const QString UserAgentHelper::EDGE_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Edg/145.0.0.0");
+const QString UserAgentHelper::SAFARI_MACOS_USER_AGENT = QLatin1String("macOS: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15");
// Construct the class.
UserAgentHelper::UserAgentHelper() {