diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-07 11:35:08 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-23 00:24:54 +0000 |
commit | ce6a1a74d16deecf0c150aa1f5bae2cc6a95e7b1 (patch) | |
tree | e1ce3f92b50c0c0e5140019134e70e70a1ddb88d /src/core/web_contents_adapter.cpp | |
parent | 5c6201f6c393967e9284bb9841281d286126541d (diff) |
Adaptations for Chromium 73
Change-Id: I565d1e327852110a5abebed3388d7cd6986bef06
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 535c50a95..90cd598ab 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -91,6 +91,7 @@ #include "third_party/blink/public/web/web_media_player_action.h" #include "printing/buildflags/buildflags.h" #include "ui/base/clipboard/clipboard.h" +#include "ui/base/clipboard/clipboard_constants.h" #include "ui/base/clipboard/custom_data_helper.h" #include "ui/gfx/font_render_params.h" @@ -250,7 +251,7 @@ static std::unique_ptr<content::WebContents> createBlankWebContents(WebContentsA return webContents; } -static void serializeNavigationHistory(const content::NavigationController &controller, QDataStream &output) +static void serializeNavigationHistory(content::NavigationController &controller, QDataStream &output) { const int currentIndex = controller.GetCurrentEntryIndex(); const int count = controller.GetEntryCount(); @@ -262,7 +263,7 @@ static void serializeNavigationHistory(const content::NavigationController &cont // Logic taken from SerializedNavigationEntry::WriteToPickle. for (int i = 0; i < count; ++i) { - const content::NavigationEntry* entry = (i == pendingIndex) + content::NavigationEntry* entry = (i == pendingIndex) ? controller.GetPendingEntry() : controller.GetEntryAtIndex(i); if (entry->GetVirtualURL().is_valid()) { @@ -1365,7 +1366,7 @@ static QMimeData *mimeDataFromDropData(const content::DropData &dropData) if (!dropData.custom_data.empty()) { base::Pickle pickle; ui::WriteCustomDataToPickle(dropData.custom_data, &pickle); - mimeData->setData(toQt(ui::Clipboard::GetWebCustomDataFormatType().ToString()), QByteArray((const char*)pickle.data(), pickle.size())); + mimeData->setData(QLatin1String(ui::kMimeTypeWebCustomData), QByteArray((const char*)pickle.data(), pickle.size())); } return mimeData; } @@ -1483,8 +1484,8 @@ static void fillDropDataFromMimeData(content::DropData *dropData, const QMimeDat dropData->html = toNullableString16(mimeData->html()); if (mimeData->hasText()) dropData->text = toNullableString16(mimeData->text()); - if (mimeData->hasFormat(toQt(ui::Clipboard::GetWebCustomDataFormatType().ToString()))) { - QByteArray customData = mimeData->data(toQt(ui::Clipboard::GetWebCustomDataFormatType().ToString())); + if (mimeData->hasFormat(QLatin1String(ui::kMimeTypeWebCustomData))) { + QByteArray customData = mimeData->data(QLatin1String(ui::kMimeTypeWebCustomData)); ui::ReadCustomDataIntoMap(customData.constData(), customData.length(), &dropData->custom_data); } } |