Commit 3597436e authored by guillaume pernot's avatar guillaume pernot

SB: Upgrade QT5

CI: Use QT_QPA_PLATFORM=offscreen
parent d53d7060
......@@ -141,7 +141,7 @@ debian-build:
image: $BUILD_IMAGE_REGISTRY/otb-debian-native:testing
allow_failure: true
script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-testing-gcc
- QT_QPA_PLATFORM=offscreen ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-testing-gcc
after_script:
- export CI_ALLOW_FAILURE=ON
- python3 -u CI/cdash_handler.py
......@@ -159,11 +159,12 @@ ubuntu-xdk-build-doc:
extends: .common-build
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-base:18.04
script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-xdk
- export QT_QPA_PLATFORM=offscreen
- ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-xdk
- mv build/CookBook-*-html.tar.gz . || true
- mv build/Documentation/Cookbook/latex/CookBook-*.pdf . || true
- mv build/Documentation/Doxygen/OTB-Doxygen-*.tar.bz2 . || true
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_packages.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-xdk -DNAME_SUFFIX:string=-glibc-2.27
- ctest -V -S CI/main_packages.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-xdk -DNAME_SUFFIX:string=-glibc-2.27
- mv build_packages/OTB-*.run . || true
needs:
- job: ubuntu-xdk-prepare
......@@ -180,8 +181,9 @@ centos-xdk-build:
extends: .common-build
image: $BUILD_IMAGE_REGISTRY/otb-centos-superbuild-base:6.6
script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=centos-6.6-gcc
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_packages.cmake -DIMAGE_NAME:string=centos-6.6-gcc
- export QT_QPA_PLATFORM=offscreen
- ctest -V -S CI/main_superbuild.cmake -DIMAGE_NAME:string=centos-6.6-gcc
- ctest -V -S CI/main_packages.cmake -DIMAGE_NAME:string=centos-6.6-gcc
- mv build_packages/OTB-*.run . || true
needs:
- job: centos-xdk-prepare
......@@ -286,8 +288,7 @@ ubuntu-xdk-qa-code-coverage:
- $SONAR_OTB_TOKEN
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-superbuild-qa:18.04
script:
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96"
ctest -V -S CI/main_qa.cmake
- QT_QPA_PLATFORM=offscreen ctest -V -S CI/main_qa.cmake
-DIMAGE_NAME:string=ubuntu-18.04-llvm-qa
-DQA:BOOL=ON
- ./CI/otb_coverage.sh
......
......@@ -494,11 +494,10 @@ inline QString ToQString<float>(const float& val)
{
assert(!std::isnan(val));
QString valf;
// See IEEE-754
// Ref. http://en.wikipedia.org/wiki/Single-precision_floating-point_format
valf.sprintf("%.9g", val);
QString valf = QString("%1").arg(val, 0, 'g', 9);
#if 0
std::cout
......@@ -522,11 +521,11 @@ inline QString ToQString<double>(const double& val)
{
assert(!std::isnan(val));
QString vald;
// See IEEE-754
// Ref. http://en.wikipedia.org/wiki/Double_precision
vald.sprintf("%.17g", val);
QString vald = QString("%1").arg(val, 0, 'g', 17);
#if 0
std::cout
......
......@@ -130,8 +130,8 @@ configure_file( ${QT5_CONFIGURE_COMMAND_IN} ${QT5_CONFIGURE_COMMAND} @ONLY )
ExternalProject_Add(QT5
PREFIX QT5
URL "https://download.qt.io/archive/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
URL_MD5 7e167b9617e7bd64012daaacb85477af
URL "https://download.qt.io/archive/qt/5.14/5.14.1/single/qt-everywhere-src-5.14.1.tar.xz"
URL_MD5 781c3179410aff7ef84607214e1e91b4
BINARY_DIR ${QT5_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
......
--- qt-everywhere-src-5.10.1/qtbase/src/gui/configure.json 2018-02-08 19:24:48.000000000 +0100
+++ QT5/qtbase/src/gui/configure.json 2018-04-10 11:50:15.631526687 +0200
@@ -278,8 +278,7 @@
"main": "jpeg_create_compress(cinfo);"
},
"sources": [
- { "libs": "-llibjpeg", "condition": "config.msvc" },
- { "libs": "-ljpeg", "condition": "!config.msvc" }
+ { "libs": "-ljpeg" }
]
},
"libpng": {
--- qt-everywhere-src-5.10.1/qtbase/src/corelib/kernel/qcore_mac_p.h 2018-02-08 19:24:48.000000000 +0100
+++ QT5/qtbase/src/corelib/kernel/qcore_mac_p.h 2018-04-11 15:26:28.118640978 +0200
@@ -86,7 +86,7 @@
QAppleRefCounted(const QAppleRefCounted &other) : value(other.value) { if (value) RetainFunction(value); }
~QAppleRefCounted() { if (value) ReleaseFunction(value); }
operator T() { return value; }
- void swap(QAppleRefCounted &other) Q_DECL_NOEXCEPT_EXPR(noexcept(qSwap(value, other.value)))
+ void swap(QAppleRefCounted &other) Q_DECL_NOEXCEPT_EXPR(noexcept(qSwap(this->value, other.value)))
{ qSwap(value, other.value); }
QAppleRefCounted &operator=(const QAppleRefCounted &other)
{ QAppleRefCounted copy(other); swap(copy); return *this; }
--- qt-everywhere-src-5.10.1/qtbase/src/corelib/kernel/qcore_foundation.mm 2018-02-08 19:24:48.000000000 +0100
+++ QT5/qtbase/src/corelib/kernel/qcore_foundation.mm 2018-04-11 17:03:51.018596589 +0200
@@ -488,7 +488,7 @@
*/
NSTimeZone *QTimeZone::toNSTimeZone() const
{
- return [static_cast<NSTimeZone *>(toCFTimeZone()) autorelease];
+ return [((NSTimeZone *) toCFTimeZone()) autorelease];
}
#endif
--- qt-everywhere-src-5.10.1/qtbase/src/platformsupport/clipboard/qmacmime.mm 2018-02-08 19:24:48.000000000 +0100
+++ QT5/qtbase/src/platformsupport/clipboard/qmacmime.mm 2018-04-11 17:13:54.799982725 +0200
@@ -853,11 +853,11 @@
QImage img = qvariant_cast<QImage>(variant);
NSDictionary *props = @{
- static_cast<NSString *>(kCGImagePropertyPixelWidth) : [NSNumber numberWithInt:img.width()],
- static_cast<NSString *>(kCGImagePropertyPixelHeight) : [NSNumber numberWithInt:img.height()]
+ ((NSString *) kCGImagePropertyPixelWidth) : [NSNumber numberWithInt:img.width()],
+ ((NSString *) kCGImagePropertyPixelHeight) : [NSNumber numberWithInt:img.height()]
};
- CGImageDestinationAddImage(imageDestination, qt_mac_toCGImage(img), static_cast<CFDictionaryRef>(props));
+ CGImageDestinationAddImage(imageDestination, qt_mac_toCGImage(img), (CFDictionaryRef) props);
CGImageDestinationFinalize(imageDestination);
return QList<QByteArray>() << QByteArray::fromCFData(data);
--- qt-everywhere-src-5.10.1/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm 2018-02-08 19:24:48.000000000 +0100
+++ QT5/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm 2018-04-11 17:36:09.563188504 +0200
@@ -1684,7 +1684,7 @@
if (!m_drawContentBorderGradient) {
window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask;
- [window.contentView.superview setNeedsDisplay:YES];
+ [[[window contentView] superview] setNeedsDisplay:YES];
window.titlebarAppearsTransparent = NO;
return;
}
--- qt-everywhere-src-5.10.1/qtbase/src/plugins/platforms/cocoa/qnswindow.mm 2018-02-08 19:24:48.000000000 +0100
+++ QT5/qtbase/src/plugins/platforms/cocoa/qnswindow.mm 2018-04-11 18:27:43.952730012 +0200
@@ -231,7 +231,7 @@
if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
NSPoint loc = [theEvent locationInWindow];
NSRect windowFrame = [self convertRectFromScreen:self.frame];
- NSRect contentFrame = self.contentView.frame;
+ NSRect contentFrame = [[self contentView] frame];
if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
[qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
}
@@ -260,7 +260,7 @@
+ (void)applicationActivationChanged:(NSNotification*)notification
{
const id sender = self;
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
+ NSEnumerator *windowEnumerator = nullptr;
NSApplication *application = [NSApplication sharedApplication];
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
--- qt-everywhere-src-5.10.1/qtbase/src/gui/configure.json 2018-02-08 19:24:48.000000000 +0100
+++ QT5/src/QT5/qtbase/src/gui/configure.json 2018-04-10 14:34:05.529668610 +0200
@@ -158,8 +158,8 @@
]
},
"sources": [
- { "type": "pkgConfig", "args": "freetype2" },
- { "type": "freetype", "libs": "-lfreetype" }
+ { "type": "freetype", "libs": "-lfreetype" },
+ { "type": "pkgConfig", "args": "freetype2" }
]
},
"fontconfig": {
@@ -289,9 +289,9 @@
"main": "(void) png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);"
},
"sources": [
- { "type": "pkgConfig", "args": "libpng" },
+ { "libs": "-lpng", "condition": "!config.msvc" },
{ "libs": "-llibpng", "condition": "config.msvc" },
- { "libs": "-lpng", "condition": "!config.msvc" }
+ { "type": "pkgConfig", "args": "libpng" }
],
"use": [
{ "lib": "zlib", "condition": "features.system-zlib" }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment