diff options
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 6e5fe0d1cf..91be0d25a4 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -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> @@ -309,22 +305,6 @@ void QApplicationPrivate::createEventDispatcher() \sa QCoreApplication, QAbstractEventDispatcher, QEventLoop, QSettings */ -#if QT_DEPRECATED_SINCE(5, 8) -// ### fixme: Qt 6: Remove ColorSpec and accessors. -/*! - \enum QApplication::ColorSpec - \obsolete - - \value NormalColor the default color allocation policy - \value CustomColor the same as NormalColor for X11; allocates colors - to a palette on demand under Windows - \value ManyColor the right choice for applications that use thousands of - colors - - See setColorSpec() for full details. -*/ -#endif - /*! \fn QWidget *QApplication::topLevelAt(const QPoint &point) @@ -771,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 } /*! @@ -1144,83 +1101,6 @@ QStyle* QApplication::setStyle(const QString& style) return s; } -#if QT_DEPRECATED_SINCE(5, 8) -/*! - Returns the color specification. - \obsolete - - \sa QApplication::setColorSpec() -*/ - -int QApplication::colorSpec() -{ - return QApplication::NormalColor; -} - -/*! - Sets the color specification for the application to \a spec. - \obsolete - - This call has no effect. - - The color specification controls how the application allocates colors when - run on a display with a limited amount of colors, e.g. 8 bit / 256 color - displays. - - The color specification must be set before you create the QApplication - object. - - The options are: - \list - \li QApplication::NormalColor. This is the default color allocation - strategy. Use this option if your application uses buttons, menus, - texts and pixmaps with few colors. With this option, the - application uses system global colors. This works fine for most - applications under X11, but on the Windows platform, it may cause - dithering of non-standard colors. - \li QApplication::CustomColor. Use this option if your application - needs a small number of custom colors. On X11, this option is the - same as NormalColor. On Windows, Qt creates a Windows palette, and - allocates colors to it on demand. - \li QApplication::ManyColor. Use this option if your application is - very color hungry, e.g., it requires thousands of colors. \br - Under X11 the effect is: - \list - \li For 256-color displays which have at best a 256 color true - color visual, the default visual is used, and colors are - allocated from a color cube. The color cube is the 6x6x6 - (216 color) "Web palette" (the red, green, and blue - components always have one of the following values: 0x00, - 0x33, 0x66, 0x99, 0xCC, or 0xFF), but the number of colors - can be changed by the \e -ncols option. The user can force - the application to use the true color visual with the - \l{QApplication::QApplication()}{-visual} option. - \li For 256-color displays which have a true color visual with - more than 256 colors, use that visual. Silicon Graphics X - servers this feature, for example. They provide an 8 bit - visual by default but can deliver true color when asked. - \endlist - On Windows, Qt creates a Windows palette, and fills it with a color - cube. - \endlist - - Be aware that the CustomColor and ManyColor choices may lead to colormap - flashing: The foreground application gets (most) of the available colors, - while the background windows will look less attractive. - - Example: - - \snippet code/src_gui_kernel_qapplication.cpp 2 - - \sa colorSpec() -*/ - -void QApplication::setColorSpec(int spec) -{ - Q_UNUSED(spec) -} -#endif - /*! \property QApplication::globalStrut \brief the minimum size that any GUI element that the user can interact @@ -1572,24 +1452,6 @@ QString QApplicationPrivate::desktopStyleKey() return QString(); } -#if QT_VERSION < 0x060000 // remove these forwarders in Qt 6 -/*! - \property QApplication::windowIcon - \brief the default window icon - - \sa QWidget::setWindowIcon(), {Setting the Application Icon} -*/ -QIcon QApplication::windowIcon() -{ - return QGuiApplication::windowIcon(); -} - -void QApplication::setWindowIcon(const QIcon &icon) -{ - QGuiApplication::setWindowIcon(icon); -} -#endif - void QApplicationPrivate::notifyWindowIconChanged() { QEvent ev(QEvent::ApplicationWindowIconChange); |