Skip to content
  • David Hurka's avatar
    Fix QScroller crash on Qt < 5.14 and certain screen arrangements · c6a32751
    David Hurka authored
    QScrollerPrivate::setDpiFromWidget() before Qt 5.14 crashes
    when the target widget does not intersect a physical screen,
    because QDesktopWidget returns screen index `-1` in this case,
    which leads to an out-of-range read from QApplication::screens(),
    which leads to a segfault when reading from an invalid QScreen* pointer.
    
    This adds a workaround that checks for the `-1` situation,
    and then tries to resize PageView temporarily to intersect at least some screen.
    
    BUG: 425188
    FIXED-IN: 20.12
    c6a32751