-# Copyright 2022-2024 Soren Stoutner <soren@stoutner.com>.
+# SPDX-License-Identifier: GPL-3.0-or-later
+# SPDX-FileCopyrightText: 2022-2024 Soren Stoutner <soren@stoutner.com>
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <https://www.gnu.org/licenses/>.
# List the sources to include in the executable.
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Application headers.
scriptLineEditPointer = filterEntryDialogUi.scriptLineEdit;
styleSheetLineEditPointer = filterEntryDialogUi.styleSheetLineEdit;
subFrameLineEditPointer = filterEntryDialogUi.subFrameLineEdit;
+ webSocketLineEditPointer = filterEntryDialogUi.webSocketLineEdit;
xmlHttpRequestLineEditPointer = filterEntryDialogUi.xmlHttpRequestLineEdit;
appliedFilterOptionsLineEditPointer = filterEntryDialogUi.appliedFilterOptionsLineEdit;
originalFilterOptionsLineEditPointer = filterEntryDialogUi.originalFilterOptionsLineEdit;
scriptLineEditPointer->setText(tableWidgetPointer->item(row, 14)->text());
styleSheetLineEditPointer->setText(tableWidgetPointer->item(row, 15)->text());
subFrameLineEditPointer->setText(tableWidgetPointer->item(row, 16)->text());
- xmlHttpRequestLineEditPointer->setText(tableWidgetPointer->item(row, 17)->text());
- appliedFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 18)->text());
- originalFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 19)->text());
- originalEntryLineEditPointer->setText(tableWidgetPointer->item(row, 20)->text());
+ webSocketLineEditPointer->setText(tableWidgetPointer->item(row, 17)->text());
+ xmlHttpRequestLineEditPointer->setText(tableWidgetPointer->item(row, 18)->text());
+ appliedFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 19)->text());
+ originalFilterOptionsLineEditPointer->setText(tableWidgetPointer->item(row, 20)->text());
+ originalEntryLineEditPointer->setText(tableWidgetPointer->item(row, 21)->text());
// Make a local copy of the has request options boolean.
bool hasRequestOptions = tableWidgetPointer->item(row, 6)->text() == i18n("Yes");
setFilterOptionBackgroundPalette(scriptLineEditPointer);
setFilterOptionBackgroundPalette(styleSheetLineEditPointer);
setFilterOptionBackgroundPalette(subFrameLineEditPointer);
+ setFilterOptionBackgroundPalette(webSocketLineEditPointer);
setFilterOptionBackgroundPalette(xmlHttpRequestLineEditPointer);
// Set the request option status.
scriptLineEditPointer->setEnabled(hasRequestOptions);
styleSheetLineEditPointer->setEnabled(hasRequestOptions);
subFrameLineEditPointer->setEnabled(hasRequestOptions);
+ webSocketLineEditPointer->setEnabled(hasRequestOptions);
xmlHttpRequestLineEditPointer->setEnabled(hasRequestOptions);
// Set the domain list line edit to have the same palette as the domain line edit.
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FILTER_ENTRY_DIALOG_H
QLineEdit *subFrameLineEditPointer;
QTableWidget *tableWidgetPointer;
QLineEdit *thirdPartyLineEditPointer;
+ QLineEdit *webSocketLineEditPointer;
QLineEdit *xmlHttpRequestLineEditPointer;
// The private functions.
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Application headers.
}
// Create the columns.
- sublistTableWidgetPointer->setColumnCount(21);
+ sublistTableWidgetPointer->setColumnCount(22);
// Create the table headers.
QTableWidgetItem *appliedEntryListHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist applied entry list header", "Applied Entry List"));
QTableWidgetItem *scriptHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist script header", "Script"));
QTableWidgetItem *styleSheetHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist style sheet header", "Style Sheet"));
QTableWidgetItem *subFrameHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist sub frame header", "Sub Frame"));
+ QTableWidgetItem *webSocketHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist web socket header", "Web Socket"));
QTableWidgetItem *xmlHttpRequestHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist XML HTTP request header", "XML HTTP Request"));
QTableWidgetItem *appliedFilterOptionsHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist applied filter options header", "Applied Filter Options"));
QTableWidgetItem *originalFilterOptionsHeaderItemPointer = new QTableWidgetItem(i18nc("Sublist original filter options header", "Original Filter Options"));
sublistTableWidgetPointer->setHorizontalHeaderItem(14, scriptHeaderItemPointer);
sublistTableWidgetPointer->setHorizontalHeaderItem(15, styleSheetHeaderItemPointer);
sublistTableWidgetPointer->setHorizontalHeaderItem(16, subFrameHeaderItemPointer);
- sublistTableWidgetPointer->setHorizontalHeaderItem(17, xmlHttpRequestHeaderItemPointer);
- sublistTableWidgetPointer->setHorizontalHeaderItem(18, appliedFilterOptionsHeaderItemPointer);
- sublistTableWidgetPointer->setHorizontalHeaderItem(19, originalFilterOptionsHeaderItemPointer);
- sublistTableWidgetPointer->setHorizontalHeaderItem(20, originalEntryHeaderItemPointer);
+ sublistTableWidgetPointer->setHorizontalHeaderItem(17, webSocketHeaderItemPointer);
+ sublistTableWidgetPointer->setHorizontalHeaderItem(18, xmlHttpRequestHeaderItemPointer);
+ sublistTableWidgetPointer->setHorizontalHeaderItem(19, appliedFilterOptionsHeaderItemPointer);
+ sublistTableWidgetPointer->setHorizontalHeaderItem(20, originalFilterOptionsHeaderItemPointer);
+ sublistTableWidgetPointer->setHorizontalHeaderItem(21, originalEntryHeaderItemPointer);
// Initialize the row counter.
int rowCounter = 0;
QTableWidgetItem *scriptItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->script));
QTableWidgetItem *styleSheetItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->styleSheet));
QTableWidgetItem *subFrameItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->subFrame));
+ QTableWidgetItem *webSocketItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->webSocket));
QTableWidgetItem *xmlHttpRequestItemPointer = new QTableWidgetItem(globalFilterListHelperPointer->getRequestOptionDispositionString(entryStructPointer->xmlHttpRequest));
QTableWidgetItem *appliedFilterOptionsItemPointer = new QTableWidgetItem(entryStructPointer->appliedFilterOptionsList.join(QLatin1String(" , ")));
QTableWidgetItem *originalFilterOptionsItemPointer = new QTableWidgetItem(entryStructPointer->originalFilterOptions);
sublistTableWidgetPointer->setItem(rowCounter, 14, scriptItemPointer);
sublistTableWidgetPointer->setItem(rowCounter, 15, styleSheetItemPointer);
sublistTableWidgetPointer->setItem(rowCounter, 16, subFrameItemPointer);
- sublistTableWidgetPointer->setItem(rowCounter, 17, xmlHttpRequestItemPointer);
- sublistTableWidgetPointer->setItem(rowCounter, 18, appliedFilterOptionsItemPointer);
- sublistTableWidgetPointer->setItem(rowCounter, 19, originalFilterOptionsItemPointer);
- sublistTableWidgetPointer->setItem(rowCounter, 20, originalEntryItemPointer);
+ sublistTableWidgetPointer->setItem(rowCounter, 17, webSocketItemPointer);
+ sublistTableWidgetPointer->setItem(rowCounter, 18, xmlHttpRequestItemPointer);
+ sublistTableWidgetPointer->setItem(rowCounter, 19, appliedFilterOptionsItemPointer);
+ sublistTableWidgetPointer->setItem(rowCounter, 20, originalFilterOptionsItemPointer);
+ sublistTableWidgetPointer->setItem(rowCounter, 21, originalEntryItemPointer);
// Increment the row counter.
++rowCounter;
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FILTER_LISTS_DIALOG_H
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
*
- * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Application headers.
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
*
- * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef HTTPAUTHENTICATIONDIALOG_H
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Application headers.
scriptLineEditPointer = requestDetailDialogUi.scriptLineEdit;
styleSheetLineEditPointer = requestDetailDialogUi.styleSheetLineEdit;
subFrameLineEditPointer = requestDetailDialogUi.subFrameLineEdit;
+ webSocketLineEditPointer = requestDetailDialogUi.webSocketLineEdit;
xmlHttpRequestLineEditPointer = requestDetailDialogUi.xmlHttpRequestLineEdit;
appliedFilterOptionsLineEditPointer = requestDetailDialogUi.appliedFilterOptionsLineEdit;
originalFilterOptionsLineEditPointer = requestDetailDialogUi.originalFilterOptionsLineEdit;
// Create a new request struct.
RequestStruct *requestStructPointer = new RequestStruct();
- // Populate the new request struct.
+ // Populate the new request struct. The order needs to match how the data stream is populated in RequestsDialog.cpp.
requestStructDataStreamReader >> requestStructPointer->dispositionInt;
requestStructDataStreamReader >> requestStructPointer->entryStruct.originalEntry;
requestStructDataStreamReader >> requestStructPointer->entryStruct.originalFilterOptions;
requestStructDataStreamReader >> requestStructPointer->entryStruct.styleSheet;
requestStructDataStreamReader >> requestStructPointer->entryStruct.subFrame;
requestStructDataStreamReader >> requestStructPointer->entryStruct.thirdParty;
+ requestStructDataStreamReader >> requestStructPointer->entryStruct.webSocket;
requestStructDataStreamReader >> requestStructPointer->entryStruct.xmlHttpRequest;
requestStructDataStreamReader >> requestStructPointer->filterListTitle;
requestStructDataStreamReader >> requestStructPointer->isThirdPartyRequest;
scriptLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.script));
styleSheetLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.styleSheet));
subFrameLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.subFrame));
+ webSocketLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.webSocket));
xmlHttpRequestLineEditPointer->setText(globalFilterListHelperPointer->getRequestOptionDispositionString(requestStructPointer->entryStruct.xmlHttpRequest));
appliedFilterOptionsLineEditPointer->setText(requestStructPointer->entryStruct.appliedFilterOptionsList.join(QLatin1String(" , ")));
originalFilterOptionsLineEditPointer->setText(requestStructPointer->entryStruct.originalFilterOptions);
setFilterOptionBackgroundPalette(scriptLineEditPointer);
setFilterOptionBackgroundPalette(styleSheetLineEditPointer);
setFilterOptionBackgroundPalette(subFrameLineEditPointer);
+ setFilterOptionBackgroundPalette(webSocketLineEditPointer);
setFilterOptionBackgroundPalette(xmlHttpRequestLineEditPointer);
// Set the request option status.
scriptLineEditPointer->setEnabled(hasRequestOptions);
styleSheetLineEditPointer->setEnabled(hasRequestOptions);
subFrameLineEditPointer->setEnabled(hasRequestOptions);
+ webSocketLineEditPointer->setEnabled(hasRequestOptions);
xmlHttpRequestLineEditPointer->setEnabled(hasRequestOptions);
// Set the domain list line edit to have the same palette as the domain line edit.
case QWebEngineUrlRequestInfo::ResourceTypeServiceWorker:
case QWebEngineUrlRequestInfo::ResourceTypeCspReport:
case QWebEngineUrlRequestInfo::ResourceTypePluginResource:
+ case QWebEngineUrlRequestInfo::ResourceTypeJson:
case QWebEngineUrlRequestInfo::ResourceTypeUnknown:
{
resourceTypeLineEditPointer->setPalette(otherLineEditPointer->palette());
break;
}
+ // Web Socket.
+ case QWebEngineUrlRequestInfo::ResourceTypeWebSocket:
+ {
+ resourceTypeLineEditPointer->setPalette(webSocketLineEditPointer->palette());
+ break;
+ }
+
// XML HTTP Request.
case QWebEngineUrlRequestInfo::ResourceTypeXhr:
{
- /*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef REQUEST_DETAIL_DIALOG_H
QLineEdit *thirdPartyFilterLineEditPointer;
QLineEdit *thirdPartyRequestLineEditPointer;
QLineEdit *webPageUrlLineEditPointer;
+ QLineEdit *webSocketLineEditPointer;
QLineEdit *xmlHttpRequestLineEditPointer;
// The private functions.
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Application headers.
// Create a request struct data stream.
QDataStream requestStructDataStream(requestStructByteArrayPointer, QIODevice::WriteOnly);
- // Populate the request struct data stream.
+ // Populate the request struct data stream. The order needs to match what is populated from the data stream in RequestDetailDialog.cpp.
requestStructDataStream << requestStructPointer->dispositionInt;
requestStructDataStream << requestStructPointer->entryStruct.originalEntry;
requestStructDataStream << requestStructPointer->entryStruct.originalFilterOptions;
requestStructDataStream << requestStructPointer->entryStruct.styleSheet;
requestStructDataStream << requestStructPointer->entryStruct.subFrame;
requestStructDataStream << requestStructPointer->entryStruct.thirdParty;
+ requestStructDataStream << requestStructPointer->entryStruct.webSocket;
requestStructDataStream << requestStructPointer->entryStruct.xmlHttpRequest;
requestStructDataStream << requestStructPointer->filterListTitle;
requestStructDataStream << requestStructPointer->isThirdPartyRequest;
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef REQUESTSDIALOG_H
-# Copyright 2022-2024 Soren Stoutner <soren@stoutner.com>.
+# SPDX-License-Identifier: GPL-3.0-or-later
+# SPDX-FileCopyrightText: 2022-2024 Soren Stoutner <soren@stoutner.com>
#
# This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <https://www.gnu.org/licenses/>.
# List the sources to include in the executable.
NAVIGATION_TYPE_REDIRECT = i18nc("Navigation type redirect", "Redirect");
NAVIGATION_TYPE_OTHER = i18nc("Navigation type other", "Other");
- // Populate the translated resource type strings. Translated entries cannot be public static const.
+ // Populate the translated resource type strings (in order of their values <https://doc.qt.io/qt-6/qwebengineurlrequestinfo.html#ResourceType-enum>).
+ // Translated entries cannot be public static const.
RESOURCE_TYPE_MAIN_FRAME = i18nc("Resource type main frame", "Main Frame");
RESOURCE_TYPE_SUB_FRAME = i18nc("Resource type sub frame", "Sub Frame");
RESOURCE_TYPE_STYLESHEET = i18nc("Resource type stylesheet", "Stylesheet");
RESOURCE_TYPE_PLUGIN_RESOURCE = i18nc("Resource type plugin request", "Plugin Request");
RESOURCE_TYPE_NAVIGATION_PRELOAD_MAIN_FRAME = i18nc("Resource type preload main frame", "Preload Main Frame");
RESOURCE_TYPE_NAVIGATION_PRELOAD_SUB_FRAME = i18nc("Resource type preload sub frame", "Preload Sub Frame");
+ RESOURCE_TYPE_WEB_SOCKET = i18nc("Resource type web socket", "Web Socket");
RESOURCE_TYPE_UNKNOWN = i18nc("Resource type unknown", "Unknown");
// Populate the translated sublist strings. Translated entries cannot be public static const.
(requestStructPointer->resourceTypeInt == QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadSubFrame)))
return processRequest(urlRequestInfo, requestStructPointer, filterListTitle, sublistInt, entryStructPointer);
+ // Process web socket requests.
+ if ((entryStructPointer->webSocket == FilterOptionDisposition::Apply) && (requestStructPointer->resourceTypeInt == QWebEngineUrlRequestInfo::ResourceTypeWebSocket))
+ return processRequest(urlRequestInfo, requestStructPointer, filterListTitle, sublistInt, entryStructPointer);
+
// Process XML HTTP requests.
if ((entryStructPointer->xmlHttpRequest == FilterOptionDisposition::Apply) && (requestStructPointer->resourceTypeInt == QWebEngineUrlRequestInfo::ResourceTypeXhr))
return processRequest(urlRequestInfo, requestStructPointer, filterListTitle, sublistInt, entryStructPointer);
QString FilterListHelper::getResourceTypeString(int resourceTypeInt) const
{
- // Return the translated resource type string.
+ // Return the translated resource type string (in order of their values <https://doc.qt.io/qt-6/qwebengineurlrequestinfo.html#ResourceType-enum>).
switch (resourceTypeInt)
{
case QWebEngineUrlRequestInfo::ResourceTypeMainFrame: return RESOURCE_TYPE_MAIN_FRAME;
case QWebEngineUrlRequestInfo::ResourceTypePluginResource: return RESOURCE_TYPE_PLUGIN_RESOURCE;
case QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadMainFrame: return RESOURCE_TYPE_NAVIGATION_PRELOAD_MAIN_FRAME;
case QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadSubFrame: return RESOURCE_TYPE_NAVIGATION_PRELOAD_SUB_FRAME;
+ case QWebEngineUrlRequestInfo::ResourceTypeWebSocket: return RESOURCE_TYPE_WEB_SOCKET;
default: return RESOURCE_TYPE_UNKNOWN;
}
}
// Set the has request options flag.
entryStructPointer->hasRequestOptions = true;
}
- else if ((filterOption == QLatin1String("other")) || (filterOption == QLatin1String("webrtc")) || (filterOption == QLatin1String("websocket"))) // Other.
- { // `websocket` will get its own section in Qt6.
+ else if ((filterOption == QLatin1String("other")) || (filterOption == QLatin1String("webrtc"))) // Other.
+ {
// Populate the other disposition.
entryStructPointer->other = FilterOptionDisposition::Apply;
// Set the has request options flag.
entryStructPointer->hasRequestOptions = true;
}
+ else if (filterOption == QLatin1String("websocket")) // Web socket.
+ {
+ // Populate the web socket disposition.
+ entryStructPointer->webSocket = FilterOptionDisposition::Apply;
+
+ // Set the has request options flag.
+ entryStructPointer->hasRequestOptions = true;
+ }
else if (filterOption == QLatin1String("xmlhttprequest")) // XML HTTP request.
{
//Populate the XML HTTP request disposition.
overrideStruct.hasOverride = true;
overrideStruct.object = true;
}
- else if ((filterOption == QLatin1String("~other")) || (filterOption == QLatin1String("~webrtc")) || (filterOption == QLatin1String("~websocket"))) // Other override.
- { // `websocket` will get its own section in Qt6.
+ else if ((filterOption == QLatin1String("~other")) || (filterOption == QLatin1String("~webrtc"))) // Other override.
+ {
// Populate the override struct.
overrideStruct.hasOverride = true;
overrideStruct.other = true;
overrideStruct.hasOverride = true;
overrideStruct.subFrame = true;
}
+ else if (filterOption == QLatin1String("~websocket")) // Web socket override.
+ {
+ // Populate the override struct.
+ overrideStruct.hasOverride = true;
+ overrideStruct.webSocket = true;
+ }
else if (filterOption == QLatin1String("~xmlhttprequest")) // XML HTTP request override.
{
// Populate the override struct.
else
entryStructPointer->subFrame = FilterOptionDisposition::Apply;
+ // Web Socket.
+ if (overrideStruct.webSocket)
+ entryStructPointer->webSocket = FilterOptionDisposition::Override;
+ else
+ entryStructPointer->webSocket = FilterOptionDisposition::Apply;
+
// XML HTTP Request.
if (overrideStruct.xmlHttpRequest)
entryStructPointer->xmlHttpRequest = FilterOptionDisposition::Override;
/* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
*
QString NAVIGATION_TYPE_REDIRECT;
QString NAVIGATION_TYPE_OTHER;
- // The private translated resource type strings.
+ // The private translated resource type strings (in order of their values <https://doc.qt.io/qt-6/qwebengineurlrequestinfo.html#ResourceType-enum>).
QString RESOURCE_TYPE_MAIN_FRAME;
QString RESOURCE_TYPE_SUB_FRAME;
QString RESOURCE_TYPE_STYLESHEET;
QString RESOURCE_TYPE_PLUGIN_RESOURCE;
QString RESOURCE_TYPE_NAVIGATION_PRELOAD_MAIN_FRAME;
QString RESOURCE_TYPE_NAVIGATION_PRELOAD_SUB_FRAME;
+ QString RESOURCE_TYPE_WEB_SOCKET;
QString RESOURCE_TYPE_UNKNOWN;
// The private translated sublist strings.
-/*
- * Copyright 2023-2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2023-2024 Soren Stoutner <soren@stoutner.com>
*
- * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Application headers.
-/*
- * Copyright 2023 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2023 Soren Stoutner <soren@stoutner.com>
*
- * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FOLDERHELPER_H
-/*
- * Copyright 2023 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2023 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef BOOKMARKSTRUCT_H
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef ENTRY_STRUCT_H
FilterOptionDisposition styleSheet = FilterOptionDisposition::Null;
FilterOptionDisposition subFrame = FilterOptionDisposition::Null;
FilterOptionDisposition thirdParty = FilterOptionDisposition::Null;
+ FilterOptionDisposition webSocket = FilterOptionDisposition::Null;
FilterOptionDisposition xmlHttpRequest = FilterOptionDisposition::Null;
};
#endif
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FILTER_LIST_STRUCT_H
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef OVERRIDESTRUCT_H
bool script = false;
bool styleSheet = false;
bool subFrame = false;
+ bool webSocket = false;
bool xmlHttpRequest = false;
};
#endif
-/*
- * Copyright 2024 Soren Stoutner <soren@stoutner.com>.
+/* SPDX-License-Identifier: GPL-3.0-or-later
+ * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef REQUEST_STRUCT_H
<!--
SPDX-License-Identifier: GPL-3.0-or-later
- SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
+ SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
</widget>
</item>
- <!-- XML HTTP Request. -->
+ <!-- Web Socket. -->
<item row="2" column="4">
<widget class="QLabel">
<property name="text">
- <string>XML HTTP Request</string>
+ <string>Web Socket</string>
</property>
<property name="alignment">
</item>
<item row="2" column="5">
+ <widget class="QLineEdit" name="webSocketLineEdit">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+
+ <!-- Disabling focus allows the arrow keys to activate the buttons. -->
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+
+ <!-- XML HTTP Request. -->
+ <item row="2" column="6">
+ <widget class="QLabel">
+ <property name="text">
+ <string>XML HTTP Request</string>
+ </property>
+
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+
+ <item row="2" column="7">
<widget class="QLineEdit" name="xmlHttpRequestLineEdit">
<property name="readOnly">
<bool>true</bool>
<!--
SPDX-License-Identifier: GPL-3.0-or-later
- SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
+ SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
</widget>
</item>
- <!-- XML HTTP Request. -->
+ <!-- Web Socket. -->
<item row="2" column="4">
<widget class="QLabel">
<property name="text">
- <string>XML HTTP Request</string>
+ <string>Web Socket</string>
</property>
<property name="alignment">
</item>
<item row="2" column="5">
+ <widget class="QLineEdit" name="webSocketLineEdit">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+
+ <!-- Disabling focus allows the arrow keys to activate the buttons. -->
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ </widget>
+ </item>
+
+ <!-- XML HTTP Request. -->
+ <item row="2" column="6">
+ <widget class="QLabel">
+ <property name="text">
+ <string>XML HTTP Request</string>
+ </property>
+
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+
+ <item row="2" column="7">
<widget class="QLineEdit" name="xmlHttpRequestLineEdit">
<property name="readOnly">
<bool>true</bool>