1. 07 Oct, 2016 - 1 commit
    • Jan Arve Saether's avatar
      Combine device and point id into 32 bit point id · cd26e66c
      Jan Arve Saether authored
      
      This allows us to not have conflicts between the point ids between
      different devices for QtQuick pointer handlers.
      
      We do this in QtGui because we can then safely compare point ids from
      QTouchEvent::TouchPoint and QQuickEventPoint.
      
      (Point ids that QtQuick pointer handlers use will be based on the point
      ids provided by QTouchEvent::TouchPoint::id)
      
      Change-Id: I8b9ab0d44224b15175b820d33cbb2d8bd21e99f2
      Reviewed-by: default avatarShawn Rutledge <shawn.rutledge@qt.io>
      cd26e66c
  2. 06 Oct, 2016 - 2 commits
  3. 05 Oct, 2016 - 1 commit
  4. 04 Oct, 2016 - 2 commits
  5. 03 Oct, 2016 - 2 commits
  6. 29 Sep, 2016 - 4 commits
  7. 28 Sep, 2016 - 12 commits
    • Liang Qi's avatar
      Merge remote-tracking branch 'origin/5.7' into 5.8 · cdb56c42
      Liang Qi authored
      Conflicts:
      	mkspecs/features/uikit/xcodebuild.mk
      	tests/auto/other/lancelot/tst_lancelot.cpp
      	tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
      	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
      
      Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
      cdb56c42
    • Sune Vuorela's avatar
      Prefer pkg-config for finding libpq · d322ea4e
      Sune Vuorela authored
      
      pg_config is a thing of the past, and at least debian stable offers a
      pkg-config file for libpq
      
      Change-Id: I582c0a78a77f0ebb0c43e31f04b1ef315786b478
      Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
      d322ea4e
    • BogDan Vatra's avatar
      moc: support nested q_namespaces · 87583738
      BogDan Vatra authored
      
      Nested namespaces are quite common, therefore moc should support them.
      
      Task-number: QTBUG-55415
      Change-Id: I756cab36d498eb4342b402d255836d5d30f07b30
      Reviewed-by: default avatarOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
      87583738
    • Oswald Buddenhagen's avatar
      use bindir instead of libdir when launching tools on windows, take 2 · 5dbcced3
      Oswald Buddenhagen authored
      
      this makes build dirs consistent with install dirs, which fixes
      launching tests, examples, and build tools in some configs.
      
      unfortunately, this makes prefix builds slower and their build dirs
      bigger due to the DLLDESTDIR implementation being stupid (QTBUG-11435),
      but i'm not inclined to fix that now. it isn't actually worse than for
      non-prefix builds, so whatever.
      
      Task-number: QTBUG-54438
      Change-Id: Idbd034620e95cb23f7699d243678c4e9fa6353ac
      Reviewed-by: default avatarUlf Hermann <ulf.hermann@qt.io>
      Reviewed-by: default avatarJake Petroules <jake.petroules@qt.io>
      5dbcced3
    • Friedemann Kleint's avatar
      Add note about lifetime of the pointer returned by QClipboard::mimeData() · a4567397
      Friedemann Kleint authored
      
      Explain that it might become invalidated when the clipboard changes.
      
      Task-number: QTBUG-55737
      Change-Id: Ic7366901f60647caab44930ab03915fd0c9aba1a
      Reviewed-by: default avatarTopi Reiniö <topi.reinio@theqtcompany.com>
      a4567397
    • Dmitry Shachnev's avatar
      QApplication: use desktopStyleKey if styleOverride was invalid · 76746dda
      Dmitry Shachnev authored
      
      When the application is passed an invalid style option, we should fall
      back to the style provided by the platform theme, not to the first
      available style.
      
      Change-Id: I59e25b00d4a32221dea7c960d0f4e0068247b2dd
      Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@qt.io>
      76746dda
    • Liang Qi's avatar
      Merge remote-tracking branch 'origin/5.6' into 5.7 · e9183340
      Liang Qi authored
      Conflicts:
      	src/widgets/dialogs/qcolordialog.cpp
      	src/widgets/dialogs/qfiledialog.cpp
      	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
      
      Change-Id: I34bc8a990f8f526889a95a5c7099ef557b9681ad
      e9183340
    • Edward Welbourne's avatar
      syncqt.pl: fix a few misguided regexes to match .h file names · cf0119bb
      Edward Welbourne authored
      
      To match correctly (only) .h files, a regex needs to end in \.h$
      Some of them missed the \, one missed the $.
      (The last also had a legitimate .* before its misunescaped .)
      One pair matched _p.h and _pch.h, which could be combined.
      
      Change-Id: I7539a28eb7017cd0f1b36c72e05108e03a68a952
      Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
      cf0119bb
    • Marc Mutz's avatar
      Plug memleaks in tst_QWidget · da2c73ad
      Marc Mutz authored
      
      We need to delete the style returned from QStyleFactory::create()
      ourselves, so put them into a QScopedPointer.
      
      The alternative would have been to create this once, as a member
      of tst_QWidget, but this is the minimal approach that ensures
      behavior just as the old code, but without the leak.
      
      Change-Id: I527f1031c57be6f05942f4acc057e7dae1af2571
      Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
      da2c73ad
    • Marc Mutz's avatar
      QTapAndHoldGestureRecognizer: Fix several UBs (invalid cast) in recognize() · 24314c73
      Marc Mutz authored
      
      As found by UBSan:
      
        qstandardgestures.cpp:511:67: runtime error: downcast of address 0x7ffc9beb1b90 which does not point to an object of type 'QTouchEvent'
        0x7ffc9beb1b90: note: object is of type 'QPlatformSurfaceEvent'
         fc 7f 00 00  08 93 b1 6f f5 2a 00 00  00 00 00 00 00 00 00 00  d9 00 ec 9b 00 00 00 00  49 01 c1 5e
                      ^~~~~~~~~~~~~~~~~~~~~~~
                      vptr for 'QPlatformSurfaceEvent'
          #0 0x2af55edfa66a in QTapAndHoldGestureRecognizer::recognize(QGesture*, QObject*, QEvent*) qstandardgestures.cpp:511
          #1 0x2af55ee3d9bb in QGestureManager::filterEventThroughContexts(QMultiMap<QObject*, Qt::GestureType> const&, QEvent*) qgesturemanager.cpp:276
          #2 0x2af55ee4565b in QGestureManager::filterEvent(QWidget*, QEvent*) qgesturemanager.cpp:512
          #3 0x2af55ee53945 in QGestureManager::filterEvent(QObject*, QEvent*) qgesturemanager.cpp:556
          #4 0x2af55ea1b83a in QApplication::notify(QObject*, QEvent*) qapplication.cpp:3053
          #5 0x2af573949d0f in QCoreApplication::notifyInternal2(QObject*, QEvent*) qcoreapplication.cpp:988
          #6 0x2af56982ff94 in QCoreApplication::sendEvent(QObject*, QEvent*) qcoreapplication.h:231
          #7 0x2af56982ff94 in QWindowPrivate::create(bool) qwindow.cpp:435
          #8 0x2af55ecd10fe in QWidgetPrivate::create_sys(unsigned long long, bool, bool) qwidget.cpp:1471
          #9 0x2af55ecc770e in QWidget::create(unsigned long long, bool, bool) qwidget.cpp:1333
          #10 0x2af55ed80618 in QWidget::setVisible(bool) qwidget.cpp:8156
          #11 0x4feec4 in tst_QWidget::touchEventsForGesturePendingWidgets() tst_qwidget.cpp:9824
      
        qstandardgestures.cpp:512:67: runtime error: downcast of address 0x7ffc9beb1b90 which does not point to an object of type 'QMouseEvent'
        0x7ffc9beb1b90: note: object is of type 'QPlatformSurfaceEvent'
         fc 7f 00 00  08 93 b1 6f f5 2a 00 00  00 00 00 00 00 00 00 00  d9 00 ec 9b 00 00 00 00  49 01 c1 5e
                      ^~~~~~~~~~~~~~~~~~~~~~~
                      vptr for 'QPlatformSurfaceEvent'
          #0 0x2af55edfaa19 in QTapAndHoldGestureRecognizer::recognize(QGesture*, QObject*, QEvent*) qstandardgestures.cpp:512
          [... skipping common lines ...]
      
        qstandardgestures.cpp:514:95: runtime error: downcast of address 0x
        0x7ffc9beb1b90: note: object is of type 'QPlatformSurfaceEvent'
         fc 7f 00 00  08 93 b1 6f f5 2a 00 00  00 00 00 00 00 00 00 00  d9 00 ec 9b 00 00 00 0
                      ^~~~~~~~~~~~~~~~~~~~~~~
                      vptr for 'QPlatformSurfaceEvent'
          #0 0x2af55edfa966 in QTapAndHoldGestureRecognizer::recognize(QGesture*, QObject*, QEvent*) qstandardgestures.cpp:514
          [... skipping common lines ...]
      
      The problem is that the casts are done outside the switch that
      determines the event's type, so for any given event object, at least
      any two of the casts are invalid.
      
      This could actually be a real problem, because it's trivial for a
      compiler to prove that these three lines unconditionally invoke UB, so
      it has all the right in the world to decide to drop the complete rest
      of the function, using this line of reasoning:
      
      1. The only way for these three casts not to be UB is if event ==
         nullptr.
      
      2. If event == nullptr, then event->type() invokes UB, so event cannot
         be nullptr.
      
      3. The only way both can be true is if this code path is never
         taken. I can thus assume that
      
            object == state && event->type() == QEvent::Timer
      
         is always true, drop the check and execute the if block
         unconditionally (I need to call QEvent::type(), to satisfy the
         as-if-rule, but I needn't check its return value).
      
      Fix by moving the casts where they belong: into each case of the
      switch, where the type of the event has been checked to match the
      target type of the cast.
      
      Change-Id: I3aee8e213dc19d2f51636bcc5221cc92b3142e58
      Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
      24314c73
    • Marc Mutz's avatar
      QWidget: Fix UB (invalid cast) in sendResizeEvents() · c65621b3
      Marc Mutz authored
      
      Found by UBSan:
      
        qwidget.cpp:5228:62: runtime error: downcast of address 0x61b00003d480 which does not point to an object of type 'QWidget'
        0x61b00003d480: note: object is of type 'QMainWindowLayout'
         bc 00 00 75  90 2e 2a 78 4f 2b 00 00  40 c1 02 00 f0 60 00 00  78 2f 2a 78 4f 2b 00 00  00 00 00 00
                      ^~~~~~~~~~~~~~~~~~~~~~~
                      vptr for 'QMainWindowLayout'
          #0 0x2b4f70efb1c2 in sendResizeEvents qwidget.cpp:5228
          #1 0x2b4f70f65f7f in QWidget::grab(QRect const&) qwidget.cpp:5252
          #2 0x6b1746 in tst_QWidget::render_task188133() tst_qwidget.cpp:6615
      
      Fix by performing the cast only after the test for isWidgetType() has
      succeeded.
      
      Change-Id: I061a60ef35bcb5fbefb9bc7b84706c9dd5afd207
      Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
      c65621b3
    • Marc Mutz's avatar
      tst_QApplication: Fix UBs (invalid cast) in focusMouseClick() · 5571d2bf
      Marc Mutz authored
      Found by UBSan:
      
        tst_qapplication.cpp:1754:48: runtime error: member access within address 0x7ffda11f2220 which does not point to an object of type 'SpontaneousEvent'
        0x7ffda11f2220: note: object is of type 'QMouseEvent'
      
      The code attempted to model the layout of a QEvent with another class
      that allows public access to the memory location that (hopefully)
      corresponds to QEvent::spont, gaining access by casting a QEvent
      object to that specifically-crafted class.
      
      Fix by the using the existing QSpontaneKeyEvent::setSpontaneous()
      call, which, despite its name, works for all QEvent subclasses, and
      which has already been fixed to not invoke UB (in bc087db5
      
      ).
      
      Change-Id: I7db8b8a8a823f7d61ab17375142d19dc3874fea5
      Reviewed-by: default avatarOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
      5571d2bf
  8. 27 Sep, 2016 - 16 commits