diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/api/core_api.pro | 7 | ||||
-rw-r--r-- | src/core/api/qtbug-60565.cpp | 138 | ||||
-rw-r--r-- | src/core/api/qtbug-61521.cpp | 120 | ||||
-rw-r--r-- | src/core/net/url_request_notification.h | 1 | ||||
-rw-r--r-- | src/core/renderer/user_resource_controller.cpp | 4 | ||||
-rw-r--r-- | src/process/process.pro | 4 | ||||
-rw-r--r-- | src/tools/qwebengine_convert_dict/main.cpp | 32 |
7 files changed, 21 insertions, 285 deletions
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro index 5e8b8387e..f14b4b01d 100644 --- a/src/core/api/core_api.pro +++ b/src/core/api/core_api.pro @@ -65,13 +65,6 @@ SOURCES = \ qwebengineurlscheme.cpp \ qwebengineurlschemehandler.cpp -### Qt6 Remove this workaround -unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static { - CONFIG -= warning_clean - SOURCES += qtbug-60565.cpp \ - qtbug-61521.cpp -} - msvc { # Create a list of object files that can be used as response file for the linker. # This is done to simulate -whole-archive on MSVC. diff --git a/src/core/api/qtbug-60565.cpp b/src/core/api/qtbug-60565.cpp deleted file mode 100644 index f48a2a701..000000000 --- a/src/core/api/qtbug-60565.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <new> -#include <unistd.h> - -#if defined(__LP64__) -# define SIZE_T_MANGLING "m" -#else -# define SIZE_T_MANGLING "j" -#endif - -#define SHIM_ALIAS_SYMBOL(fn) __attribute__((weak, alias(#fn))) -#define SHIM_HIDDEN __attribute__ ((visibility ("hidden"))) - -extern "C" { - -__asm__(".symver __ShimCppNew, _Znw" SIZE_T_MANGLING "@Qt_5"); -void* __ShimCppNew(size_t size) - SHIM_ALIAS_SYMBOL(ShimCppNew); - -__asm__(".symver __ShimCppDelete, _ZdlPv@Qt_5"); -void __ShimCppDelete(void* address) - SHIM_ALIAS_SYMBOL(ShimCppDelete); - -__asm__(".symver __ShimCppNewArray, _Zna" SIZE_T_MANGLING "@Qt_5"); -void* __ShimCppNewArray(size_t size) - SHIM_ALIAS_SYMBOL(ShimCppNewArray); - -__asm__(".symver __ShimCppDeleteArray, _ZdaPv@Qt_5"); -void __ShimCppDeleteArray(void* address) - SHIM_ALIAS_SYMBOL(ShimCppDeleteArray); - -__asm__(".symver __ShimCppNewNoThrow, _Znw" SIZE_T_MANGLING "RKSt9nothrow_t@Qt_5"); -void *__ShimCppNewNoThrow(size_t size, const std::nothrow_t&) noexcept - SHIM_ALIAS_SYMBOL(ShimCppNewNoThrow); - -__asm__(".symver __ShimCppNewArrayNoThrow, _Zna" SIZE_T_MANGLING "RKSt9nothrow_t@Qt_5"); -void *__ShimCppNewArrayNoThrow(size_t size, const std::nothrow_t&) noexcept - SHIM_ALIAS_SYMBOL(ShimCppNewArrayNoThrow); - -__asm__(".symver __ShimCppDeleteNoThrow, _ZdlPvRKSt9nothrow_t@Qt_5"); -void __ShimCppDeleteNoThrow(void* address, const std::nothrow_t&) noexcept - SHIM_ALIAS_SYMBOL(ShimCppDeleteNoThrow); - -__asm__(".symver __ShimCppDeleteArrayNoThrow, _ZdaPvRKSt9nothrow_t@Qt_5"); -void __ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept - SHIM_ALIAS_SYMBOL(ShimCppDeleteArrayNoThrow); - -static void* __shimCppNew(size_t size); -static void* __shimCppNewArray(size_t size); -static void __shimCppDelete(void *address); -static void __shimCppDeleteArray(void *address); - -SHIM_HIDDEN void* ShimCppNew(size_t size) { - return __shimCppNew(size); -} - -SHIM_HIDDEN void* ShimCppNewNoThrow(size_t size, const std::nothrow_t&) noexcept { - return __shimCppNew(size); -} - -SHIM_HIDDEN void* ShimCppNewArray(size_t size) { - return __shimCppNewArray(size); -} - -SHIM_HIDDEN void* ShimCppNewArrayNoThrow(size_t size, const std::nothrow_t&) noexcept { - return __shimCppNewArray(size); -} - -SHIM_HIDDEN void ShimCppDelete(void* address) { - __shimCppDelete(address); -} - -SHIM_HIDDEN void ShimCppDeleteNoThrow(void* address, const std::nothrow_t&) noexcept { - __shimCppDelete(address); -} - -SHIM_HIDDEN void ShimCppDeleteArray(void* address) { - __shimCppDeleteArray(address); -} - -SHIM_HIDDEN void ShimCppDeleteArrayNoThrow(void* address, const std::nothrow_t&) noexcept { - __shimCppDeleteArray(address); -} -} // extern "C" - -static void* __shimCppNew(size_t size) { - return operator new(size); -} - -static void* __shimCppNewArray(size_t size) { - return operator new[](size); -} - -static void __shimCppDelete(void* address) { - operator delete(address); -} - -static void __shimCppDeleteArray(void* address) { - operator delete[](address); -} diff --git a/src/core/api/qtbug-61521.cpp b/src/core/api/qtbug-61521.cpp deleted file mode 100644 index 002a1af22..000000000 --- a/src/core/api/qtbug-61521.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <stdlib.h> -#include <malloc.h> - -#define SHIM_ALIAS_SYMBOL(fn) __attribute__((weak, alias(#fn))) -#define SHIM_SYMBOL_VERSION(fn) __asm__(".symver __" #fn "," #fn "@Qt_5") -#define SHIM_HIDDEN __attribute__ ((visibility ("hidden"))) - -extern "C" { - -SHIM_SYMBOL_VERSION(malloc); -void* __malloc(size_t size) - SHIM_ALIAS_SYMBOL(ShimMalloc); - -SHIM_SYMBOL_VERSION(free); -void __free(void* ptr) - SHIM_ALIAS_SYMBOL(ShimFree); - -SHIM_SYMBOL_VERSION(realloc); -void* __realloc(void* ptr, size_t size) - SHIM_ALIAS_SYMBOL(ShimRealloc); - -SHIM_SYMBOL_VERSION(calloc); -void* __calloc(size_t n, size_t size) - SHIM_ALIAS_SYMBOL(ShimCalloc); - -SHIM_SYMBOL_VERSION(cfree); -void __cfree(void* ptr) - SHIM_ALIAS_SYMBOL(ShimCFree); - -SHIM_SYMBOL_VERSION(memalign); -void* __memalign(size_t align, size_t s) - SHIM_ALIAS_SYMBOL(ShimMemalign); - -SHIM_SYMBOL_VERSION(valloc); -void* __valloc(size_t size) - SHIM_ALIAS_SYMBOL(ShimValloc); - -SHIM_SYMBOL_VERSION(pvalloc); -void* __pvalloc(size_t size) - SHIM_ALIAS_SYMBOL(ShimPvalloc); - -SHIM_SYMBOL_VERSION(posix_memalign); -int __posix_memalign(void** r, size_t a, size_t s) - SHIM_ALIAS_SYMBOL(ShimPosixMemalign); - -SHIM_HIDDEN void* ShimMalloc(size_t size) { - return malloc(size); -} - -SHIM_HIDDEN void ShimFree(void* ptr) { - free(ptr); -} - -SHIM_HIDDEN void* ShimRealloc(void* ptr, size_t size) { - return realloc(ptr,size); -} - -SHIM_HIDDEN void* ShimCalloc(size_t n, size_t size) { - return calloc(n,size); -} - -SHIM_HIDDEN void ShimCFree(void* ptr) { - free(ptr); -} - -SHIM_HIDDEN void* ShimMemalign(size_t align, size_t s) { - return memalign(align,s); -} - -SHIM_HIDDEN void* ShimValloc(size_t size) { - return valloc(size); -} - -SHIM_HIDDEN void* ShimPvalloc(size_t size) { - return pvalloc(size); -} - -SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) { - return posix_memalign(r,a,s); -} -} // extern "C" diff --git a/src/core/net/url_request_notification.h b/src/core/net/url_request_notification.h index 673e07bf0..a43fdff00 100644 --- a/src/core/net/url_request_notification.h +++ b/src/core/net/url_request_notification.h @@ -44,6 +44,7 @@ #include "net/base/completion_once_callback.h" #include "qwebengineurlrequestinfo.h" #include <QPointer> +#include <QVariant> class GURL; diff --git a/src/core/renderer/user_resource_controller.cpp b/src/core/renderer/user_resource_controller.cpp index 2613d262e..781c10840 100644 --- a/src/core/renderer/user_resource_controller.cpp +++ b/src/core/renderer/user_resource_controller.cpp @@ -196,8 +196,8 @@ void UserResourceController::runScripts(UserScriptData::InjectionPoint p, blink: if (!renderView) return; - QList<uint64_t> scriptsToRun = m_viewUserScriptMap.value(0).toList(); - scriptsToRun.append(m_viewUserScriptMap.value(renderView).toList()); + QList<uint64_t> scriptsToRun = m_viewUserScriptMap.value(0).values(); + scriptsToRun.append(m_viewUserScriptMap.value(renderView).values()); for (uint64_t id : qAsConst(scriptsToRun)) { const UserScriptData &script = m_scripts.value(id); diff --git a/src/process/process.pro b/src/process/process.pro index 0bdc9dd93..459eb9969 100644 --- a/src/process/process.pro +++ b/src/process/process.pro @@ -22,7 +22,7 @@ qtConfig(build_all): CONFIG += build_all qtConfig(framework) { # Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework. - DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/5/Helpers + DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/$$QT_MAJOR_VERSION/Helpers } else { CONFIG -= app_bundle win32: DESTDIR = $$MODULE_BASE_OUTDIR/bin @@ -31,7 +31,7 @@ qtConfig(framework) { msvc: QMAKE_LFLAGS *= /LARGEADDRESSAWARE qtConfig(framework) { - target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/5/Helpers + target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/$$QT_MAJOR_VERSION/Helpers } else { target.path = $$[QT_INSTALL_LIBEXECS] } diff --git a/src/tools/qwebengine_convert_dict/main.cpp b/src/tools/qwebengine_convert_dict/main.cpp index 1694dbcef..0ebba96b1 100644 --- a/src/tools/qwebengine_convert_dict/main.cpp +++ b/src/tools/qwebengine_convert_dict/main.cpp @@ -84,7 +84,7 @@ inline bool VerifyWords(const convert_dict::DicReader::WordList& org_words, hunspell::BDictReader reader; if (!reader.Init(reinterpret_cast<const unsigned char*>(serialized.data()), serialized.size())) { - out << "BDict is invalid" << endl; + out << "BDict is invalid" << Qt::endl; return false; } hunspell::WordIterator iter = reader.GetAllWordIterator(); @@ -96,7 +96,7 @@ inline bool VerifyWords(const convert_dict::DicReader::WordList& org_words, for (size_t i = 0; i < org_words.size(); i++) { int affix_matches = iter.Advance(buf, buf_size, affix_ids); if (affix_matches == 0) { - out << "Found the end before we expected" << endl; + out << "Found the end before we expected" << Qt::endl; return false; } @@ -104,7 +104,7 @@ inline bool VerifyWords(const convert_dict::DicReader::WordList& org_words, out << "Word does not match!\n" << " Index: " << i << "\n" << " Expected: " << QString::fromStdString(org_words[i].first) << "\n" - << " Actual: " << QString::fromUtf8(buf) << endl; + << " Actual: " << QString::fromUtf8(buf) << Qt::endl; return false; } @@ -118,7 +118,7 @@ inline bool VerifyWords(const convert_dict::DicReader::WordList& org_words, << " Index: " << i << "\n" << " Word: " << QString::fromUtf8(buf) << "\n" << " Expected: " << expectedAffixes << "\n" - << " Actual: " << actualAffixes << endl; + << " Actual: " << actualAffixes << Qt::endl; return false; } } @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) out << "Usage: qwebengine_convert_dict <dic file> <bdic file>\n\nExample:\n" "qwebengine_convert_dict ./en-US.dic ./en-US.bdic\nwill read en-US.dic, " "en-US.dic_delta, and en-US.aff from the current directory and generate " - "en-US.bdic\n" << endl; + "en-US.bdic\n" << Qt::endl; return 1; } @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) out << "Couldn't find ICU data directory. Please check that the following path exists: " << icuDataDir << "\nAlternatively provide the directory path via the QT_WEBENGINE_ICU_DAT_DIR " - "environment variable.\n" << endl; + "environment variable.\n" << Qt::endl; return 1; } @@ -196,21 +196,21 @@ int main(int argc, char *argv[]) base::FilePath file_out_path = toFilePath(argv[2]); base::FilePath aff_path = file_in_path.ReplaceExtension(FILE_PATH_LITERAL(".aff")); - out << "Reading " << toQt(aff_path.value()) << endl; + out << "Reading " << toQt(aff_path.value()) << Qt::endl; convert_dict::AffReader aff_reader(aff_path); if (!aff_reader.Read()) { - out << "Unable to read the aff file." << endl; + out << "Unable to read the aff file." << Qt::endl; return 1; } base::FilePath dic_path = file_in_path.ReplaceExtension(FILE_PATH_LITERAL(".dic")); - out << "Reading " << toQt(dic_path.value()) << endl; + out << "Reading " << toQt(dic_path.value()) << Qt::endl; // DicReader will also read the .dic_delta file. convert_dict::DicReader dic_reader(dic_path); if (!dic_reader.Read(&aff_reader)) { - out << "Unable to read the dic file." << endl; + out << "Unable to read the dic file." << Qt::endl; return 1; } @@ -222,27 +222,27 @@ int main(int argc, char *argv[]) writer.SetOtherCommands(aff_reader.other_commands()); writer.SetWords(dic_reader.words()); - out << "Serializing..." << endl; + out << "Serializing..." << Qt::endl; std::string serialized = writer.GetBDict(); - out << "Verifying..." << endl; + out << "Verifying..." << Qt::endl; if (!VerifyWords(dic_reader.words(), serialized, out)) { - out << "ERROR converting, the dictionary does not check out OK." << endl; + out << "ERROR converting, the dictionary does not check out OK." << Qt::endl; return 1; } - out << "Writing " << toQt(file_out_path.value()) << endl; + out << "Writing " << toQt(file_out_path.value()) << Qt::endl; FILE *out_file = base::OpenFile(file_out_path, "wb"); if (!out_file) { - out << "ERROR writing file" << endl; + out << "ERROR writing file" << Qt::endl; return 1; } size_t written = fwrite(&serialized[0], 1, serialized.size(), out_file); Q_ASSERT(written == serialized.size()); base::CloseFile(out_file); - out << "Success. Dictionary converted." << endl; + out << "Success. Dictionary converted." << Qt::endl; return 0; } |