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 <richard.gustavsen@qt.io>bb10
parent
5af4cb5a5a
commit
c9539f340e
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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(); }
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue