Remove global GDI helpers qt_win_display_dc and qt_region_from_HRGN
They were no longer used anyway. Change-Id: I565480cf39d2d8a27735afe56ac6537bc62fbd4a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
aad8d17f74
commit
0651a4c274
@ -97,10 +97,6 @@ static const int windowsItemVMargin = 0; // menu item ver text margin
|
||||
static const int windowsArrowHMargin = 6; // arrow horizontal margin
|
||||
static const int windowsRightBorder = 12; // right border on windows
|
||||
|
||||
// External function calls
|
||||
extern Q_WIDGETS_EXPORT HDC qt_win_display_dc();
|
||||
extern QRegion qt_region_from_HRGN(HRGN rgn);
|
||||
|
||||
// Theme names matching the QWindowsXPStylePrivate::Theme enumeration.
|
||||
static const wchar_t *themeNames[QWindowsXPStylePrivate::NThemes] =
|
||||
{
|
||||
|
@ -102,10 +102,6 @@
|
||||
#include "private/qgesturemanager_p.h"
|
||||
#include <qpa/qplatformfontdatabase.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <QtCore/qt_windows.h> // for qt_win_display_dc()
|
||||
#endif
|
||||
|
||||
#include "qdatetime.h"
|
||||
|
||||
#include <qpa/qplatformwindow.h>
|
||||
@ -755,35 +751,12 @@ QApplication::~QApplication()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
// #fixme: Remove.
|
||||
static HDC displayDC = 0; // display device context
|
||||
|
||||
Q_WIDGETS_EXPORT HDC qt_win_display_dc() // get display DC
|
||||
{
|
||||
Q_ASSERT(qApp && qApp->thread() == QThread::currentThread());
|
||||
if (!displayDC)
|
||||
displayDC = GetDC(0);
|
||||
return displayDC;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void qt_cleanup()
|
||||
{
|
||||
QPixmapCache::clear();
|
||||
QColormap::cleanup();
|
||||
|
||||
QApplicationPrivate::active_window = nullptr; //### this should not be necessary
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
if (displayDC) {
|
||||
ReleaseDC(0, displayDC);
|
||||
displayDC = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user