Remove an ifdef only relevant to older Qt
This commit is contained in:
@@ -39,14 +39,7 @@ public:
|
||||
int styleHint(QStyle::StyleHint hint, const QStyleOption *option = nullptr,
|
||||
const QWidget *widget = nullptr, QStyleHintReturn *returnData = nullptr) const override
|
||||
{
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
|
||||
auto durationHint = QStyle::SH_Widget_Animate; // deprecated in 5.10
|
||||
#else
|
||||
auto durationHint = QStyle::SH_Widget_Animation_Duration;
|
||||
#endif
|
||||
|
||||
if (hint == durationHint) {
|
||||
if (hint == QStyle::SH_Widget_Animation_Duration) {
|
||||
// QTabBar has a bug which causes the paint event to dereference a tab which was already removed.
|
||||
// Because, after the tab being removed, the d->pressedIndex is only reset after the animation ends.
|
||||
// So disable the animation. Crash can be repro by enabling movable tabs, and detaching a tab quickly from
|
||||
|
||||
Reference in New Issue
Block a user