1. 17 Sep, 2021 7 commits
    • Liang Qi's avatar
      Revert "Qt xcb: remove false detects of Qt::GroupSwitchModifier" · bb4b40b7
      Liang Qi authored
      This reverts commit 25a7034d
      
      .
      
      The change makes the 5th modifier key broken, which is more
      serious than Backspace key doesn't work in CapsLock on.
      
      And we don't have a better solution for both of them now,
      perhaps it's better to keep the old behavior in 6.2 LTS.
      
      Task-number: QTBUG-49771
      Fixes: QTBUG-95108
      Fixes: QTBUG-95289
      Pick-to: 6.2 6.2.0 5.15
      Change-Id: Ie5d0aafa562b5097e089cafc83ae227c75c6d752
      Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
      bb4b40b7
    • Mitch Curtis's avatar
      macOS: Use new QPlatformTheme::appearance() function · fae419a8
      Mitch Curtis authored
      
      
      Instead of qt_mac_applicationIsInDarkMode().
      
      Task-number: QTBUG-94859
      Change-Id: Ib64c081adfafb2843a7593d0e35668cce70cffd0
      Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
      fae419a8
    • Mitch Curtis's avatar
      Add QPlatformTheme::Appearance for detecting light/dark modes · 2248487c
      Mitch Curtis authored
      
      
      And implement it on Windows and macOS.
      
      Fixes: QTBUG-83908
      Fixes: QTBUG-94859
      Change-Id: I7b0c062adf5d4dbaefa64c862ab8ab1348809d71
      Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
      2248487c
    • Tor Arne Vestbø's avatar
      Don't unload libraries on Darwin-based operating systems · b6200de5
      Tor Arne Vestbø authored
      
      
      We can't guarantee that the library didn't define Objective-C classes
      that still have lingering references, resulting in warnings such as:
      
       Attempt to use unknown class 0x10e52e110.
      
      And possibly crashes such as:
      
       thread #1, queue = 'com.apple.main-thread'
          frame #0: 0x00007fff203829ee libsystem_kernel.dylib`__ulock_wait + 10
          frame #1: 0x00007fff203fa0c5 libsystem_platform.dylib`_os_unfair_lock_lock_slow + 162
          frame #2: 0x00007fff2026226b libobjc.A.dylib`unmap_image + 85
          frame #3: 0x000000010001e11f dyld`dyld::removeImage(ImageLoader*) + 557
          frame #4: 0x000000010002291d dyld`dyld::garbageCollectImages() + 956
          frame #5: 0x000000010002e35d dyld`dlclose + 191
          frame #6: 0x00007fff203cf1c9 libdyld.dylib`dlclose + 183
          frame #7: 0x0000000103f9f2f1 libQt6Core_debug.6.dylib`QLibraryPrivate::unload_sys(this=0x000000011ba2c7d0) at qlibrary_unix.cpp:294:9
          frame #8: 0x0000000103f93f3f libQt6Core_debug.6.dylib`QLibraryPrivate::unload(this=0x000000011ba2c7d0, flag=UnloadSys) at qlibrary.cpp:614:36
          frame #9: 0x0000000103f971fb libQt6Core_debug.6.dylib`QLibraryStore::cleanup() at qlibrary.cpp:425:22
          frame #10: 0x0000000103f970f9 libQt6Core_debug.6.dylib`qlibraryCleanup() at qlibrary.cpp:447:5
          frame #11: 0x0000000103f970d1 libQt6Core_debug.6.dylib`(anonymous namespace)::qlibraryCleanup_dtor_class_::~qlibraryCleanup_dtor_class_(this=0x00000001041edd38) at qlibrary.cpp:449:1
          frame #12: 0x0000000103f930f5 libQt6Core_debug.6.dylib`(anonymous namespace)::qlibraryCleanup_dtor_class_::~qlibraryCleanup_dtor_class_(this=0x00000001041edd38) at qlibrary.cpp:449:1
          frame #13: 0x00007fff202e5d25 libsystem_c.dylib`__cxa_finalize_ranges + 316
          frame #14: 0x00007fff202e6010 libsystem_c.dylib`exit + 53
          frame #15: 0x00007fff203d1f44 libdyld.dylib`start + 8
          frame #16: 0x00007fff203d1f3d libdyld.dylib`start + 1
      
        thread #5, queue = 'com.apple.root.user-interactive-qos', stop reason = signal SIGABRT
          frame #0: 0x00007fff203a356e libsystem_kernel.dylib`__abort_with_payload + 10
          frame #1: 0x00007fff203a4fbd libsystem_kernel.dylib`abort_with_payload_wrapper_internal + 80
          frame #2: 0x00007fff203a4f6d libsystem_kernel.dylib`abort_with_reason + 19
          frame #3: 0x00007fff202749e3 libobjc.A.dylib`_objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*) + 114
          frame #4: 0x00007fff20274971 libobjc.A.dylib`_objc_fatal(char const*, ...) + 135
          frame #5: 0x00007fff20255ccb libobjc.A.dylib`lookUpImpOrForward + 881
          frame #6: 0x00007fff2025539b libobjc.A.dylib`_objc_msgSend_uncached + 75
          frame #7: 0x00007fff22f368d6 AppKit`-[_NSWindowTransformAnimation setCurrentProgress:] + 42
          frame #8: 0x00007fff22f37a8a AppKit`__55-[NSAnimation(NSInternal) _advanceTimeWithDisplayLink:]_block_invoke + 31
          frame #9: 0x00007fff22d0774f AppKit`NSPerformVisuallyAtomicChange + 132
          frame #10: 0x00007fff22f379dc AppKit`-[NSAnimation(NSInternal) _advanceTimeWithDisplayLink:] + 172
          frame #11: 0x00007fff22e9a184 AppKit`-[NSScreenDisplayLink _fire] + 180
          frame #12: 0x00007fff2362f0b4 AppKit`___NSRunLoopTimerCreateWithHandler_block_invoke + 34
          frame #13: 0x00007fff204c6be9 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
          frame #14: 0x00007fff204c66dd CoreFoundation`__CFRunLoopDoTimer + 927
          frame #15: 0x00007fff204c623a CoreFoundation`__CFRunLoopDoTimers + 307
          frame #16: 0x00007fff204ace13 CoreFoundation`__CFRunLoopRun + 1988
          frame #17: 0x00007fff204abf8c CoreFoundation`CFRunLoopRunSpecific + 563
          frame #18: 0x00007fff2123d607 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
          frame #19: 0x00007fff22f378f0 AppKit`-[NSAnimation(NSInternal) _runBlocking] + 453
          frame #20: 0x00007fff22f376ae AppKit`__42-[NSAnimation(NSInternal) _runInNewThread]_block_invoke + 97
          frame #21: 0x0000000104edb032 libdispatch.dylib`_dispatch_call_block_and_release + 12
          frame #22: 0x0000000104edc264 libdispatch.dylib`_dispatch_client_callout + 8
          frame #23: 0x0000000104ef04ac libdispatch.dylib`_dispatch_root_queue_drain + 828
          frame #24: 0x0000000104ef0d3f libdispatch.dylib`_dispatch_worker_thread2 + 127
          frame #25: 0x0000000104f7eac7 libsystem_pthread.dylib`_pthread_wqthread + 244
          frame #26: 0x0000000104f7dae3 libsystem_pthread.dylib`start_wqthread + 15
      
      This has been e.g. observed when a QNSWindow isn't closed and released
      at application quit as expected. Although that is a corner case that
      shouldn't happen, the general case is still valid.
      
      Fixes: QTBUG-96208
      Pick-to: 6.2 5.15
      Change-Id: I6c9d220e6f5389707baf7ae983f3156e8e51c316
      Reviewed-by: default avatarTimur Pocheptsov <timur.pocheptsov@qt.io>
      Reviewed-by: default avatarMorten Johan Sørvig <morten.sorvig@qt.io>
      b6200de5
    • Edward Welbourne's avatar
      Add missing dependencies of tests on their helper programs · cbd33cb5
      Edward Welbourne authored
      
      
      This ensures that a command such as
      
        $ ninja tst_qlocale && ninja tst_qlocale_check
      
      will automagically build the syslocaleapp program that the test runs
      from a subtest. Similar for testlib's selftests and tst_QProcess.
      
      As a drive-by, pruned some legacy comments from when CMakeLists.txt
      files were generated from .pro files.
      
      Change-Id: I67691a8175aaef124d4104cf1898193993408bdf
      Reviewed-by: default avatarAlexey Edelev <alexey.edelev@qt.io>
      Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
      Reviewed-by: default avatarAndrei Golubev <andrei.golubev@qt.io>
      cbd33cb5
    • Ivan Solovev's avatar
      Introduce QDoubleValidator::fixup() · fb3549fc
      Ivan Solovev authored
      
      
      The provided implementation tries to fix positions for the group
      separator.
      In case of scientific notation it can also converts the value to
      normalized form.
      It uses QLocale::FloatingPointShortest internally to convert the
      double value back to string, so the number of decimals may change
      after calling this method.
      
      Change-Id: I963bc5f97b653e2bb912f4b95b09a4d1ee201e7f
      Reviewed-by: default avatarEdward Welbourne <edward.welbourne@qt.io>
      fb3549fc
    • Craig Scott's avatar
      Ensure _qt_is_android_executable is set for internal executables too · d47278fd
      Craig Scott authored
      
      
      The _qt_is_android_executable property is normally set by the
      _qt_internal_create_executable() command. But various other internal
      commands don't route through that and go through
      qt_internal_add_executable() instead. The former is used only by the
      public API, the latter only by the internal API. Refactor both so that
      the internal one calls the public one. This ensures all targets receive
      the same base settings, including the _qt_is_android_executable
      property.
      
      Fixes: QTBUG-96085
      Pick-to: 6.2
      Change-Id: I157356872c9d942d7be5f1abbbcbac97961b1f40
      Reviewed-by: default avatarAlexey Edelev <alexey.edelev@qt.io>
      Reviewed-by: default avatarAlexandru Croitor <alexandru.croitor@qt.io>
      d47278fd
  2. 16 Sep, 2021 14 commits
    • Laszlo Agocs's avatar
      rhi: document serializedLayoutDescription · eda1276f
      Laszlo Agocs authored
      
      
      The docs are internal still but won't hurt to keep them up-to-date.
      At the same time, enhance the QRhiRenderPassDescriptor
      serializedFormat() docs as well, with appropriate notes about the
      intended usage of the "serialized" data.
      
      Pick-to: 6.2
      Change-Id: I8425fff625903468621e3b09d089b345fada85f4
      Reviewed-by: default avatarChristian Strømme <christian.stromme@qt.io>
      eda1276f
    • Laszlo Agocs's avatar
      rhi: Allow testing renderpass compatibility without the objects · 43a42fa1
      Laszlo Agocs authored
      
      
      Follow what has been done for QRhiShaderResourceBindings. Have a way
      to retrieve an opaque blob (that just happens to be a list of integers)
      so that a simple == comparison can be used to determine compatibility
      even when the objects from which the blob was retrieved are no longer
      alive.
      
      The contract is the following:
      
      bool a = rp1->isCompatible(rp2);
      bool b = rp1->serializedFormat() == rp2->serializedFormat();
      assert(a == b);
      
      Pick-to: 6.2
      Change-Id: I45e7d05eeb6dfa2b2de474da0a0644912aaf174a
      Reviewed-by: default avatarQt CI Bot <qt_ci_bot@qt-project.org>
      Reviewed-by: default avatarChristian Strømme <christian.stromme@qt.io>
      43a42fa1
    • Laszlo Agocs's avatar
      rhi: Note in the docs that texture copies expect a matching format · c5a3cabc
      Laszlo Agocs authored
      
      
      Pick-to: 6.2
      Change-Id: I0a1fb042ec2a3983ffbd146ff9bdc9af20134fa5
      Reviewed-by: default avatarChristian Strømme <christian.stromme@qt.io>
      c5a3cabc
    • Alexandru Croitor's avatar
      CMake: Make standalone tests TestsConfig file repo-target-set specific · d470497d
      Alexandru Croitor authored
      Conan CI builds can built a qt repository in a repo-target-set
      configuration. An example of that is qtscxml.
      
      When building standalone tests, qt_build_tests includes a repo
      specific TestsConfig.cmake file to call find_package on the modules
      that were built as part of that repo.
      
      That doesn't quite work with a repo-target-set build which is enabled
      when the repo is built with a QT_BUILD_SINGLE_REPO_TARGET_SET value.
      
      The TestsConfig.cmake file would be overridden with different contents
      on each configuration.
      
      Fix that by including the QT_BUILD_SINGLE_REPO_TARGET_SET value as
      part of the TestsConfig.cmake file to be generated and included.
      
      This means that when configuring the standalone tests, the same
      QT_BUILD_SINGLE_REPO_TARGET_SET value should be passed, so that the
      correct packages are found.
      
      Add some debug statements to allow checking which TestsConfig.cmake
      file is loaded when the standalone tests are configured with
      --log-level=DEBUG.
      
      Adjusts to 4b09522c
      Amends de3a806d
      Amends e7f188b2
      
      
      
      Pick-to: 6.2
      Task-number: QTBUG-96253
      Change-Id: I7c22aaad88fe8e6fce23046543363316203f6e8d
      Reviewed-by: default avatarQt CI Bot <qt_ci_bot@qt-project.org>
      Reviewed-by: Jörg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
      d470497d
    • Pasi Petäjäjärvi's avatar
      Support QNX QCC compiler · 5f3e8dde
      Pasi Petäjäjärvi authored
      
      
      tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::os9Newline()':
      qtbase/tests/auto/tools/moc/tst_moc.cpp:1225: undefined reference to `Os9Newlines::staticMetaObject'
      tests/auto/tools/moc/CMakeFiles/tst_moc.dir/tst_moc.cpp.o: in function `tst_Moc::winNewline()':
      qtbase/tests/auto/tools/moc/tst_moc.cpp:1239: undefined reference to `WinNewlines::staticMetaObject'
      
      Pick-to: 6.2
      Change-Id: I629d67c1190e09b26dc09e41cb7170cb0eadf1cb
      Reviewed-by: default avatarFabian Kosmale <fabian.kosmale@qt.io>
      5f3e8dde
    • Tor Arne Vestbø's avatar
      Revert "coin: Generate JUnit result files" · 8dd14a95
      Tor Arne Vestbø authored
      This reverts commit c7ddaa9f
      
      .
      
      Reason for revert: Broke integrations
      
      Change-Id: I21ffb3b16e361a48a5d9b7a528d150e51519623c
      Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
      8dd14a95
    • Waqar Ahmed's avatar
      QTextDocumentLayout: remove multiple calls to lineHeightType · b2140399
      Waqar Ahmed authored and Waqar Ahmed's avatar Waqar Ahmed committed
      
      
      Get LineHeightType once and reuse the value. There still are 2 calls
      to lineHeightType from inside the QTextBlockFormat::lineHeight but
      leaving them cause they need a bigger change.
      
      Change-Id: I4016a5e483a0358d43f73d174a74545d4f3be338
      Reviewed-by: default avatarKonstantin Ritt <ritt.ks@gmail.com>
      Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
      b2140399
    • Kai Koehne's avatar
      Rewrite Qt Resource System overview · 643b58a4
      Kai Koehne authored and Kai Koehne's avatar Kai Koehne committed
      
      
      Restructure the Qt Resource System page to make the content more
      accessible, and coherent:
      - Focus less on the .qrc file format, but the overall use cases
      - Treat CMake as first-class citizen
      - Make it more obvious when to use :/, and when qrc:/
      
      Some details that were deemed unnecessary were removed:
      - details about the internal naming of the .cpp file when
        qmake is used.
      - References to QDir::addSearchPath() and the search path list were
        removed. They relate IMO only indirectly to the Qt resource system.
      - A lot of the explanation around Q_INIT_RESOURCE/Q_CLEANUP_RESOURCE
        were dubious at best.
      
      Pick-to: 6.2 6.2.0
      Fixes: QTBUG-95126
      Fixes: QTBUG-94977
      Fixes: QTBUG-59394
      Task-number: QTBUG-88044
      Change-Id: I04b64f2366631b2106f047de121daf5fdb01073d
      Reviewed-by: default avatarAlexey Edelev <alexey.edelev@qt.io>
      643b58a4
    • Laszlo Agocs's avatar
      rhi: gl: Have a way to state GL_TEXTURE_RECTANGLE is wanted · d55a6891
      Laszlo Agocs authored
      
      
      Added specifically to support the deprecated CVOpenGLTextureCache on
      macOS, because Qt Multimedia still needs a way to use that when the
      applications requests using OpenGL instead of Metal.
      
      Follow what we did for GL_TEXTURE_EXTERNAL_OES, and add a flag that
      simply makes all our glBindTexture calls use the
      GL_TEXTURE_RECTANGLE[_ARB] target.
      
      Pick-to: 6.2
      Change-Id: If818b13a9f520cdb8bdc16de84a3ca0e18ad6c33
      Reviewed-by: default avatarLars Knoll <lars.knoll@qt.io>
      d55a6891
    • Luca Di Sera's avatar
      Doc: Centralize RFC documentation-links in rfc.qdoc · 10eedd17
      Luca Di Sera authored
      
      
      In the effort of repairing broken links as per QTBUG-96127,
      a series of RFC links referring to `tools.ietf.org/html/*` were modified
      to point to the new address that the site redirected to.
      
      To simplify executing a similar task and to diminish the duplication of
      manually inserted urls, the already existing `rfc.qdoc` file, containing
      `\externalpage` commands directing to RFC locations, was enhanced with
      links to all RFCs that were mentioned in the current documentation, so
      as to aggregate this common category of links.
      
      All links pointing to a `ietf` domain inside QDoc documentation blocks
      were then changed to use the newly provided external-references.
      
      Task-number: QTBUG-96127
      Pick-to: 6.2
      Change-Id: I2a52eb6aa8c9e346f64ef1a627b039220d9f6c2a
      Reviewed-by: default avatarMårten Nordheim <marten.nordheim@qt.io>
      10eedd17
    • Tor Arne Vestbø's avatar
      Close QDialog via QWidget::close() · 0246bfd4
      Tor Arne Vestbø authored
      
      
      By going via QWidget::close() we ensure that if there's a QWidgetWindow
      backing the dialog (which is almost always the case), we will plumb down
      to QWindow::close(), resulting in QEvent::Close events to the QWindow.
      
      Since we don't want QDialog subclasses to receive a call to a closeEvent
      override that they didn't receive before (and which they might interpret
      as rejection or cancellation), install a temporary event filter that
      eats the QCloseEvent resulting from the call to close().
      
      Task-number: QTBUG-53286
      Change-Id: Ie8f6f0cb3160acfd5865dc74f0a7b6d87f838724
      Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
      0246bfd4
    • Tor Arne Vestbø's avatar
      testlib: Gracefully handle messages outside of test function in JUnit reporter · 8aa1fc6f
      Tor Arne Vestbø authored
      
      
      Fixes: QTBUG-96543
      Task-number: COIN-755
      Pick-to: 6.2
      Change-Id: I2334597319f3595f37f48c9811f667e57b99df28
      Reviewed-by: default avatarFabian Kosmale <fabian.kosmale@qt.io>
      8aa1fc6f
    • Alexey Edelev's avatar
      Add missing private cpp exports template to install set · 040258b2
      Alexey Edelev authored
      Add missing modulecppexports_p.h.in template to install set.
      
      Amends e1fe816d
      
      
      
      Task-number: QTBUG-90492
      Change-Id: I25db6f98637bd33a1c56f6b098ac76c4292de581
      Reviewed-by: Jörg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
      Reviewed-by: default avatarQt CI Bot <qt_ci_bot@qt-project.org>
      040258b2
    • Alexey Edelev's avatar
      Expose cpp export related arguments for qt_internal_add_module users · a7458b25
      Alexey Edelev authored
      
      
      Functions that use qt_internal_add_module under the hood might need to
      generate cpp exports, e.g. qt_internal_add_qml_module. Append cpp
      exports related arguments to the qt_internal_add_module arguments set.
      
      Task-number: QTBUG-90492
      Change-Id: I4fd539bd1d8be4d3e57ed5b1b88dd2dbc2f5ca24
      Reviewed-by: default avatarCraig Scott <craig.scott@qt.io>
      a7458b25
  3. 15 Sep, 2021 19 commits