1. 21 Apr, 2017 - 16 commits
  2. 20 Apr, 2017 - 11 commits
  3. 19 Apr, 2017 - 13 commits
    • Tor Arne Vestbø's avatar
      Revert "Initialize QLoggingRegistry rules on first use, not qApp construction" · 924b02ae
      Tor Arne Vestbø authored
      This reverts commit 47cc9e23
      
      .
      
      We use QCoreApplication::applicationDirPath in the logging initialization to find
      a possible qtlogging.ini file. Because QCoreApplication::applicationDirPath requires
      a QCoreApplication instance this leads to a qWarning, which in turn leads to a
      recursive call to the logging initialization, and in turn to a recursive mutex deadlock.
      
      Task-number: QTCREATORBUG-18031
      Change-Id: Ic75e1e8c062eb647991725378489bf87c9648cca
      Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@qt.io>
      924b02ae
    • Elvis Angelaccio's avatar
      QLineEdit: fix broken test · 80432021
      Elvis Angelaccio authored
      Commit 288bfb0b
      
       added a test that uses QLineEditIconButton, which
      requires QT_BUILD_INTERNAL to be defined in order for the findChild()
      call to work as expected.
      
      Change-Id: Ieda18f4e26a91322e8a83c14f8d1fbbe4313ecf0
      Reviewed-by: default avatarGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>
      80432021
    • Olivier Goffart's avatar
      Fix UB in QWidgetEffectSourcePrivate::detach · 97850b95
      Olivier Goffart authored
      
      Delete the QGraphicsEffect from the QWidget destructor instead of from
      the QWidgetPrivate destructor. The destructor of QGraphicsEffect still
      access methods of the QWidget, but the QObjectPrivate being destroyed
      from ~QObject, the pointer is no longer a QWidget.
      
      Fix warning with UB sanitizer in tst_QWidget::setGraphicsEffect
      
      qwidget_p.h:900:23: runtime error: member call on address 0x000001d822c0 which does not point to an object of type 'QWidget'
      0x000001d822c0: note: object is of type 'QObject'
       00 00 00 00  b0 46 5f 40 e5 7f 00 00  00 23 d8 01 00 00 00 00  f0 e6 00 44 e5 7f 00 00  00 00 74 47
                    ^~~~~~~~~~~~~~~~~~~~~~~
                    vptr for 'QObject'
          #0 0x7fe54767db76 in QWidgetEffectSourcePrivate::detach()
          #1 0x7fe548f29815 in QGraphicsEffect::~QGraphicsEffect()
          #2 0x7fe548f2a1b7 in QGraphicsBlurEffect::~QGraphicsBlurEffect()
          #3 0x7fe548f2a208 in QGraphicsBlurEffect::~QGraphicsBlurEffect()
          #4 0x7fe5475cd463 in QWidgetPrivate::~QWidgetPrivate()
          #5 0x7fe5475ce62c in QWidgetPrivate::~QWidgetPrivate()
          #6 0x7fe5400d0dda in QObject::~QObject()
          #7 0x7fe54763d411 in QWidget::~QWidget()
          #8 0x7fe54763d7f4 in QWidget::~QWidget()
          #9 0x4cc309 in QScopedPointerDeleter<QWidget>::cleanup(QWidget*)
          #10 0x4cc309 in QScopedPointer<QWidget, QScopedPointerDeleter<QWidget> >::reset(QWidget*)
          #11 0x4cc309 in tst_QWidget::setGraphicsEffect()
      
      Change-Id: I19c049e979cfce2adda908af8336cb4adac8f6c4
      Reviewed-by: default avatarMarc Mutz <marc.mutz@kdab.com>
      97850b95
    • Olivier Goffart's avatar
      Fix UB in QLayout::childEvent · cdb7e815
      Olivier Goffart authored
      
      We can't just static_cast a child to QLayout, because the child might
      not be a QLayout, and even if it was, we might be called from the
      QObject destructor so we would not be a layout anymore.
      Instead we can just qobject_cast the deleted object to a QLayout and
      remove it from the layout with removeItem.
      This would not take in account the case where we would be called because
      the QLayout gets destroyed, so we handle this case from ~QLayout by
      removing ourself from the parent.
      
      Note that the comment in ~QLayout was wrong, as the layout gets destroyed
      explicitly from ~QWidget, not from ~QObject.
      
      Change-Id: I49c6f17a76f207b9d750b6e5d987469498b96b31
      Reviewed-by: default avatarMarc Mutz <marc.mutz@kdab.com>
      cdb7e815
    • Tor Arne Vestbø's avatar
      macOS: Initialize window geometry early on, instead of when creating NSWindow · f368cd88
      Tor Arne Vestbø authored
      
      We don't need to defer to NSWindow creation before determining the initial
      window geometry, and we don't need to redetermine each time we re-create
      an NSWindow for a QCocoaWindow.
      
      Change-Id: Ie13380830b44e96670ff16513f29deef5f5ae313
      Reviewed-by: default avatarMorten Johan Sørvig <morten.sorvig@qt.io>
      f368cd88
    • Nico Vertriest's avatar
      Doc: Fix link errors · 30d825f5
      Nico Vertriest authored
      
      qimage.cpp:2127: warning: Can't link to 'isDetached()'
      qmatrix4x4.cpp:1933: warning: Can't link to 'operator()()'
      
      Change-Id: I93a2ead9650faf139040173f8d3b24cfa1e730ae
      Reviewed-by: default avatarMartin Smith <martin.smith@qt.io>
      30d825f5
    • Oliver Wolff's avatar
      winrt: Fix keyboard modifier states · 32b92b9e
      Oliver Wolff authored
      
      CoreWindow::GetAsyncKeyState returns flags and not enums so checking
      equality does not give the needed result.
      
      As seen in qwindowskeymapper.cpp key events that only contain a modifier
      key should not have the key itself as a modifier when calling
      handleExtendedKeyEvent.
      
      With the current approach the modifier states are the same as
      on desktop Windows.
      
      Task-number: QTBUG-58750
      Change-Id: Ie0f3e1d3e8294e1a6b41c9223a7a5153306579f6
      Reviewed-by: default avatarMaurice Kalinowski <maurice.kalinowski@qt.io>
      32b92b9e
    • Oliver Wolff's avatar
      winrt: Fix QKeyEvent::isAutoRepeat · ad0249cc
      Oliver Wolff authored
      
      CorePhysicalKeyStatus::KeyStatus does not give the information we are
      after so we have to keep track of "auto repeat" state of the keys
      ourself.
      
      Task-number: QTBUG-59232
      Change-Id: I22aa185780e5fa1f7f3c23c2deb2a0dde0c4a582
      Reviewed-by: default avatarMaurice Kalinowski <maurice.kalinowski@qt.io>
      ad0249cc
    • Allan Sandfeld Jensen's avatar
      Fix PNGs saved from QImage transform of 8-bit images · ee3ac3a3
      Allan Sandfeld Jensen authored
      
      Fixes two separate errors. QImage::transform was incorrectly adding
      colors to the color-table of the returned image when the converted image
      would not be indexed, and qpnghandler was looking at non-empty color-
      table instead of color format.
      
      Task-number: QTBUG-43708
      Change-Id: Ife14b6428ca65ac7d3a0b36a89a73e56d64586b4
      Reviewed-by: default avatarEirik Aavitsland <eirik.aavitsland@qt.io>
      ee3ac3a3
    • Elvis Angelaccio's avatar
      QLineEdit: Make the clear button always the leftmost button · 288bfb0b
      Elvis Angelaccio authored
      
      QLineEditIconButton currently draws a fully transparent pixmap in its
      paintEvent() function, when the line edit is empty. This does not work
      when there is another trailing QAction that is visible even when the
      line edit has no text, as reported in QTBUG-59957.
      
      To fix this issue, make sure the clear button is always the leftmost
      button.
      
      Task-number: QTBUG-59957
      Change-Id: I8a4f96aae07856aa0e1053ebb338ba9bdf052a16
      Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@qt.io>
      288bfb0b
    • Timur Pocheptsov's avatar
      QNetworkReplyHttpImpl - check 'isOpen' twice · 254f35ce
      Timur Pocheptsov authored
      
      A signal emitted after the first 'isOpen' check on QNetworkReply can
      trigger a slot that aborts/closes our reply. So before we can append
      any data to reply's buffer, we have to re-check that we're still open.
      
      Task-number: QTBUG-59909
      Change-Id: I781d5a4fd5fc30d485af63f45cf36c254378af64
      Reviewed-by: default avatarEdward Welbourne <edward.welbourne@qt.io>
      Reviewed-by: default avatarAlex Trotsenko <alex1973tr@gmail.com>
      Reviewed-by: default avatarTimur Pocheptsov <timur.pocheptsov@qt.io>
      254f35ce
    • Stephan Binner's avatar
      Fix build for -no-feature-cssparser · 59d9ee0a
      Stephan Binner authored
      
      Change-Id: I78b66e8a98458736c69c4955390a98f8889968ea
      Reviewed-by: default avatarPaul Olav Tvete <paul.tvete@qt.io>
      59d9ee0a
    • Stephan Binner's avatar
      Fix warning for -no-feature-graphicseffect · b3066656
      Stephan Binner authored
      
      Change-Id: I0be9e4293dfcef3c144f4e998ea071336c4d56d3
      Reviewed-by: default avatarPaul Olav Tvete <paul.tvete@qt.io>
      b3066656