From c9539f340ea0917ed17f83abf75f1a4e33c4fd82 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Jan 2018 14:31:30 +0100 Subject: QtWidgets: Raise minimum supported MSVC version to 2015 Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I2ba95bde2b8bbcca1833dc14c344b9a14394bc1d Reviewed-by: Richard Moe Gustavsen --- src/widgets/dialogs/qwizard_win.cpp | 6 +++--- src/widgets/widgets/qwidgettextcontrol.cpp | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp index e7b4870e35..6f0e436ae0 100644 --- a/src/widgets/dialogs/qwizard_win.cpp +++ b/src/widgets/dialogs/qwizard_win.cpp @@ -663,12 +663,12 @@ bool QVistaHelper::drawBlackRect(const QRect &rect, HDC hdc) return value; } -#if !defined(_MSC_VER) || _MSC_VER < 1700 +#ifndef Q_CC_MSVC static inline int getWindowBottomMargin() { return GetSystemMetrics(SM_CYSIZEFRAME); } -#else // !_MSC_VER || _MSC_VER < 1700 +#else // QTBUG-36192, GetSystemMetrics(SM_CYSIZEFRAME) returns bogus values // for MSVC2012 which leads to the custom margin having no effect since // that only works when removing the entire margin. @@ -678,7 +678,7 @@ static inline int getWindowBottomMargin() AdjustWindowRectEx(&rect, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_THICKFRAME | WS_DLGFRAME, FALSE, 0); return qAbs(rect.bottom); } -#endif // _MSC_VER >= 1700 +#endif // Q_CC_MSVC int QVistaHelper::frameSizeDp() { diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 6a8d6a3654..93158dcdba 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -1427,10 +1427,6 @@ QRectF QWidgetTextControlPrivate::rectForPosition(int position) const namespace { struct QTextFrameComparator { -#if defined(Q_CC_MSVC) && _MSC_VER < 1600 -//The STL implementation of MSVC 2008 requires the definition - bool operator()(QTextFrame *frame1, QTextFrame *frame2) { return frame1->firstPosition() < frame2->firstPosition(); } -#endif bool operator()(QTextFrame *frame, int position) { return frame->firstPosition() < position; } bool operator()(int position, QTextFrame *frame) { return position < frame->firstPosition(); } }; -- cgit v1.2.3