diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test index ab1bd00884..1228629aea 100755 --- a/config.tests/unix/compile.test +++ b/config.tests/unix/compile.test @@ -77,7 +77,24 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1 # Make sure output from possible previous tests is gone rm -f "$EXE" "${EXE}.exe" -set -- "$QMAKE" -qtconf "$QTCONF" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release app_bundle lib_bundle" "LIBS+=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CFLAGS*=$CFLAGS" "QMAKE_CFLAGS+=$MAC_ARCH_CFLAGS" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" $QMAKE_ARGS "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" +set -- \ + "$QMAKE" \ + -qtconf "$QTCONF" \ + -nocache \ + -spec "$QMKSPEC" \ + "CONFIG+=$QMAKE_CONFIG" \ + "CONFIG+=android_app" \ + "CONFIG-=debug_and_release app_bundle lib_bundle" \ + "LIBS+=$LFLAGS" \ + "LIBS+=$MAC_ARCH_LFLAGS" \ + "INCLUDEPATH*=$INCLUDEPATH" \ + "QMAKE_CFLAGS*=$CFLAGS" \ + "QMAKE_CFLAGS+=$MAC_ARCH_CFLAGS" \ + "QMAKE_CXXFLAGS*=$CXXFLAGS" \ + "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" \ + $QMAKE_ARGS \ + "$SRCDIR/$TEST/$EXE.pro" \ + -o "$OUTDIR/$TEST/Makefile" if [ "$VERBOSE" = "yes" ]; then OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes else diff --git a/configure b/configure index b65c564a3d..b3ddfaa4b6 100755 --- a/configure +++ b/configure @@ -4412,10 +4412,12 @@ if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then fi # Detect objcopy support - if ! compileTest unix/objcopy "objcopy"; then - echo "ERROR: -separate-debug-info was requested but this binutils does not support it." - echo "Re-run configure with -v for more information" - exit 1 + if [ "$XPLATFORM_MAC" = "no" ]; then + if ! compileTest unix/objcopy "objcopy"; then + echo "ERROR: -separate-debug-info was requested but this binutils does not support it." + echo "Re-run configure with -v for more information" + exit 1 + fi fi fi diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf index ad3c638a6f..aac9d1b3d7 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -29,6 +29,9 @@ QMAKE_LIBS_DYNLOAD = QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL QMAKE_LIBS_THREAD = +QMAKE_DSYMUTIL = dsymutil +QMAKE_STRIP = strip + QMAKE_AR = ar cq QMAKE_RANLIB = ranlib -s QMAKE_NM = nm -P diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index c1c668aec8..39e6163967 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -65,10 +65,10 @@ warnings_are_errors:warning_clean { # compiler. clang:!ios { # Apple clang 4.0-4.2,5.0-5.1,6.0-6.4 - # Regular clang 3.3-3.7 + # Regular clang 3.3-3.8 apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION} reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION} - contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-7]") { + contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-8]") { QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR } } else:intel_icc:linux { diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index 5c3a46e117..629a02a4f3 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -28,7 +28,7 @@ win32 { } QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}$${TARGET_VERSION_EXT}$${TARGET_EXT} } else { - contains(TEMPLATE, .*lib):LIBPREFIX = lib + contains(TEMPLATE, .*lib):!if(plugin:no_plugin_name_prefix): LIBPREFIX = lib mac { equals(TEMPLATE, lib) { diff --git a/mkspecs/features/unix/separate_debug_info.prf b/mkspecs/features/unix/separate_debug_info.prf index 7d9022f8d7..460ad63e22 100644 --- a/mkspecs/features/unix/separate_debug_info.prf +++ b/mkspecs/features/unix/separate_debug_info.prf @@ -1,29 +1,77 @@ - -have_target:!static:!isEmpty(QMAKE_OBJCOPY) { - qnx { - debug_info_suffix = sym - debug_info_keep = --keep-file-symbols - debug_info_strip = --strip-debug -R.ident +have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) { + darwin { + debug_info_copy_bin = $$QMAKE_DSYMUTIL + debug_info_strip_bin = $$QMAKE_STRIP + debug_info_suffix = dSYM + debug_info_out = --flat -o + debug_info_strip = -S } else { - debug_info_suffix = debug - debug_info_keep = --only-keep-debug - debug_info_strip = --strip-debug + debug_info_copy_bin = $$QMAKE_OBJCOPY + debug_info_strip_bin = $$QMAKE_OBJCOPY + qnx { + debug_info_suffix = sym + debug_info_keep = --keep-file-symbols + debug_info_strip = --strip-debug -R.ident + } else { + debug_info_suffix = debug + debug_info_keep = --only-keep-debug + debug_info_strip = --strip-debug + } } load(resolve_target) - QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.$$debug_info_suffix + debug_info_target = $$QMAKE_RESOLVED_TARGET + + darwin { + !isEmpty(QMAKE_RESOLVED_BUNDLE) { + debug_info_target = $$QMAKE_RESOLVED_BUNDLE + CONFIG += any_bundle + } + + debug_info_target_dir = $${debug_info_target}.$$debug_info_suffix/Contents/Resources/DWARF + !isEmpty(QMAKE_RESOLVED_BUNDLE): \ + QMAKE_TARGET_DEBUG_INFO = $$debug_info_target_dir/$$TARGET + else: \ + QMAKE_TARGET_DEBUG_INFO = $$debug_info_target_dir/$$section(QMAKE_RESOLVED_TARGET, /, -1, -1) + + if(any_bundle:!build_pass)|if(!any_bundle:if(build_pass|isEmpty(BUILDS))) { + equals(TEMPLATE, lib):lib_bundle:!isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME): \ + BUNDLEIDENTIFIER = $$replace(QMAKE_FRAMEWORK_BUNDLE_NAME, \\.framework$, ) + else: equals(TEMPLATE, app):app_bundle:!isEmpty(QMAKE_APPLICATION_BUNDLE_NAME): \ + BUNDLEIDENTIFIER = $$replace(QMAKE_APPLICATION_BUNDLE_NAME, \\.app$, ) + else: \ + BUNDLEIDENTIFIER = $${TARGET} + + !isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ + BUNDLEIDENTIFIER = $$replace(QMAKE_TARGET_BUNDLE_PREFIX, \\.$, ).$${BUNDLEIDENTIFIER} + else: \ + BUNDLEIDENTIFIER = com.yourcompany.$${BUNDLEIDENTIFIER} + + BUNDLEIDENTIFIER ~= s,_,-, + + debug_info_plist.input = $$QMAKESPEC/Info.plist.dSYM.in + debug_info_plist.output = $${debug_info_target}.$$debug_info_suffix/Contents/Info.plist + QMAKE_SUBSTITUTES += debug_info_plist + } + } else { + QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.$$debug_info_suffix + } shell_target = $$shell_quote($$relative_path($$QMAKE_RESOLVED_TARGET, $$OUT_PWD)) shell_target_debug_info = $$shell_quote($$relative_path($$QMAKE_TARGET_DEBUG_INFO, $$OUT_PWD)) - copy_debug_info = $$QMAKE_OBJCOPY $$debug_info_keep $$shell_target $$shell_target_debug_info - strip_debug_info = $$QMAKE_OBJCOPY $$debug_info_strip $$shell_target - link_debug_info = $$QMAKE_OBJCOPY --add-gnu-debuglink=$$shell_target_debug_info $$shell_target - chmod_debug_info = chmod -x $$shell_target_debug_info + copy_debug_info = $$debug_info_copy_bin $$debug_info_keep $$shell_target $$debug_info_out $$shell_target_debug_info + strip_debug_info = $$debug_info_strip_bin $$debug_info_strip $$shell_target !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info && $$chmod_debug_info $$QMAKE_POST_LINK + darwin { + mkdir_debug_info = $$QMAKE_MKDIR $$shell_quote($$debug_info_target_dir) + QMAKE_POST_LINK = $$mkdir_debug_info && $$copy_debug_info && $$strip_debug_info $$QMAKE_POST_LINK + } else { + link_debug_info = $$QMAKE_OBJCOPY --add-gnu-debuglink=$$shell_target_debug_info $$shell_target + chmod_debug_info = chmod -x $$shell_target_debug_info + QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info && $$chmod_debug_info $$QMAKE_POST_LINK + } silent:QMAKE_POST_LINK = @echo creating $@.$$debug_info_suffix && $$QMAKE_POST_LINK target.targets += $$QMAKE_TARGET_DEBUG_INFO QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO } - diff --git a/mkspecs/macx-clang-32/Info.plist.dSYM.in b/mkspecs/macx-clang-32/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-clang-32/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-clang/Info.plist.dSYM.in b/mkspecs/macx-clang/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-clang/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++-32/Info.plist.dSYM.in b/mkspecs/macx-g++-32/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++-32/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++/Info.plist.dSYM.in b/mkspecs/macx-g++/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++40/Info.plist.dSYM.in b/mkspecs/macx-g++40/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++40/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++42/Info.plist.dSYM.in b/mkspecs/macx-g++42/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++42/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-icc/Info.plist.dSYM.in b/mkspecs/macx-icc/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-icc/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-ios-clang/Info.plist.dSYM.in b/mkspecs/macx-ios-clang/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-ios-clang/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-llvm/Info.plist.dSYM.in b/mkspecs/macx-llvm/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-llvm/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 35df36cb55..147c03a92d 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -266,7 +266,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("name", grp_it.key().section(Option::dir_sep, -1)) << ";\n" - << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" << "\t\t};\n"; } @@ -694,7 +694,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("name", grp_it.key().section(Option::dir_sep, -1)) << ";\n" - << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" << "\t\t};\n"; } @@ -1032,7 +1032,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_LIBRARIES"), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("name", grp) << ";\n" - << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" << "\t\t};\n"; } } @@ -1146,7 +1146,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("children", bundle_file_refs, SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("name", "Bundle Data") << ";\n" - << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" << "\t\t};\n"; } @@ -1231,7 +1231,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_PRODUCTS"), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("name", "Products") << ";\n" - << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" << "\t\t};\n"; } @@ -1241,7 +1241,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_GROUPS"), SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("name", project->first("QMAKE_ORIG_TARGET")) << ";\n" - << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" + << "\t\t\t" << writeSettings("sourceTree", "") << ";\n" << "\t\t};\n"; { diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index 82110f24cf..0f6326bc0e 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -550,7 +550,14 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) InCode // after directive, parsing non-#include directive or in actual code } cpp_state = AtStart; - for(int x = 0; x < buffer_len; ++x) { + int x = 0; + if (buffer_len >= 3) { + const unsigned char *p = (unsigned char *)buffer; + // skip UTF-8 BOM, if present + if (p[0] == 0xEF && p[1] == 0xBB && p[2] == 0xBF) + x += 3; + } + for (; x < buffer_len; ++x) { bool try_local = true; char *inc = 0; if(file->type == QMakeSourceFileInfo::TYPE_UI) { diff --git a/src/3rdparty/rfc6234/patches/0001-Fix-compilation-MSVC-warning-in-3rdparty-rfc6234.patch b/src/3rdparty/rfc6234/patches/0001-Fix-compilation-MSVC-warning-in-3rdparty-rfc6234.patch new file mode 100644 index 0000000000..a358aeb5d4 --- /dev/null +++ b/src/3rdparty/rfc6234/patches/0001-Fix-compilation-MSVC-warning-in-3rdparty-rfc6234.patch @@ -0,0 +1,86 @@ +diff --git a/src/3rdparty/rfc6234/sha384-512.c b/src/3rdparty/rfc6234/sha384-512.c +index 7d9ba3f..b2fcf03 100644 +--- a/src/3rdparty/rfc6234/sha384-512.c ++++ b/src/3rdparty/rfc6234/sha384-512.c +@@ -320,14 +320,14 @@ static int SHA384_512ResultN(SHA512Context *context, + + /* Initial Hash Values: FIPS 180-3 sections 5.3.4 and 5.3.5 */ + static uint64_t SHA384_H0[ ] = { +- 0xCBBB9D5DC1059ED8ll, 0x629A292A367CD507ll, 0x9159015A3070DD17ll, +- 0x152FECD8F70E5939ll, 0x67332667FFC00B31ll, 0x8EB44A8768581511ll, +- 0xDB0C2E0D64F98FA7ll, 0x47B5481DBEFA4FA4ll ++ 0xCBBB9D5DC1059ED8ull, 0x629A292A367CD507ull, 0x9159015A3070DD17ull, ++ 0x152FECD8F70E5939ull, 0x67332667FFC00B31ull, 0x8EB44A8768581511ull, ++ 0xDB0C2E0D64F98FA7ull, 0x47B5481DBEFA4FA4ull + }; + static uint64_t SHA512_H0[ ] = { +- 0x6A09E667F3BCC908ll, 0xBB67AE8584CAA73Bll, 0x3C6EF372FE94F82Bll, +- 0xA54FF53A5F1D36F1ll, 0x510E527FADE682D1ll, 0x9B05688C2B3E6C1Fll, +- 0x1F83D9ABFB41BD6Bll, 0x5BE0CD19137E2179ll ++ 0x6A09E667F3BCC908ull, 0xBB67AE8584CAA73Bull, 0x3C6EF372FE94F82Bull, ++ 0xA54FF53A5F1D36F1ull, 0x510E527FADE682D1ull, 0x9B05688C2B3E6C1Full, ++ 0x1F83D9ABFB41BD6Bull, 0x5BE0CD19137E2179ull + }; + + #endif /* USE_32BIT_ONLY */ +@@ -766,33 +766,33 @@ static void SHA384_512ProcessMessageBlock(SHA512Context *context) + #else /* !USE_32BIT_ONLY */ + /* Constants defined in FIPS 180-3, section 4.2.3 */ + static const uint64_t K[80] = { +- 0x428A2F98D728AE22ll, 0x7137449123EF65CDll, 0xB5C0FBCFEC4D3B2Fll, +- 0xE9B5DBA58189DBBCll, 0x3956C25BF348B538ll, 0x59F111F1B605D019ll, +- 0x923F82A4AF194F9Bll, 0xAB1C5ED5DA6D8118ll, 0xD807AA98A3030242ll, +- 0x12835B0145706FBEll, 0x243185BE4EE4B28Cll, 0x550C7DC3D5FFB4E2ll, +- 0x72BE5D74F27B896Fll, 0x80DEB1FE3B1696B1ll, 0x9BDC06A725C71235ll, +- 0xC19BF174CF692694ll, 0xE49B69C19EF14AD2ll, 0xEFBE4786384F25E3ll, +- 0x0FC19DC68B8CD5B5ll, 0x240CA1CC77AC9C65ll, 0x2DE92C6F592B0275ll, +- 0x4A7484AA6EA6E483ll, 0x5CB0A9DCBD41FBD4ll, 0x76F988DA831153B5ll, +- 0x983E5152EE66DFABll, 0xA831C66D2DB43210ll, 0xB00327C898FB213Fll, +- 0xBF597FC7BEEF0EE4ll, 0xC6E00BF33DA88FC2ll, 0xD5A79147930AA725ll, +- 0x06CA6351E003826Fll, 0x142929670A0E6E70ll, 0x27B70A8546D22FFCll, +- 0x2E1B21385C26C926ll, 0x4D2C6DFC5AC42AEDll, 0x53380D139D95B3DFll, +- 0x650A73548BAF63DEll, 0x766A0ABB3C77B2A8ll, 0x81C2C92E47EDAEE6ll, +- 0x92722C851482353Bll, 0xA2BFE8A14CF10364ll, 0xA81A664BBC423001ll, +- 0xC24B8B70D0F89791ll, 0xC76C51A30654BE30ll, 0xD192E819D6EF5218ll, +- 0xD69906245565A910ll, 0xF40E35855771202All, 0x106AA07032BBD1B8ll, +- 0x19A4C116B8D2D0C8ll, 0x1E376C085141AB53ll, 0x2748774CDF8EEB99ll, +- 0x34B0BCB5E19B48A8ll, 0x391C0CB3C5C95A63ll, 0x4ED8AA4AE3418ACBll, +- 0x5B9CCA4F7763E373ll, 0x682E6FF3D6B2B8A3ll, 0x748F82EE5DEFB2FCll, +- 0x78A5636F43172F60ll, 0x84C87814A1F0AB72ll, 0x8CC702081A6439ECll, +- 0x90BEFFFA23631E28ll, 0xA4506CEBDE82BDE9ll, 0xBEF9A3F7B2C67915ll, +- 0xC67178F2E372532Bll, 0xCA273ECEEA26619Cll, 0xD186B8C721C0C207ll, +- 0xEADA7DD6CDE0EB1Ell, 0xF57D4F7FEE6ED178ll, 0x06F067AA72176FBAll, +- 0x0A637DC5A2C898A6ll, 0x113F9804BEF90DAEll, 0x1B710B35131C471Bll, +- 0x28DB77F523047D84ll, 0x32CAAB7B40C72493ll, 0x3C9EBE0A15C9BEBCll, +- 0x431D67C49C100D4Cll, 0x4CC5D4BECB3E42B6ll, 0x597F299CFC657E2All, +- 0x5FCB6FAB3AD6FAECll, 0x6C44198C4A475817ll ++ 0x428A2F98D728AE22ull, 0x7137449123EF65CDull, 0xB5C0FBCFEC4D3B2Full, ++ 0xE9B5DBA58189DBBCull, 0x3956C25BF348B538ull, 0x59F111F1B605D019ull, ++ 0x923F82A4AF194F9Bull, 0xAB1C5ED5DA6D8118ull, 0xD807AA98A3030242ull, ++ 0x12835B0145706FBEull, 0x243185BE4EE4B28Cull, 0x550C7DC3D5FFB4E2ull, ++ 0x72BE5D74F27B896Full, 0x80DEB1FE3B1696B1ull, 0x9BDC06A725C71235ull, ++ 0xC19BF174CF692694ull, 0xE49B69C19EF14AD2ull, 0xEFBE4786384F25E3ull, ++ 0x0FC19DC68B8CD5B5ull, 0x240CA1CC77AC9C65ull, 0x2DE92C6F592B0275ull, ++ 0x4A7484AA6EA6E483ull, 0x5CB0A9DCBD41FBD4ull, 0x76F988DA831153B5ull, ++ 0x983E5152EE66DFABull, 0xA831C66D2DB43210ull, 0xB00327C898FB213Full, ++ 0xBF597FC7BEEF0EE4ull, 0xC6E00BF33DA88FC2ull, 0xD5A79147930AA725ull, ++ 0x06CA6351E003826Full, 0x142929670A0E6E70ull, 0x27B70A8546D22FFCull, ++ 0x2E1B21385C26C926ull, 0x4D2C6DFC5AC42AEDull, 0x53380D139D95B3DFull, ++ 0x650A73548BAF63DEull, 0x766A0ABB3C77B2A8ull, 0x81C2C92E47EDAEE6ull, ++ 0x92722C851482353Bull, 0xA2BFE8A14CF10364ull, 0xA81A664BBC423001ull, ++ 0xC24B8B70D0F89791ull, 0xC76C51A30654BE30ull, 0xD192E819D6EF5218ull, ++ 0xD69906245565A910ull, 0xF40E35855771202Aull, 0x106AA07032BBD1B8ull, ++ 0x19A4C116B8D2D0C8ull, 0x1E376C085141AB53ull, 0x2748774CDF8EEB99ull, ++ 0x34B0BCB5E19B48A8ull, 0x391C0CB3C5C95A63ull, 0x4ED8AA4AE3418ACBull, ++ 0x5B9CCA4F7763E373ull, 0x682E6FF3D6B2B8A3ull, 0x748F82EE5DEFB2FCull, ++ 0x78A5636F43172F60ull, 0x84C87814A1F0AB72ull, 0x8CC702081A6439ECull, ++ 0x90BEFFFA23631E28ull, 0xA4506CEBDE82BDE9ull, 0xBEF9A3F7B2C67915ull, ++ 0xC67178F2E372532Bull, 0xCA273ECEEA26619Cull, 0xD186B8C721C0C207ull, ++ 0xEADA7DD6CDE0EB1Eull, 0xF57D4F7FEE6ED178ull, 0x06F067AA72176FBAull, ++ 0x0A637DC5A2C898A6ull, 0x113F9804BEF90DAEull, 0x1B710B35131C471Bull, ++ 0x28DB77F523047D84ull, 0x32CAAB7B40C72493ull, 0x3C9EBE0A15C9BEBCull, ++ 0x431D67C49C100D4Cull, 0x4CC5D4BECB3E42B6ull, 0x597F299CFC657E2Aull, ++ 0x5FCB6FAB3AD6FAECull, 0x6C44198C4A475817ull + }; + int t, t8; /* Loop counter */ + uint64_t temp1, temp2; /* Temporary word value */ diff --git a/src/3rdparty/rfc6234/sha384-512.c b/src/3rdparty/rfc6234/sha384-512.c index 7d9ba3fa52..b2fcf03a83 100644 --- a/src/3rdparty/rfc6234/sha384-512.c +++ b/src/3rdparty/rfc6234/sha384-512.c @@ -320,14 +320,14 @@ static int SHA384_512ResultN(SHA512Context *context, /* Initial Hash Values: FIPS 180-3 sections 5.3.4 and 5.3.5 */ static uint64_t SHA384_H0[ ] = { - 0xCBBB9D5DC1059ED8ll, 0x629A292A367CD507ll, 0x9159015A3070DD17ll, - 0x152FECD8F70E5939ll, 0x67332667FFC00B31ll, 0x8EB44A8768581511ll, - 0xDB0C2E0D64F98FA7ll, 0x47B5481DBEFA4FA4ll + 0xCBBB9D5DC1059ED8ull, 0x629A292A367CD507ull, 0x9159015A3070DD17ull, + 0x152FECD8F70E5939ull, 0x67332667FFC00B31ull, 0x8EB44A8768581511ull, + 0xDB0C2E0D64F98FA7ull, 0x47B5481DBEFA4FA4ull }; static uint64_t SHA512_H0[ ] = { - 0x6A09E667F3BCC908ll, 0xBB67AE8584CAA73Bll, 0x3C6EF372FE94F82Bll, - 0xA54FF53A5F1D36F1ll, 0x510E527FADE682D1ll, 0x9B05688C2B3E6C1Fll, - 0x1F83D9ABFB41BD6Bll, 0x5BE0CD19137E2179ll + 0x6A09E667F3BCC908ull, 0xBB67AE8584CAA73Bull, 0x3C6EF372FE94F82Bull, + 0xA54FF53A5F1D36F1ull, 0x510E527FADE682D1ull, 0x9B05688C2B3E6C1Full, + 0x1F83D9ABFB41BD6Bull, 0x5BE0CD19137E2179ull }; #endif /* USE_32BIT_ONLY */ @@ -766,33 +766,33 @@ static void SHA384_512ProcessMessageBlock(SHA512Context *context) #else /* !USE_32BIT_ONLY */ /* Constants defined in FIPS 180-3, section 4.2.3 */ static const uint64_t K[80] = { - 0x428A2F98D728AE22ll, 0x7137449123EF65CDll, 0xB5C0FBCFEC4D3B2Fll, - 0xE9B5DBA58189DBBCll, 0x3956C25BF348B538ll, 0x59F111F1B605D019ll, - 0x923F82A4AF194F9Bll, 0xAB1C5ED5DA6D8118ll, 0xD807AA98A3030242ll, - 0x12835B0145706FBEll, 0x243185BE4EE4B28Cll, 0x550C7DC3D5FFB4E2ll, - 0x72BE5D74F27B896Fll, 0x80DEB1FE3B1696B1ll, 0x9BDC06A725C71235ll, - 0xC19BF174CF692694ll, 0xE49B69C19EF14AD2ll, 0xEFBE4786384F25E3ll, - 0x0FC19DC68B8CD5B5ll, 0x240CA1CC77AC9C65ll, 0x2DE92C6F592B0275ll, - 0x4A7484AA6EA6E483ll, 0x5CB0A9DCBD41FBD4ll, 0x76F988DA831153B5ll, - 0x983E5152EE66DFABll, 0xA831C66D2DB43210ll, 0xB00327C898FB213Fll, - 0xBF597FC7BEEF0EE4ll, 0xC6E00BF33DA88FC2ll, 0xD5A79147930AA725ll, - 0x06CA6351E003826Fll, 0x142929670A0E6E70ll, 0x27B70A8546D22FFCll, - 0x2E1B21385C26C926ll, 0x4D2C6DFC5AC42AEDll, 0x53380D139D95B3DFll, - 0x650A73548BAF63DEll, 0x766A0ABB3C77B2A8ll, 0x81C2C92E47EDAEE6ll, - 0x92722C851482353Bll, 0xA2BFE8A14CF10364ll, 0xA81A664BBC423001ll, - 0xC24B8B70D0F89791ll, 0xC76C51A30654BE30ll, 0xD192E819D6EF5218ll, - 0xD69906245565A910ll, 0xF40E35855771202All, 0x106AA07032BBD1B8ll, - 0x19A4C116B8D2D0C8ll, 0x1E376C085141AB53ll, 0x2748774CDF8EEB99ll, - 0x34B0BCB5E19B48A8ll, 0x391C0CB3C5C95A63ll, 0x4ED8AA4AE3418ACBll, - 0x5B9CCA4F7763E373ll, 0x682E6FF3D6B2B8A3ll, 0x748F82EE5DEFB2FCll, - 0x78A5636F43172F60ll, 0x84C87814A1F0AB72ll, 0x8CC702081A6439ECll, - 0x90BEFFFA23631E28ll, 0xA4506CEBDE82BDE9ll, 0xBEF9A3F7B2C67915ll, - 0xC67178F2E372532Bll, 0xCA273ECEEA26619Cll, 0xD186B8C721C0C207ll, - 0xEADA7DD6CDE0EB1Ell, 0xF57D4F7FEE6ED178ll, 0x06F067AA72176FBAll, - 0x0A637DC5A2C898A6ll, 0x113F9804BEF90DAEll, 0x1B710B35131C471Bll, - 0x28DB77F523047D84ll, 0x32CAAB7B40C72493ll, 0x3C9EBE0A15C9BEBCll, - 0x431D67C49C100D4Cll, 0x4CC5D4BECB3E42B6ll, 0x597F299CFC657E2All, - 0x5FCB6FAB3AD6FAECll, 0x6C44198C4A475817ll + 0x428A2F98D728AE22ull, 0x7137449123EF65CDull, 0xB5C0FBCFEC4D3B2Full, + 0xE9B5DBA58189DBBCull, 0x3956C25BF348B538ull, 0x59F111F1B605D019ull, + 0x923F82A4AF194F9Bull, 0xAB1C5ED5DA6D8118ull, 0xD807AA98A3030242ull, + 0x12835B0145706FBEull, 0x243185BE4EE4B28Cull, 0x550C7DC3D5FFB4E2ull, + 0x72BE5D74F27B896Full, 0x80DEB1FE3B1696B1ull, 0x9BDC06A725C71235ull, + 0xC19BF174CF692694ull, 0xE49B69C19EF14AD2ull, 0xEFBE4786384F25E3ull, + 0x0FC19DC68B8CD5B5ull, 0x240CA1CC77AC9C65ull, 0x2DE92C6F592B0275ull, + 0x4A7484AA6EA6E483ull, 0x5CB0A9DCBD41FBD4ull, 0x76F988DA831153B5ull, + 0x983E5152EE66DFABull, 0xA831C66D2DB43210ull, 0xB00327C898FB213Full, + 0xBF597FC7BEEF0EE4ull, 0xC6E00BF33DA88FC2ull, 0xD5A79147930AA725ull, + 0x06CA6351E003826Full, 0x142929670A0E6E70ull, 0x27B70A8546D22FFCull, + 0x2E1B21385C26C926ull, 0x4D2C6DFC5AC42AEDull, 0x53380D139D95B3DFull, + 0x650A73548BAF63DEull, 0x766A0ABB3C77B2A8ull, 0x81C2C92E47EDAEE6ull, + 0x92722C851482353Bull, 0xA2BFE8A14CF10364ull, 0xA81A664BBC423001ull, + 0xC24B8B70D0F89791ull, 0xC76C51A30654BE30ull, 0xD192E819D6EF5218ull, + 0xD69906245565A910ull, 0xF40E35855771202Aull, 0x106AA07032BBD1B8ull, + 0x19A4C116B8D2D0C8ull, 0x1E376C085141AB53ull, 0x2748774CDF8EEB99ull, + 0x34B0BCB5E19B48A8ull, 0x391C0CB3C5C95A63ull, 0x4ED8AA4AE3418ACBull, + 0x5B9CCA4F7763E373ull, 0x682E6FF3D6B2B8A3ull, 0x748F82EE5DEFB2FCull, + 0x78A5636F43172F60ull, 0x84C87814A1F0AB72ull, 0x8CC702081A6439ECull, + 0x90BEFFFA23631E28ull, 0xA4506CEBDE82BDE9ull, 0xBEF9A3F7B2C67915ull, + 0xC67178F2E372532Bull, 0xCA273ECEEA26619Cull, 0xD186B8C721C0C207ull, + 0xEADA7DD6CDE0EB1Eull, 0xF57D4F7FEE6ED178ull, 0x06F067AA72176FBAull, + 0x0A637DC5A2C898A6ull, 0x113F9804BEF90DAEull, 0x1B710B35131C471Bull, + 0x28DB77F523047D84ull, 0x32CAAB7B40C72493ull, 0x3C9EBE0A15C9BEBCull, + 0x431D67C49C100D4Cull, 0x4CC5D4BECB3E42B6ull, 0x597F299CFC657E2Aull, + 0x5FCB6FAB3AD6FAECull, 0x6C44198C4A475817ull }; int t, t8; /* Loop counter */ uint64_t temp1, temp2; /* Temporary word value */ diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java b/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java index 5a57633f63..a3bbff4e1a 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java @@ -1,6 +1,6 @@ /**************************************************************************** ** - ** Copyright (C) 2013 BogDan Vatra + ** Copyright (C) 2016 BogDan Vatra ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Android port of the Qt Toolkit. @@ -176,30 +176,6 @@ public class QtMessageDialogHelper m_buttonsList.add(new ButtonStruct(this, id, text)); } - private void setTextAppearance(TextView view, String attr, String style) - { - try { - int[] attrs = (int[]) Class.forName("android.R$styleable").getDeclaredField("TextAppearance").get(null); - final TypedArray a = m_theme.obtainStyledAttributes(null, - attrs, - Class.forName("android.R$attr").getDeclaredField(attr).getInt(null), - Class.forName("android.R$style").getDeclaredField(style).getInt(null)); - final int textSize = a.getDimensionPixelSize( - Class.forName("android.R$styleable").getDeclaredField("TextAppearance_textSize").getInt(null), 0); - if (textSize != 0) - view.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize); - - final int textColor = a.getColor( - Class.forName("android.R$styleable").getDeclaredField("TextAppearance_textColor").getInt(null), 0x3138); - if (textColor != 0x3138) - view.setTextColor(textColor); - - a.recycle(); - } catch (Exception e) { - e.printStackTrace(); - } - } - private Drawable getStyledDrawable(String drawable) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException { int[] attrs = {Class.forName("android.R$attr").getDeclaredField(drawable).getInt(null)}; @@ -256,7 +232,7 @@ public class QtMessageDialogHelper view.setLongClickable(true); view.setText(m_text); - setTextAppearance(view, "textAppearanceMedium", "TextAppearance_Medium"); + view.setTextAppearance(m_activity, android.R.style.TextAppearance_Medium); RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); layout.setMargins(16, 8, 16, 8); @@ -273,7 +249,7 @@ public class QtMessageDialogHelper view.setLongClickable(true); view.setText(m_informativeText); - setTextAppearance(view, "textAppearanceMedium", "TextAppearance_Medium"); + view.setTextAppearance(m_activity, android.R.style.TextAppearance_Medium); RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); layout.setMargins(16, 8, 16, 8); @@ -293,7 +269,7 @@ public class QtMessageDialogHelper view.setLongClickable(true); view.setText(m_detailedText); - setTextAppearance(view, "textAppearanceSmall", "TextAppearance_Small"); + view.setTextAppearance(m_activity, android.R.style.TextAppearance_Small); RelativeLayout.LayoutParams layout = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); layout.setMargins(16, 8, 16, 8); diff --git a/src/android/templates/res/values/libs.xml b/src/android/templates/res/values/libs.xml index 4d68673cb0..ee3f5e940e 100644 --- a/src/android/templates/res/values/libs.xml +++ b/src/android/templates/res/values/libs.xml @@ -1,7 +1,7 @@ - https://download.qt-project.org/ministro/android/qt5/qt-5.4 + https://download.qt.io/ministro/android/qt5/qt-5.6