diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-04-08 11:41:36 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-04-10 14:20:09 +0200 |
commit | e6d4d15b03fa67524269bc8e1beb04dcc704db03 (patch) | |
tree | 16c8110d5359a99a39137c5dfd9d9ac156cb6e49 | |
parent | 4a02c770db7552b7298d8b71e061558b8d16b13a (diff) |
Fix builds against Qt 5.12v5.15.0-beta4
We need to provide the last update possibility for Qt 5.12.
Change-Id: I3dbf327ad5ef149046744ed2db57a1d56dc8e7fd
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | src/tools/qwebengine_convert_dict/main.cpp | 32 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginedownloaditem.h | 7 |
2 files changed, 23 insertions, 16 deletions
diff --git a/src/tools/qwebengine_convert_dict/main.cpp b/src/tools/qwebengine_convert_dict/main.cpp index 0ebba96b1..5c95f6d69 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" << Qt::endl; + out << "BDict is invalid\n"; 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" << Qt::endl; + out << "Found the end before we expected\n"; 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) << Qt::endl; + << " Actual: " << QString::fromUtf8(buf) << "\n"; 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 << Qt::endl; + << " Actual: " << actualAffixes << "\n"; 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" << Qt::endl; + "en-US.bdic\n\n"; 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" << Qt::endl; + "environment variable.\n\n"; 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()) << Qt::endl; + out << "Reading " << toQt(aff_path.value()) << "\n"; convert_dict::AffReader aff_reader(aff_path); if (!aff_reader.Read()) { - out << "Unable to read the aff file." << Qt::endl; + out << "Unable to read the aff file.\n"; return 1; } base::FilePath dic_path = file_in_path.ReplaceExtension(FILE_PATH_LITERAL(".dic")); - out << "Reading " << toQt(dic_path.value()) << Qt::endl; + out << "Reading " << toQt(dic_path.value()) << "\n"; // 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." << Qt::endl; + out << "Unable to read the dic file.\n"; 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..." << Qt::endl; + out << "Serializing...\n"; std::string serialized = writer.GetBDict(); - out << "Verifying..." << Qt::endl; + out << "Verifying...\n"; if (!VerifyWords(dic_reader.words(), serialized, out)) { - out << "ERROR converting, the dictionary does not check out OK." << Qt::endl; + out << "ERROR converting, the dictionary does not check out OK.\n"; return 1; } - out << "Writing " << toQt(file_out_path.value()) << Qt::endl; + out << "Writing " << toQt(file_out_path.value()) << "\n"; FILE *out_file = base::OpenFile(file_out_path, "wb"); if (!out_file) { - out << "ERROR writing file" << Qt::endl; + out << "ERROR writing file\n"; 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." << Qt::endl; + out << "Success. Dictionary converted.\n"; return 0; } diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.h b/src/webenginewidgets/api/qwebenginedownloaditem.h index 8d98799a3..094054079 100644 --- a/src/webenginewidgets/api/qwebenginedownloaditem.h +++ b/src/webenginewidgets/api/qwebenginedownloaditem.h @@ -119,10 +119,17 @@ public: QUrl url() const; QString mimeType() const; #if QT_DEPRECATED_SINCE(5, 14) +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QT_DEPRECATED_VERSION_X(5, 14, "Use downloadDirectory() and downloadFileName() instead") QString path() const; QT_DEPRECATED_VERSION_X(5, 14, "Use setDownloadDirectory() and setDownloadFileName() instead") void setPath(QString path); +#else + QT_DEPRECATED_X("Use downloadDirectory() and downloadFileName() instead") + QString path() const; + QT_DEPRECATED_X("Use setDownloadDirectory() and setDownloadFileName() instead") + void setPath(QString path); +#endif #endif bool isFinished() const; bool isPaused() const; |