Make it more obvious that Q_WS_ is dead code, and should perhaps be ported
We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
611bcc3cd3
commit
c5db8fc74a
@ -7,7 +7,7 @@ defines += Q_QDOC \
|
|||||||
QT_KEYPAD_NAVIGATION \
|
QT_KEYPAD_NAVIGATION \
|
||||||
QT_NO_EGL \
|
QT_NO_EGL \
|
||||||
QT3_SUPPORT \
|
QT3_SUPPORT \
|
||||||
Q_WS_.* \
|
Q_DEAD_CODE_FROM_QT4_.* \
|
||||||
Q_OS_.* \
|
Q_OS_.* \
|
||||||
Q_BYTE_ORDER \
|
Q_BYTE_ORDER \
|
||||||
QT_DEPRECATED \
|
QT_DEPRECATED \
|
||||||
|
@ -110,7 +110,7 @@ void ColorEdit::mousePressEvent(QMouseEvent *event)
|
|||||||
QColorDialog dialog(color, 0);
|
QColorDialog dialog(color, 0);
|
||||||
dialog.setOption(QColorDialog::ShowAlphaChannel, true);
|
dialog.setOption(QColorDialog::ShowAlphaChannel, true);
|
||||||
// The ifdef block is a workaround for the beta, TODO: remove when bug 238525 is fixed
|
// The ifdef block is a workaround for the beta, TODO: remove when bug 238525 is fixed
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
dialog.setOption(QColorDialog::DontUseNativeDialog, true);
|
dialog.setOption(QColorDialog::DontUseNativeDialog, true);
|
||||||
#endif
|
#endif
|
||||||
dialog.move(280, 120);
|
dialog.move(280, 120);
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include "languagechooser.h"
|
#include "languagechooser.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
extern void qt_mac_set_menubar_merge(bool merge);
|
extern void qt_mac_set_menubar_merge(bool merge);
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
@ -82,7 +82,7 @@ LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent)
|
|||||||
mainLayout->addWidget(buttonBox);
|
mainLayout->addWidget(buttonBox);
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
qt_mac_set_menubar_merge(false);
|
qt_mac_set_menubar_merge(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
#include "qpalette.h"
|
#include "qpalette.h"
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <private/qt_mac_p.h>
|
#include <private/qt_mac_p.h>
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
#include <QtGui/QPainter>
|
#include <QtGui/QPainter>
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ void QIconLoaderEngine::paint(QPainter *painter, const QRect &rect,
|
|||||||
QIcon::Mode mode, QIcon::State state)
|
QIcon::Mode mode, QIcon::State state)
|
||||||
{
|
{
|
||||||
QSize pixmapSize = rect.size();
|
QSize pixmapSize = rect.size();
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
pixmapSize *= qt_mac_get_scalefactor();
|
pixmapSize *= qt_mac_get_scalefactor();
|
||||||
#endif
|
#endif
|
||||||
painter->drawPixmap(rect, pixmap(pixmapSize, mode, state));
|
painter->drawPixmap(rect, pixmap(pixmapSize, mode, state));
|
||||||
|
@ -239,7 +239,7 @@ int QWindowsFontEngine::getGlyphIndexes(const QChar *str, int numChars, QGlyphLa
|
|||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
const uint uc = it.next();
|
const uint uc = it.next();
|
||||||
if (
|
if (
|
||||||
#ifdef Q_WS_WINCE
|
#ifdef Q_DEAD_CODE_FROM_QT4_WINCE
|
||||||
tm.tmFirstChar > 60000 ||
|
tm.tmFirstChar > 60000 ||
|
||||||
#endif
|
#endif
|
||||||
uc >= first && uc <= last)
|
uc >= first && uc <= last)
|
||||||
|
@ -75,7 +75,7 @@ QPixmapStyle::~QPixmapStyle()
|
|||||||
void QPixmapStyle::polish(QApplication *application)
|
void QPixmapStyle::polish(QApplication *application)
|
||||||
{
|
{
|
||||||
QCommonStyle::polish(application);
|
QCommonStyle::polish(application);
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
QApplication::setEffectEnabled(Qt::UI_AnimateCombo, false);
|
QApplication::setEffectEnabled(Qt::UI_AnimateCombo, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ void QPixmapStyle::polish(QWidget *widget)
|
|||||||
frame->setContentsMargins(pix.margins.left(), desc.margins.top(),
|
frame->setContentsMargins(pix.margins.left(), desc.margins.top(),
|
||||||
pix.margins.right(), desc.margins.bottom());
|
pix.margins.right(), desc.margins.bottom());
|
||||||
frame->setAttribute(Qt::WA_TranslucentBackground);
|
frame->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
// FramelessWindowHint is needed on windows to make
|
// FramelessWindowHint is needed on windows to make
|
||||||
// WA_TranslucentBackground work properly
|
// WA_TranslucentBackground work properly
|
||||||
frame->setWindowFlags(widget->windowFlags() | Qt::FramelessWindowHint);
|
frame->setWindowFlags(widget->windowFlags() | Qt::FramelessWindowHint);
|
||||||
|
@ -110,7 +110,7 @@ void QPageSetupDialogPrivate::setPrinter(QPrinter *newPrinter)
|
|||||||
printer = new QPrinter;
|
printer = new QPrinter;
|
||||||
ownsPrinter = true;
|
ownsPrinter = true;
|
||||||
}
|
}
|
||||||
#ifndef Q_WS_X11
|
#ifndef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
if (printer->outputFormat() != QPrinter::NativeFormat)
|
if (printer->outputFormat() != QPrinter::NativeFormat)
|
||||||
qWarning("QPageSetupDialog: Cannot be used on non-native printers");
|
qWarning("QPageSetupDialog: Cannot be used on non-native printers");
|
||||||
#endif
|
#endif
|
||||||
|
@ -204,7 +204,6 @@
|
|||||||
QT_.*_LIB \
|
QT_.*_LIB \
|
||||||
QT_COMPAT \
|
QT_COMPAT \
|
||||||
QT3_SUPPORT \
|
QT3_SUPPORT \
|
||||||
Q_WS_.* \
|
|
||||||
Q_OS_.* \
|
Q_OS_.* \
|
||||||
Q_BYTE_ORDER \
|
Q_BYTE_ORDER \
|
||||||
__cplusplus
|
__cplusplus
|
||||||
@ -214,14 +213,14 @@
|
|||||||
symbols to be defined. For example:
|
symbols to be defined. For example:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_OS_WIN
|
||||||
HDC getDC() const;
|
HDC getDC() const;
|
||||||
void releaseDC(HDC) const;
|
void releaseDC(HDC) const;
|
||||||
#endif
|
#endif
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Since the Q_WS_.* regular expression (specified using the \c
|
Since the Q_OS_.* regular expression (specified using the \c
|
||||||
defines variable) matches Q_WS_WIN, QDoc will process the code
|
defines variable) matches Q_OS_WIN, QDoc will process the code
|
||||||
within #ifdef and #endif in our example.
|
within #ifdef and #endif in our example.
|
||||||
|
|
||||||
You can also define preprocessor symbols manually on the command
|
You can also define preprocessor symbols manually on the command
|
||||||
|
@ -1605,7 +1605,7 @@ void QColorDialogPrivate::init(const QColor &initial)
|
|||||||
if (!nativeDialogInUse)
|
if (!nativeDialogInUse)
|
||||||
initWidgets();
|
initWidgets();
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
delegate = 0;
|
delegate = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
@ -2009,7 +2009,7 @@ QColorDialog::ColorDialogOptions QColorDialog::options() const
|
|||||||
\sa color, colorSelected()
|
\sa color, colorSelected()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// can only have one Cocoa color panel active
|
// can only have one Cocoa color panel active
|
||||||
bool QColorDialogPrivate::sharedColorPanelAvailable = true;
|
bool QColorDialogPrivate::sharedColorPanelAvailable = true;
|
||||||
#endif
|
#endif
|
||||||
@ -2040,7 +2040,7 @@ void QColorDialog::setVisible(bool visible)
|
|||||||
if (visible)
|
if (visible)
|
||||||
d->selectedQColor = QColor();
|
d->selectedQColor = QColor();
|
||||||
|
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (visible) {
|
if (visible) {
|
||||||
if (d->delegate || (QColorDialogPrivate::sharedColorPanelAvailable &&
|
if (d->delegate || (QColorDialogPrivate::sharedColorPanelAvailable &&
|
||||||
!(testAttribute(Qt::WA_DontShowOnScreen) || (d->opts & DontUseNativeDialog)))){
|
!(testAttribute(Qt::WA_DontShowOnScreen) || (d->opts & DontUseNativeDialog)))){
|
||||||
@ -2141,7 +2141,7 @@ QRgb QColorDialog::getRgba(QRgb initial, bool *ok, QWidget *parent)
|
|||||||
|
|
||||||
QColorDialog::~QColorDialog()
|
QColorDialog::~QColorDialog()
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
Q_D(QColorDialog);
|
Q_D(QColorDialog);
|
||||||
if (d->delegate) {
|
if (d->delegate) {
|
||||||
d->releaseCocoaColorPanelDelegate();
|
d->releaseCocoaColorPanelDelegate();
|
||||||
|
@ -150,7 +150,7 @@ public:
|
|||||||
QWindow dummyTransparentWindow;
|
QWindow dummyTransparentWindow;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
void openCocoaColorPanel(const QColor &initial,
|
void openCocoaColorPanel(const QColor &initial,
|
||||||
QWidget *parent, const QString &title, QColorDialog::ColorDialogOptions options);
|
QWidget *parent, const QString &title, QColorDialog::ColorDialogOptions options);
|
||||||
void closeCocoaColorPanel();
|
void closeCocoaColorPanel();
|
||||||
|
@ -327,16 +327,12 @@ Q_GLOBAL_STATIC(QUrl, lastVisitedDir)
|
|||||||
This signal is emitted when the user selects a \a filter.
|
This signal is emitted when the user selects a \a filter.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
|
||||||
//bool Q_WIDGETS_EXPORT qt_use_native_dialogs = true; // for the benefit of testing tools, until we have a proper API
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
QT_BEGIN_INCLUDE_NAMESPACE
|
QT_BEGIN_INCLUDE_NAMESPACE
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
#include <qwindowsstyle_p.h>
|
#include <qwindowsstyle_p.h>
|
||||||
#endif
|
#endif
|
||||||
#include <qshortcut.h>
|
#include <qshortcut.h>
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <qmacstyle_mac_p.h>
|
#include <qmacstyle_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
QT_END_INCLUDE_NAMESPACE
|
QT_END_INCLUDE_NAMESPACE
|
||||||
|
@ -697,7 +697,7 @@ void QProgressDialog::setValue(int progress)
|
|||||||
d->shown_once = true;
|
d->shown_once = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QApplication::flush();
|
QApplication::flush();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
state |= QStyle::State_MouseOver;
|
state |= QStyle::State_MouseOver;
|
||||||
if (widget->window()->isActiveWindow())
|
if (widget->window()->isActiveWindow())
|
||||||
state |= QStyle::State_Active;
|
state |= QStyle::State_Active;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp
|
extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp
|
||||||
if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
|
if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
|
||||||
state &= ~QStyle::State_Enabled;
|
state &= ~QStyle::State_Enabled;
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
|
|
||||||
@ -344,4 +344,4 @@ QAbstractItemModel *MacMainWindow::createDocumentModel()
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
@ -7404,7 +7404,7 @@ void QGraphicsItem::setInputMethodHints(Qt::InputMethodHints hints)
|
|||||||
*/
|
*/
|
||||||
void QGraphicsItem::updateMicroFocus()
|
void QGraphicsItem::updateMicroFocus()
|
||||||
{
|
{
|
||||||
#if !defined(QT_NO_IM) && defined(Q_WS_X11)
|
#if !defined(QT_NO_IM) && defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
if (QWidget *fw = QApplication::focusWidget()) {
|
if (QWidget *fw = QApplication::focusWidget()) {
|
||||||
if (scene()) {
|
if (scene()) {
|
||||||
for (int i = 0 ; i < scene()->views().count() ; ++i) {
|
for (int i = 0 ; i < scene()->views().count() ; ++i) {
|
||||||
|
@ -4136,7 +4136,7 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
|
|||||||
wheelEvent->scenePos(),
|
wheelEvent->scenePos(),
|
||||||
wheelEvent->widget());
|
wheelEvent->widget());
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// On Mac, ignore the event if the first item under the mouse is not the last opened
|
// On Mac, ignore the event if the first item under the mouse is not the last opened
|
||||||
// popup (or one of its descendant)
|
// popup (or one of its descendant)
|
||||||
if (!d->popupWidgets.isEmpty() && !wheelCandidates.isEmpty() && wheelCandidates.first() != d->popupWidgets.back() && !d->popupWidgets.back()->isAncestorOf(wheelCandidates.first())) {
|
if (!d->popupWidgets.isEmpty() && !wheelCandidates.isEmpty() && wheelCandidates.first() != d->popupWidgets.back() && !d->popupWidgets.back()->isAncestorOf(wheelCandidates.first())) {
|
||||||
@ -4375,7 +4375,7 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
|
|||||||
|
|
||||||
// Render directly, using no cache.
|
// Render directly, using no cache.
|
||||||
if (cacheMode == QGraphicsItem::NoCache
|
if (cacheMode == QGraphicsItem::NoCache
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
|| !X11->use_xrender
|
|| !X11->use_xrender
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
@ -3484,7 +3484,7 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
|
|||||||
|
|
||||||
// Draw background
|
// Draw background
|
||||||
if ((d->cacheMode & CacheBackground)
|
if ((d->cacheMode & CacheBackground)
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
&& X11->use_xrender
|
&& X11->use_xrender
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
@ -3683,7 +3683,7 @@ void QGraphicsView::scrollContentsBy(int dx, int dy)
|
|||||||
d->updateLastCenterPoint();
|
d->updateLastCenterPoint();
|
||||||
|
|
||||||
if ((d->cacheMode & CacheBackground)
|
if ((d->cacheMode & CacheBackground)
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
&& X11->use_xrender
|
&& X11->use_xrender
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
|
@ -176,7 +176,7 @@ public:
|
|||||||
|
|
||||||
inline void dispatchPendingUpdateRequests()
|
inline void dispatchPendingUpdateRequests()
|
||||||
{
|
{
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// QWidget::update() works slightly different on the Mac without the raster engine;
|
// QWidget::update() works slightly different on the Mac without the raster engine;
|
||||||
// it's not part of our backing store so it needs special threatment.
|
// it's not part of our backing store so it needs special threatment.
|
||||||
if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) {
|
if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) {
|
||||||
@ -187,7 +187,7 @@ public:
|
|||||||
extern void qt_mac_dispatchPendingUpdateRequests(QWidget *);
|
extern void qt_mac_dispatchPendingUpdateRequests(QWidget *);
|
||||||
qt_mac_dispatchPendingUpdateRequests(viewport->window());
|
qt_mac_dispatchPendingUpdateRequests(viewport->window());
|
||||||
} else
|
} else
|
||||||
#endif // !Q_WS_MAC
|
#endif // !Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
{
|
{
|
||||||
if (qt_widget_private(viewport)->paintOnScreen())
|
if (qt_widget_private(viewport)->paintOnScreen())
|
||||||
QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
|
QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest);
|
||||||
|
@ -694,7 +694,7 @@ void QGraphicsWidget::initStyleOption(QStyleOption *option) const
|
|||||||
option->state |= QStyle::State_Window;
|
option->state |= QStyle::State_Window;
|
||||||
/*
|
/*
|
||||||
###
|
###
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
extern bool qt_mac_can_clickThrough(const QGraphicsWidget *w); //qwidget_mac.cpp
|
extern bool qt_mac_can_clickThrough(const QGraphicsWidget *w); //qwidget_mac.cpp
|
||||||
if (!(option->state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
|
if (!(option->state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
|
||||||
option->state &= ~QStyle::State_Enabled;
|
option->state &= ~QStyle::State_Enabled;
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include <QtWidgets/qstyleoption.h>
|
#include <QtWidgets/qstyleoption.h>
|
||||||
#include <QtWidgets/QStyleOptionTitleBar>
|
#include <QtWidgets/QStyleOptionTitleBar>
|
||||||
#include <QtWidgets/QGraphicsSceneMouseEvent>
|
#include <QtWidgets/QGraphicsSceneMouseEvent>
|
||||||
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC) && !defined(QT_NO_STYLE_MAC)
|
||||||
# include <private/qmacstyle_mac_p.h>
|
# include <private/qmacstyle_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -682,7 +682,7 @@ void QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(QGraphicsSceneHoverEvent
|
|||||||
case Qt::TitleBarArea:
|
case Qt::TitleBarArea:
|
||||||
windowData->buttonRect = q->style()->subControlRect(
|
windowData->buttonRect = q->style()->subControlRect(
|
||||||
QStyle::CC_TitleBar, &bar, QStyle::SC_TitleBarCloseButton, 0);
|
QStyle::CC_TitleBar, &bar, QStyle::SC_TitleBarCloseButton, 0);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// On mac we should hover if we are in the 'area' of the buttons
|
// On mac we should hover if we are in the 'area' of the buttons
|
||||||
windowData->buttonRect |= q->style()->subControlRect(
|
windowData->buttonRect |= q->style()->subControlRect(
|
||||||
QStyle::CC_TitleBar, &bar, QStyle::SC_TitleBarMinButton, 0);
|
QStyle::CC_TitleBar, &bar, QStyle::SC_TitleBarMinButton, 0);
|
||||||
|
@ -2384,7 +2384,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
case Qt::Key_Return:
|
case Qt::Key_Return:
|
||||||
// Propagate the enter if you couldn't edit the item and there are no
|
// Propagate the enter if you couldn't edit the item and there are no
|
||||||
@ -2414,7 +2414,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
|
|||||||
selectAll();
|
selectAll();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (event->key() == Qt::Key_O && event->modifiers() & Qt::ControlModifier && currentIndex().isValid()) {
|
if (event->key() == Qt::Key_O && event->modifiers() & Qt::ControlModifier && currentIndex().isValid()) {
|
||||||
emit activated(currentIndex());
|
emit activated(currentIndex());
|
||||||
break;
|
break;
|
||||||
@ -3619,7 +3619,7 @@ QStyleOptionViewItem QAbstractItemView::viewOptions() const
|
|||||||
option.state &= ~QStyle::State_MouseOver;
|
option.state &= ~QStyle::State_MouseOver;
|
||||||
option.font = font();
|
option.font = font();
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// On mac the focus appearance follows window activation
|
// On mac the focus appearance follows window activation
|
||||||
// not widget activation
|
// not widget activation
|
||||||
if (!hasFocus())
|
if (!hasFocus())
|
||||||
|
@ -2392,7 +2392,7 @@ void QHeaderView::mouseMoveEvent(QMouseEvent *e)
|
|||||||
if (pos < 0 && d->state != QHeaderViewPrivate::SelectSections)
|
if (pos < 0 && d->state != QHeaderViewPrivate::SelectSections)
|
||||||
return;
|
return;
|
||||||
if (e->buttons() == Qt::NoButton) {
|
if (e->buttons() == Qt::NoButton) {
|
||||||
#if !defined(Q_WS_MAC)
|
#if !defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
// Under Cocoa, when the mouse button is released, may include an extra
|
// Under Cocoa, when the mouse button is released, may include an extra
|
||||||
// simulated mouse moved event. The state of the buttons when this event
|
// simulated mouse moved event. The state of the buttons when this event
|
||||||
// is generated is already "no button" and the code below gets executed
|
// is generated is already "no button" and the code below gets executed
|
||||||
|
@ -2199,7 +2199,7 @@ QModelIndex QTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
|
|||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
int vi = -1;
|
int vi = -1;
|
||||||
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC) && !defined(QT_NO_STYLE_MAC)
|
||||||
// Selection behavior is slightly different on the Mac.
|
// Selection behavior is slightly different on the Mac.
|
||||||
if (d->selectionMode == QAbstractItemView::ExtendedSelection
|
if (d->selectionMode == QAbstractItemView::ExtendedSelection
|
||||||
&& d->selectionModel
|
&& d->selectionModel
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
virtual bool shouldQuit() Q_DECL_OVERRIDE;
|
virtual bool shouldQuit() Q_DECL_OVERRIDE;
|
||||||
bool tryCloseAllWindows() Q_DECL_OVERRIDE;
|
bool tryCloseAllWindows() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
#ifndef QT_NO_SETTINGS
|
#ifndef QT_NO_SETTINGS
|
||||||
static bool x11_apply_settings();
|
static bool x11_apply_settings();
|
||||||
#endif
|
#endif
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
static bool isBlockedByModal(QWidget *widget);
|
static bool isBlockedByModal(QWidget *widget);
|
||||||
static bool modalState();
|
static bool modalState();
|
||||||
static bool tryModalHelper(QWidget *widget, QWidget **rettop = 0);
|
static bool tryModalHelper(QWidget *widget, QWidget **rettop = 0);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
static QWidget *tryModalHelper_sys(QWidget *top);
|
static QWidget *tryModalHelper_sys(QWidget *top);
|
||||||
bool canQuit();
|
bool canQuit();
|
||||||
#endif
|
#endif
|
||||||
@ -151,14 +151,14 @@ public:
|
|||||||
bool notify_helper(QObject *receiver, QEvent * e);
|
bool notify_helper(QObject *receiver, QEvent * e);
|
||||||
|
|
||||||
void construct(
|
void construct(
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
Display *dpy = 0, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0
|
Display *dpy = 0, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
void initialize();
|
void initialize();
|
||||||
void process_cmdline();
|
void process_cmdline();
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
static void x11_initialize_style();
|
static void x11_initialize_style();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ public:
|
|||||||
static void initializeWidgetFontHash();
|
static void initializeWidgetFontHash();
|
||||||
static void setSystemFont(const QFont &font);
|
static void setSystemFont(const QFont &font);
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
static void applyX11SpecificCommandLineArguments(QWidget *main_widget);
|
static void applyX11SpecificCommandLineArguments(QWidget *main_widget);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ public:
|
|||||||
static Qt::NavigationMode navigationMode;
|
static Qt::NavigationMode navigationMode;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_WS_MAC) || defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC) || defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
void _q_alertTimeOut();
|
void _q_alertTimeOut();
|
||||||
QHash<QWidget *, QTimer *> alertTimerHash;
|
QHash<QWidget *, QTimer *> alertTimerHash;
|
||||||
#endif
|
#endif
|
||||||
@ -266,12 +266,12 @@ public:
|
|||||||
QGestureManager *gestureManager;
|
QGestureManager *gestureManager;
|
||||||
QWidget *gestureWidget;
|
QWidget *gestureWidget;
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_WS_X11) || defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11) || defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
QPixmap *move_cursor;
|
QPixmap *move_cursor;
|
||||||
QPixmap *copy_cursor;
|
QPixmap *copy_cursor;
|
||||||
QPixmap *link_cursor;
|
QPixmap *link_cursor;
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
QPixmap *ignore_cursor;
|
QPixmap *ignore_cursor;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -301,9 +301,9 @@ private:
|
|||||||
static bool isAlien(QWidget *);
|
static bool isAlien(QWidget *);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
extern void qt_win_set_cursor(QWidget *, bool);
|
extern void qt_win_set_cursor(QWidget *, bool);
|
||||||
#elif defined(Q_WS_X11)
|
#elif defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
extern void qt_x11_enforce_cursor(QWidget *, bool);
|
extern void qt_x11_enforce_cursor(QWidget *, bool);
|
||||||
extern void qt_x11_enforce_cursor(QWidget *);
|
extern void qt_x11_enforce_cursor(QWidget *);
|
||||||
#else
|
#else
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
#include "qmacgesturerecognizer_p.h"
|
#include "qmacgesturerecognizer_p.h"
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_WS_WIN) && !defined(QT_NO_NATIVE_GESTURES)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) && !defined(QT_NO_NATIVE_GESTURES)
|
||||||
#include "qwinnativepangesturerecognizer_win_p.h"
|
#include "qwinnativepangesturerecognizer_win_p.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ QGestureManager::QGestureManager(QObject *parent)
|
|||||||
registerGestureRecognizer(new QSwipeGestureRecognizer);
|
registerGestureRecognizer(new QSwipeGestureRecognizer);
|
||||||
registerGestureRecognizer(new QTapGestureRecognizer);
|
registerGestureRecognizer(new QTapGestureRecognizer);
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
#if !defined(QT_NO_NATIVE_GESTURES)
|
#if !defined(QT_NO_NATIVE_GESTURES)
|
||||||
if (QApplicationPrivate::HasTouchSupport)
|
if (QApplicationPrivate::HasTouchSupport)
|
||||||
registerGestureRecognizer(new QWinNativePanGestureRecognizer);
|
registerGestureRecognizer(new QWinNativePanGestureRecognizer);
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include <qglobal.h>
|
#include <qglobal.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
# define _POSIX_
|
# define _POSIX_
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
# undef _POSIX_
|
# undef _POSIX_
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
** $QT_END_LICENSE$
|
** $QT_END_LICENSE$
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
# include <private/qcore_mac_p.h>
|
# include <private/qcore_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -51,7 +51,7 @@
|
|||||||
#include <private/qstylesheetstyle_p.h>
|
#include <private/qstylesheetstyle_p.h>
|
||||||
#ifndef QT_NO_TOOLTIP
|
#ifndef QT_NO_TOOLTIP
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
# include <private/qcore_mac_p.h>
|
# include <private/qcore_mac_p.h>
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
@ -279,7 +279,7 @@ void QTipLabel::timerEvent(QTimerEvent *e)
|
|||||||
|| e->timerId() == expireTimer.timerId()){
|
|| e->timerId() == expireTimer.timerId()){
|
||||||
hideTimer.stop();
|
hideTimer.stop();
|
||||||
expireTimer.stop();
|
expireTimer.stop();
|
||||||
#if defined(Q_WS_MAC) && !defined(QT_NO_EFFECTS)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC) && !defined(QT_NO_EFFECTS)
|
||||||
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)){
|
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)){
|
||||||
// Fade out tip on mac (makes it invisible).
|
// Fade out tip on mac (makes it invisible).
|
||||||
// The tip will not be deleted until a new tip is shown.
|
// The tip will not be deleted until a new tip is shown.
|
||||||
@ -299,7 +299,7 @@ void QTipLabel::timerEvent(QTimerEvent *e)
|
|||||||
bool QTipLabel::eventFilter(QObject *o, QEvent *e)
|
bool QTipLabel::eventFilter(QObject *o, QEvent *e)
|
||||||
{
|
{
|
||||||
switch (e->type()) {
|
switch (e->type()) {
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
case QEvent::KeyPress:
|
case QEvent::KeyPress:
|
||||||
case QEvent::KeyRelease: {
|
case QEvent::KeyRelease: {
|
||||||
int key = static_cast<QKeyEvent *>(e)->key();
|
int key = static_cast<QKeyEvent *>(e)->key();
|
||||||
@ -380,7 +380,7 @@ void QTipLabel::placeTip(const QPoint &pos, QWidget *w)
|
|||||||
#endif //QT_NO_STYLE_STYLESHEET
|
#endif //QT_NO_STYLE_STYLESHEET
|
||||||
|
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// When in full screen mode, there is no Dock nor Menu so we can use
|
// When in full screen mode, there is no Dock nor Menu so we can use
|
||||||
// the whole screen for displaying the tooltip. However when not in
|
// the whole screen for displaying the tooltip. However when not in
|
||||||
// full screen mode we need to save space for the dock, so we use
|
// full screen mode we need to save space for the dock, so we use
|
||||||
@ -397,7 +397,7 @@ void QTipLabel::placeTip(const QPoint &pos, QWidget *w)
|
|||||||
|
|
||||||
QPoint p = pos;
|
QPoint p = pos;
|
||||||
p += QPoint(2,
|
p += QPoint(2,
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
21
|
21
|
||||||
#else
|
#else
|
||||||
16
|
16
|
||||||
@ -486,7 +486,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!text.isEmpty()){ // no tip can be reused, create new tip:
|
if (!text.isEmpty()){ // no tip can be reused, create new tip:
|
||||||
#ifndef Q_WS_WIN
|
#ifndef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself
|
new QTipLabel(text, w, msecDisplayTime); // sets QTipLabel::instance to itself
|
||||||
#else
|
#else
|
||||||
// On windows, we can't use the widget as parent otherwise the window will be
|
// On windows, we can't use the widget as parent otherwise the window will be
|
||||||
@ -498,7 +498,7 @@ void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, cons
|
|||||||
QTipLabel::instance->setObjectName(QLatin1String("qtooltip_label"));
|
QTipLabel::instance->setObjectName(QLatin1String("qtooltip_label"));
|
||||||
|
|
||||||
|
|
||||||
#if !defined(QT_NO_EFFECTS) && !defined(Q_WS_MAC)
|
#if !defined(QT_NO_EFFECTS) && !defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip))
|
if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip))
|
||||||
qFadeEffect(QTipLabel::instance);
|
qFadeEffect(QTipLabel::instance);
|
||||||
else if (QApplication::isEffectEnabled(Qt::UI_AnimateTooltip))
|
else if (QApplication::isEffectEnabled(Qt::UI_AnimateTooltip))
|
||||||
|
@ -567,7 +567,7 @@ void QWhatsThisPrivate::say(QWidget * widget, const QString &text, int x, int y)
|
|||||||
// make a fresh widget, and set it up
|
// make a fresh widget, and set it up
|
||||||
QWhatsThat *whatsThat = new QWhatsThat(
|
QWhatsThat *whatsThat = new QWhatsThat(
|
||||||
text,
|
text,
|
||||||
#if defined(Q_WS_X11) && !defined(QT_NO_CURSOR)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11) && !defined(QT_NO_CURSOR)
|
||||||
QApplication::desktop()->screen(widget ? widget->x11Info().screen() : QCursor::x11Screen()),
|
QApplication::desktop()->screen(widget ? widget->x11Info().screen() : QCursor::x11Screen()),
|
||||||
#else
|
#else
|
||||||
0,
|
0,
|
||||||
@ -580,11 +580,11 @@ void QWhatsThisPrivate::say(QWidget * widget, const QString &text, int x, int y)
|
|||||||
|
|
||||||
int scr = (widget ?
|
int scr = (widget ?
|
||||||
QApplication::desktop()->screenNumber(widget) :
|
QApplication::desktop()->screenNumber(widget) :
|
||||||
#if defined(Q_WS_X11) && !defined(QT_NO_CURSOR)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11) && !defined(QT_NO_CURSOR)
|
||||||
QCursor::x11Screen()
|
QCursor::x11Screen()
|
||||||
#else
|
#else
|
||||||
QApplication::desktop()->screenNumber(QPoint(x,y))
|
QApplication::desktop()->screenNumber(QPoint(x,y))
|
||||||
#endif // Q_WS_X11
|
#endif // Q_DEAD_CODE_FROM_QT4_X11
|
||||||
);
|
);
|
||||||
QRect screen = QApplication::desktop()->screenGeometry(scr);
|
QRect screen = QApplication::desktop()->screenGeometry(scr);
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
# include "qaccessible.h"
|
# include "qaccessible.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
# include "qt_mac_p.h"
|
# include "qt_mac_p.h"
|
||||||
# include "qt_cocoa_helpers_mac_p.h"
|
# include "qt_cocoa_helpers_mac_p.h"
|
||||||
# include "qmainwindow.h"
|
# include "qmainwindow.h"
|
||||||
@ -76,7 +76,7 @@
|
|||||||
#include <private/qgraphicseffect_p.h>
|
#include <private/qgraphicseffect_p.h>
|
||||||
#include <qbackingstore.h>
|
#include <qbackingstore.h>
|
||||||
#include <private/qwidgetbackingstore_p.h>
|
#include <private/qwidgetbackingstore_p.h>
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
# include <private/qpaintengine_mac_p.h>
|
# include <private/qpaintengine_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
#include <private/qpaintengine_raster_p.h>
|
#include <private/qpaintengine_raster_p.h>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
static bool qt_enable_backingstore = true;
|
static bool qt_enable_backingstore = true;
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
// for compatibility with Qt 4.0
|
// for compatibility with Qt 4.0
|
||||||
Q_WIDGETS_EXPORT void qt_x11_set_global_double_buffer(bool enable)
|
Q_WIDGETS_EXPORT void qt_x11_set_global_double_buffer(bool enable)
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ Q_WIDGETS_EXPORT void qt_x11_set_global_double_buffer(bool enable)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
bool qt_mac_clearDirtyOnWidgetInsideDrawWidget = false;
|
bool qt_mac_clearDirtyOnWidgetInsideDrawWidget = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ static inline bool hasBackingStoreSupport()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
# define QT_NO_PAINT_DEBUG
|
# define QT_NO_PAINT_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -272,13 +272,13 @@ QWidgetPrivate::QWidgetPrivate(int version)
|
|||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
, noPaintOnScreen(0)
|
, noPaintOnScreen(0)
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
, picture(0)
|
, picture(0)
|
||||||
#elif defined(Q_WS_WIN)
|
#elif defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
#ifndef QT_NO_GESTURES
|
#ifndef QT_NO_GESTURES
|
||||||
, nativeGesturePanEnabled(0)
|
, nativeGesturePanEnabled(0)
|
||||||
#endif
|
#endif
|
||||||
#elif defined(Q_WS_MAC)
|
#elif defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
, needWindowChange(0)
|
, needWindowChange(0)
|
||||||
, window_event(0)
|
, window_event(0)
|
||||||
, qd_hd(0)
|
, qd_hd(0)
|
||||||
@ -294,7 +294,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
|
|||||||
|
|
||||||
isWidget = true;
|
isWidget = true;
|
||||||
memset(high_attributes, 0, sizeof(high_attributes));
|
memset(high_attributes, 0, sizeof(high_attributes));
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
drawRectOriginalAdded = false;
|
drawRectOriginalAdded = false;
|
||||||
originalDrawMethod = true;
|
originalDrawMethod = true;
|
||||||
changeMethods = false;
|
changeMethods = false;
|
||||||
@ -303,7 +303,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
|
|||||||
toolbar_ancestor = 0;
|
toolbar_ancestor = 0;
|
||||||
flushRequested = false;
|
flushRequested = false;
|
||||||
touchEventsEnabled = false;
|
touchEventsEnabled = false;
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#ifdef QWIDGET_EXTRA_DEBUG
|
#ifdef QWIDGET_EXTRA_DEBUG
|
||||||
static int count = 0;
|
static int count = 0;
|
||||||
qDebug() << "widgets" << ++count;
|
qDebug() << "widgets" << ++count;
|
||||||
@ -1063,7 +1063,7 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w)
|
|||||||
// Only enable this on non-Mac platforms. Since the old way of doing this would
|
// Only enable this on non-Mac platforms. Since the old way of doing this would
|
||||||
// interpret WindowSystemMenuHint as a close button and we can't change that behavior
|
// interpret WindowSystemMenuHint as a close button and we can't change that behavior
|
||||||
// we can't just add this in.
|
// we can't just add this in.
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if ((flags & (Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::WindowContextHelpButtonHint))
|
if ((flags & (Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::WindowContextHelpButtonHint))
|
||||||
# ifdef Q_OS_WIN
|
# ifdef Q_OS_WIN
|
||||||
&& type != Qt::Dialog // QTBUG-2027, allow for menu-less dialogs.
|
&& type != Qt::Dialog // QTBUG-2027, allow for menu-less dialogs.
|
||||||
@ -1126,7 +1126,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
if (desktopWidget) {
|
if (desktopWidget) {
|
||||||
// make sure the widget is created on the same screen as the
|
// make sure the widget is created on the same screen as the
|
||||||
// programmer specified desktop widget
|
// programmer specified desktop widget
|
||||||
@ -1160,7 +1160,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
|
|||||||
mustHaveWindowHandle = 1;
|
mustHaveWindowHandle = 1;
|
||||||
q->setAttribute(Qt::WA_NativeWindow);
|
q->setAttribute(Qt::WA_NativeWindow);
|
||||||
}
|
}
|
||||||
//#ifdef Q_WS_MAC
|
//#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// q->setAttribute(Qt::WA_NativeWindow);
|
// q->setAttribute(Qt::WA_NativeWindow);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
@ -1185,9 +1185,9 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
|
|||||||
setOpaque(q->isWindow() && background.style() != Qt::NoBrush && background.isOpaque());
|
setOpaque(q->isWindow() && background.style() != Qt::NoBrush && background.isOpaque());
|
||||||
}
|
}
|
||||||
data.fnt = QFont(data.fnt, q);
|
data.fnt = QFont(data.fnt, q);
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
data.fnt.x11SetScreen(xinfo.screen());
|
data.fnt.x11SetScreen(xinfo.screen());
|
||||||
#endif // Q_WS_X11
|
#endif // Q_DEAD_CODE_FROM_QT4_X11
|
||||||
|
|
||||||
q->setAttribute(Qt::WA_PendingMoveEvent);
|
q->setAttribute(Qt::WA_PendingMoveEvent);
|
||||||
q->setAttribute(Qt::WA_PendingResizeEvent);
|
q->setAttribute(Qt::WA_PendingResizeEvent);
|
||||||
@ -1204,7 +1204,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
|
|||||||
|
|
||||||
extraPaintEngine = 0;
|
extraPaintEngine = 0;
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// If we add a child to the unified toolbar, we have to redirect the painting.
|
// If we add a child to the unified toolbar, we have to redirect the painting.
|
||||||
if (parentWidget && parentWidget->d_func() && parentWidget->d_func()->isInUnifiedToolbar) {
|
if (parentWidget && parentWidget->d_func() && parentWidget->d_func()->isInUnifiedToolbar) {
|
||||||
if (parentWidget->d_func()->unifiedSurface) {
|
if (parentWidget->d_func()->unifiedSurface) {
|
||||||
@ -1212,7 +1212,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
|
|||||||
parentWidget->d_func()->unifiedSurface->recursiveRedirect(toolbar, toolbar, toolbar->d_func()->toolbar_offset);
|
parentWidget->d_func()->unifiedSurface->recursiveRedirect(toolbar, toolbar, toolbar->d_func()->toolbar_offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1295,14 +1295,14 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow)
|
|||||||
<< "Alien?" << !testAttribute(Qt::WA_NativeWindow);
|
<< "Alien?" << !testAttribute(Qt::WA_NativeWindow);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (Q_WS_WIN) && !defined(QT_NO_DRAGANDDROP)
|
#if defined (Q_DEAD_CODE_FROM_QT4_WIN) && !defined(QT_NO_DRAGANDDROP)
|
||||||
// Unregister the dropsite (if already registered) before we
|
// Unregister the dropsite (if already registered) before we
|
||||||
// re-create the widget with a native window.
|
// re-create the widget with a native window.
|
||||||
if (testAttribute(Qt::WA_WState_Created) && !internalWinId() && testAttribute(Qt::WA_NativeWindow)
|
if (testAttribute(Qt::WA_WState_Created) && !internalWinId() && testAttribute(Qt::WA_NativeWindow)
|
||||||
&& d->extra && d->extra->dropTarget) {
|
&& d->extra && d->extra->dropTarget) {
|
||||||
d->registerDropSite(false);
|
d->registerDropSite(false);
|
||||||
}
|
}
|
||||||
#endif // defined (Q_WS_WIN) && !defined(QT_NO_DRAGANDDROP)
|
#endif // defined (Q_DEAD_CODE_FROM_QT4_WIN) && !defined(QT_NO_DRAGANDDROP)
|
||||||
|
|
||||||
d->updateIsOpaque();
|
d->updateIsOpaque();
|
||||||
|
|
||||||
@ -1583,7 +1583,7 @@ QWidget::~QWidget()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_WS_WIN) || defined(Q_WS_X11)|| defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) || defined(Q_DEAD_CODE_FROM_QT4_X11)|| defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
else if (!internalWinId() && isVisible()) {
|
else if (!internalWinId() && isVisible()) {
|
||||||
qApp->d_func()->sendSyntheticEnterLeave(this);
|
qApp->d_func()->sendSyntheticEnterLeave(this);
|
||||||
}
|
}
|
||||||
@ -1627,7 +1627,7 @@ QWidget::~QWidget()
|
|||||||
|
|
||||||
d->blockSig = blocked;
|
d->blockSig = blocked;
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// QCocoaView holds a pointer back to this widget. Clear it now
|
// QCocoaView holds a pointer back to this widget. Clear it now
|
||||||
// to make sure it's not followed later on. The lifetime of the
|
// to make sure it's not followed later on. The lifetime of the
|
||||||
// QCocoaView might exceed the lifetime of this widget in cases
|
// QCocoaView might exceed the lifetime of this widget in cases
|
||||||
@ -1678,7 +1678,7 @@ void QWidgetPrivate::setWinId(WId id) // set widget identifier
|
|||||||
const WId oldWinId = data.winid;
|
const WId oldWinId = data.winid;
|
||||||
|
|
||||||
data.winid = id;
|
data.winid = id;
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
hd = id; // X11: hd == ident
|
hd = id; // X11: hd == ident
|
||||||
#endif
|
#endif
|
||||||
if (mapper && id && !userDesktopWidget) {
|
if (mapper && id && !userDesktopWidget) {
|
||||||
@ -1714,9 +1714,9 @@ void QWidgetPrivate::createTLExtra()
|
|||||||
x->window = 0;
|
x->window = 0;
|
||||||
x->shareContext = 0;
|
x->shareContext = 0;
|
||||||
x->screenIndex = 0;
|
x->screenIndex = 0;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
x->wasMaximized = false;
|
x->wasMaximized = false;
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#ifdef QWIDGET_EXTRA_DEBUG
|
#ifdef QWIDGET_EXTRA_DEBUG
|
||||||
static int count = 0;
|
static int count = 0;
|
||||||
qDebug() << "tlextra" << ++count;
|
qDebug() << "tlextra" << ++count;
|
||||||
@ -2114,10 +2114,10 @@ void QWidgetPrivate::subtractOpaqueSiblings(QRegion &sourceRegion, bool *hasDirt
|
|||||||
if (disableSubtractOpaqueSiblings || q->isWindow())
|
if (disableSubtractOpaqueSiblings || q->isWindow())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (q->d_func()->isInUnifiedToolbar)
|
if (q->d_func()->isInUnifiedToolbar)
|
||||||
return;
|
return;
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
QRect clipBoundingRect;
|
QRect clipBoundingRect;
|
||||||
bool dirtyClipBoundingRect = true;
|
bool dirtyClipBoundingRect = true;
|
||||||
@ -2251,7 +2251,7 @@ void QWidgetPrivate::updateIsOpaque()
|
|||||||
#endif //QT_NO_GRAPHICSEFFECT
|
#endif //QT_NO_GRAPHICSEFFECT
|
||||||
|
|
||||||
Q_Q(QWidget);
|
Q_Q(QWidget);
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
if (q->testAttribute(Qt::WA_X11OpenGLOverlay)) {
|
if (q->testAttribute(Qt::WA_X11OpenGLOverlay)) {
|
||||||
setOpaque(false);
|
setOpaque(false);
|
||||||
return;
|
return;
|
||||||
@ -2310,7 +2310,7 @@ static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrus
|
|||||||
Q_ASSERT(painter);
|
Q_ASSERT(painter);
|
||||||
|
|
||||||
if (brush.style() == Qt::TexturePattern) {
|
if (brush.style() == Qt::TexturePattern) {
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// Optimize pattern filling on mac by using HITheme directly
|
// Optimize pattern filling on mac by using HITheme directly
|
||||||
// when filling with the standard widget background.
|
// when filling with the standard widget background.
|
||||||
// Defined in qmacstyle_mac.cpp
|
// Defined in qmacstyle_mac.cpp
|
||||||
@ -2322,7 +2322,7 @@ static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrus
|
|||||||
painter->setClipRegion(rgn);
|
painter->setClipRegion(rgn);
|
||||||
painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft());
|
painter->drawTiledPixmap(rect, brush.texture(), rect.topLeft());
|
||||||
}
|
}
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
} else if (brush.gradient()
|
} else if (brush.gradient()
|
||||||
&& brush.gradient()->coordinateMode() == QGradient::ObjectBoundingMode) {
|
&& brush.gradient()->coordinateMode() == QGradient::ObjectBoundingMode) {
|
||||||
@ -2394,7 +2394,7 @@ void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, int
|
|||||||
visible widgets.
|
visible widgets.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
extern QPointer<QWidget> qt_button_down;
|
extern QPointer<QWidget> qt_button_down;
|
||||||
#else
|
#else
|
||||||
extern QWidget *qt_button_down;
|
extern QWidget *qt_button_down;
|
||||||
@ -2681,7 +2681,7 @@ void QWidget::setStyle(QStyle *style)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
|
void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
metalHack
|
metalHack
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@ -2692,7 +2692,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
|
|||||||
QPointer<QStyle> origStyle;
|
QPointer<QStyle> origStyle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// the metalhack boolean allows Qt/Mac to do a proper re-polish depending
|
// the metalhack boolean allows Qt/Mac to do a proper re-polish depending
|
||||||
// on how the Qt::WA_MacBrushedMetal attribute is set. It is only ever
|
// on how the Qt::WA_MacBrushedMetal attribute is set. It is only ever
|
||||||
// set when changing that attribute and passes the widget's CURRENT style.
|
// set when changing that attribute and passes the widget's CURRENT style.
|
||||||
@ -2712,12 +2712,12 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
|
|||||||
if (q->windowType() != Qt::Desktop) {
|
if (q->windowType() != Qt::Desktop) {
|
||||||
if (polished) {
|
if (polished) {
|
||||||
oldStyle->unpolish(q);
|
oldStyle->unpolish(q);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (metalHack)
|
if (metalHack)
|
||||||
macUpdateMetalAttribute();
|
macUpdateMetalAttribute();
|
||||||
#endif
|
#endif
|
||||||
q->style()->polish(q);
|
q->style()->polish(q);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
} else if (metalHack) {
|
} else if (metalHack) {
|
||||||
macUpdateMetalAttribute();
|
macUpdateMetalAttribute();
|
||||||
#endif
|
#endif
|
||||||
@ -3082,7 +3082,7 @@ bool QWidget::isFullScreen() const
|
|||||||
*/
|
*/
|
||||||
void QWidget::showFullScreen()
|
void QWidget::showFullScreen()
|
||||||
{
|
{
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// If the unified toolbar is enabled, we have to disable it before going fullscreen.
|
// If the unified toolbar is enabled, we have to disable it before going fullscreen.
|
||||||
QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
|
QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
|
||||||
if (mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()) {
|
if (mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()) {
|
||||||
@ -3090,7 +3090,7 @@ void QWidget::showFullScreen()
|
|||||||
QMainWindowLayout *mainLayout = qobject_cast<QMainWindowLayout*>(mainWindow->layout());
|
QMainWindowLayout *mainLayout = qobject_cast<QMainWindowLayout*>(mainWindow->layout());
|
||||||
mainLayout->activateUnifiedToolbarAfterFullScreen = true;
|
mainLayout->activateUnifiedToolbarAfterFullScreen = true;
|
||||||
}
|
}
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
ensurePolished();
|
ensurePolished();
|
||||||
|
|
||||||
setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowMaximized))
|
setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowMaximized))
|
||||||
@ -3118,7 +3118,7 @@ void QWidget::showMaximized()
|
|||||||
|
|
||||||
setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen))
|
setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen))
|
||||||
| Qt::WindowMaximized);
|
| Qt::WindowMaximized);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// If the unified toolbar was enabled before going fullscreen, we have to enable it back.
|
// If the unified toolbar was enabled before going fullscreen, we have to enable it back.
|
||||||
QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
|
QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
|
||||||
if (mainWindow)
|
if (mainWindow)
|
||||||
@ -3129,7 +3129,7 @@ void QWidget::showMaximized()
|
|||||||
mainLayout->activateUnifiedToolbarAfterFullScreen = false;
|
mainLayout->activateUnifiedToolbarAfterFullScreen = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3147,7 +3147,7 @@ void QWidget::showNormal()
|
|||||||
setWindowState(windowState() & ~(Qt::WindowMinimized
|
setWindowState(windowState() & ~(Qt::WindowMinimized
|
||||||
| Qt::WindowMaximized
|
| Qt::WindowMaximized
|
||||||
| Qt::WindowFullScreen));
|
| Qt::WindowFullScreen));
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// If the unified toolbar was enabled before going fullscreen, we have to enable it back.
|
// If the unified toolbar was enabled before going fullscreen, we have to enable it back.
|
||||||
QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
|
QMainWindow *mainWindow = qobject_cast<QMainWindow*>(this);
|
||||||
if (mainWindow)
|
if (mainWindow)
|
||||||
@ -3158,7 +3158,7 @@ void QWidget::showNormal()
|
|||||||
mainLayout->activateUnifiedToolbarAfterFullScreen = false;
|
mainLayout->activateUnifiedToolbarAfterFullScreen = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3366,7 +3366,7 @@ void QWidgetPrivate::setEnabled_helper(bool enable)
|
|||||||
if (w && !w->testAttribute(attribute))
|
if (w && !w->testAttribute(attribute))
|
||||||
w->d_func()->setEnabled_helper(enable);
|
w->d_func()->setEnabled_helper(enable);
|
||||||
}
|
}
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
if (q->testAttribute(Qt::WA_SetCursor) || q->isWindow()) {
|
if (q->testAttribute(Qt::WA_SetCursor) || q->isWindow()) {
|
||||||
// enforce the windows behavior of clearing the cursor on
|
// enforce the windows behavior of clearing the cursor on
|
||||||
// disabled widgets
|
// disabled widgets
|
||||||
@ -3380,7 +3380,7 @@ void QWidgetPrivate::setEnabled_helper(bool enable)
|
|||||||
qt_qpa_set_cursor(q, false);
|
qt_qpa_set_cursor(q, false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
setEnabled_helper_sys(enable);
|
setEnabled_helper_sys(enable);
|
||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_IM
|
#ifndef QT_NO_IM
|
||||||
@ -4484,7 +4484,7 @@ const QPalette &QWidget::palette() const
|
|||||||
) {
|
) {
|
||||||
data->pal.setCurrentColorGroup(QPalette::Active);
|
data->pal.setCurrentColorGroup(QPalette::Active);
|
||||||
} else {
|
} else {
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
extern bool qt_mac_can_clickThrough(const QWidget *); //qwidget_mac.cpp
|
extern bool qt_mac_can_clickThrough(const QWidget *); //qwidget_mac.cpp
|
||||||
if (qt_mac_can_clickThrough(this))
|
if (qt_mac_can_clickThrough(this))
|
||||||
data->pal.setCurrentColorGroup(QPalette::Active);
|
data->pal.setCurrentColorGroup(QPalette::Active);
|
||||||
@ -4728,7 +4728,7 @@ void QWidgetPrivate::updateFont(const QFont &font)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
data.fnt = QFont(font, q);
|
data.fnt = QFont(font, q);
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
// make sure the font set on this widget is associated with the correct screen
|
// make sure the font set on this widget is associated with the correct screen
|
||||||
data.fnt.x11SetScreen(xinfo.screen());
|
data.fnt.x11SetScreen(xinfo.screen());
|
||||||
#endif
|
#endif
|
||||||
@ -4901,7 +4901,7 @@ void QWidget::setCursor(const QCursor &cursor)
|
|||||||
{
|
{
|
||||||
Q_D(QWidget);
|
Q_D(QWidget);
|
||||||
// On Mac we must set the cursor even if it is the ArrowCursor.
|
// On Mac we must set the cursor even if it is the ArrowCursor.
|
||||||
#if !defined(Q_WS_MAC)
|
#if !defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (cursor.shape() != Qt::ArrowCursor
|
if (cursor.shape() != Qt::ArrowCursor
|
||||||
|| (d->extra && d->extra->curs))
|
|| (d->extra && d->extra->curs))
|
||||||
#endif
|
#endif
|
||||||
@ -5326,7 +5326,7 @@ void QWidgetPrivate::render_helper(QPainter *painter, const QPoint &targetOffset
|
|||||||
Q_ASSERT(!toBePainted.isEmpty());
|
Q_ASSERT(!toBePainted.isEmpty());
|
||||||
|
|
||||||
Q_Q(QWidget);
|
Q_Q(QWidget);
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
const QTransform originalTransform = painter->worldTransform();
|
const QTransform originalTransform = painter->worldTransform();
|
||||||
const bool useDeviceCoordinates = originalTransform.isScaling();
|
const bool useDeviceCoordinates = originalTransform.isScaling();
|
||||||
if (!useDeviceCoordinates) {
|
if (!useDeviceCoordinates) {
|
||||||
@ -5350,7 +5350,7 @@ void QWidgetPrivate::render_helper(QPainter *painter, const QPoint &targetOffset
|
|||||||
if (restore)
|
if (restore)
|
||||||
painter->setRenderHints(QPainter::SmoothPixmapTransform, false);
|
painter->setRenderHints(QPainter::SmoothPixmapTransform, false);
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
} else {
|
} else {
|
||||||
// Render via a pixmap in device coordinates (to avoid pixmap scaling).
|
// Render via a pixmap in device coordinates (to avoid pixmap scaling).
|
||||||
QTransform transform = originalTransform;
|
QTransform transform = originalTransform;
|
||||||
@ -5459,7 +5459,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
|
|||||||
if (paintEngine) {
|
if (paintEngine) {
|
||||||
setRedirected(pdev, -offset);
|
setRedirected(pdev, -offset);
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// (Alien support) Special case for Mac when redirecting: If the paint device
|
// (Alien support) Special case for Mac when redirecting: If the paint device
|
||||||
// is of the Widget type we need to set WA_WState_InPaintEvent since painting
|
// is of the Widget type we need to set WA_WState_InPaintEvent since painting
|
||||||
// outside the paint event is not supported on QWidgets. The attributeis
|
// outside the paint event is not supported on QWidgets. The attributeis
|
||||||
@ -5541,7 +5541,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
|
|||||||
|
|
||||||
//restore
|
//restore
|
||||||
if (paintEngine) {
|
if (paintEngine) {
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (pdev->devType() == QInternal::Widget)
|
if (pdev->devType() == QInternal::Widget)
|
||||||
static_cast<QWidget *>(pdev)->setAttribute(Qt::WA_WState_InPaintEvent, false);
|
static_cast<QWidget *>(pdev)->setAttribute(Qt::WA_WState_InPaintEvent, false);
|
||||||
#endif
|
#endif
|
||||||
@ -5615,7 +5615,7 @@ void QWidgetPrivate::render(QPaintDevice *target, const QPoint &targetOffset,
|
|||||||
if (paintRegion.isEmpty())
|
if (paintRegion.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QPainter *oldSharedPainter = inRenderWithPainter ? sharedPainter() : 0;
|
QPainter *oldSharedPainter = inRenderWithPainter ? sharedPainter() : 0;
|
||||||
|
|
||||||
// Use the target's shared painter if set (typically set when doing
|
// Use the target's shared painter if set (typically set when doing
|
||||||
@ -6234,7 +6234,7 @@ QString QWidget::windowRole() const
|
|||||||
*/
|
*/
|
||||||
void QWidget::setWindowRole(const QString &role)
|
void QWidget::setWindowRole(const QString &role)
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
Q_D(QWidget);
|
Q_D(QWidget);
|
||||||
d->topData()->role = role;
|
d->topData()->role = role;
|
||||||
d->setWindowRole();
|
d->setWindowRole();
|
||||||
@ -6376,7 +6376,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
|
|||||||
f = f->d_func()->extra->focus_proxy;
|
f = f->d_func()->extra->focus_proxy;
|
||||||
|
|
||||||
if (QApplication::focusWidget() == f
|
if (QApplication::focusWidget() == f
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
&& GetFocus() == f->internalWinId()
|
&& GetFocus() == f->internalWinId()
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@ -6561,7 +6561,7 @@ void QWidget::clearFocus()
|
|||||||
if (hasFocus()) {
|
if (hasFocus()) {
|
||||||
// Update proxy state
|
// Update proxy state
|
||||||
QApplicationPrivate::setFocusWidget(0, Qt::OtherFocusReason);
|
QApplicationPrivate::setFocusWidget(0, Qt::OtherFocusReason);
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
if (!(windowType() == Qt::Popup) && GetFocus() == internalWinId())
|
if (!(windowType() == Qt::Popup) && GetFocus() == internalWinId())
|
||||||
SetFocus(0);
|
SetFocus(0);
|
||||||
else
|
else
|
||||||
@ -7191,7 +7191,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
|
|||||||
*/
|
*/
|
||||||
QByteArray QWidget::saveGeometry() const
|
QByteArray QWidget::saveGeometry() const
|
||||||
{
|
{
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// We check if the window was maximized during this invocation. If so, we need to record the
|
// We check if the window was maximized during this invocation. If so, we need to record the
|
||||||
// starting position as 0,0.
|
// starting position as 0,0.
|
||||||
Q_D(const QWidget);
|
Q_D(const QWidget);
|
||||||
@ -7202,7 +7202,7 @@ QByteArray QWidget::saveGeometry() const
|
|||||||
newFramePosition.moveTo(0, 0);
|
newFramePosition.moveTo(0, 0);
|
||||||
newNormalPosition.moveTo(0, 0);
|
newNormalPosition.moveTo(0, 0);
|
||||||
}
|
}
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QByteArray array;
|
QByteArray array;
|
||||||
QDataStream stream(&array, QIODevice::WriteOnly);
|
QDataStream stream(&array, QIODevice::WriteOnly);
|
||||||
stream.setVersion(QDataStream::Qt_4_0);
|
stream.setVersion(QDataStream::Qt_4_0);
|
||||||
@ -7216,13 +7216,13 @@ QByteArray QWidget::saveGeometry() const
|
|||||||
stream << magicNumber
|
stream << magicNumber
|
||||||
<< majorVersion
|
<< majorVersion
|
||||||
<< minorVersion
|
<< minorVersion
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
<< newFramePosition
|
<< newFramePosition
|
||||||
<< newNormalPosition
|
<< newNormalPosition
|
||||||
#else
|
#else
|
||||||
<< frameGeometry()
|
<< frameGeometry()
|
||||||
<< normalGeometry()
|
<< normalGeometry()
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
<< qint32(screenNumber)
|
<< qint32(screenNumber)
|
||||||
<< quint8(windowState() & Qt::WindowMaximized)
|
<< quint8(windowState() & Qt::WindowMaximized)
|
||||||
<< quint8(windowState() & Qt::WindowFullScreen)
|
<< quint8(windowState() & Qt::WindowFullScreen)
|
||||||
@ -7331,7 +7331,7 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
|
|||||||
// - The title bar is outside the available geometry.
|
// - The title bar is outside the available geometry.
|
||||||
// - (Mac only) The window is higher than the available geometry. It must
|
// - (Mac only) The window is higher than the available geometry. It must
|
||||||
// be possible to bring the size grip on screen by moving the window.
|
// be possible to bring the size grip on screen by moving the window.
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
restoredFrameGeometry.setHeight(qMin(restoredFrameGeometry.height(), availableGeometry.height()));
|
restoredFrameGeometry.setHeight(qMin(restoredFrameGeometry.height(), availableGeometry.height()));
|
||||||
restoredNormalGeometry.setHeight(qMin(restoredNormalGeometry.height(), availableGeometry.height() - frameHeight));
|
restoredNormalGeometry.setHeight(qMin(restoredNormalGeometry.height(), availableGeometry.height() - frameHeight));
|
||||||
#endif
|
#endif
|
||||||
@ -7380,7 +7380,7 @@ bool QWidget::restoreGeometry(const QByteArray &geometry)
|
|||||||
d_func()->topData()->normalGeometry = restoredNormalGeometry;
|
d_func()->topData()->normalGeometry = restoredNormalGeometry;
|
||||||
} else {
|
} else {
|
||||||
QPoint offset;
|
QPoint offset;
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
if (isFullScreen())
|
if (isFullScreen())
|
||||||
offset = d_func()->topData()->fullScreenOffset;
|
offset = d_func()->topData()->fullScreenOffset;
|
||||||
#endif
|
#endif
|
||||||
@ -7773,7 +7773,7 @@ void QWidgetPrivate::show_helper()
|
|||||||
// On Windows, show the popup now so that our own focus handling
|
// On Windows, show the popup now so that our own focus handling
|
||||||
// stores the correct old focus widget even if it's stolen in the
|
// stores the correct old focus widget even if it's stolen in the
|
||||||
// showevent
|
// showevent
|
||||||
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) || defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (!isEmbedded && q->windowType() == Qt::Popup)
|
if (!isEmbedded && q->windowType() == Qt::Popup)
|
||||||
qApp->d_func()->openPopup(q);
|
qApp->d_func()->openPopup(q);
|
||||||
#endif
|
#endif
|
||||||
@ -7896,7 +7896,7 @@ void QWidgetPrivate::hide_helper()
|
|||||||
if (!isEmbedded && (q->windowType() == Qt::Popup))
|
if (!isEmbedded && (q->windowType() == Qt::Popup))
|
||||||
qApp->d_func()->closePopup(q);
|
qApp->d_func()->closePopup(q);
|
||||||
|
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
if (q->isWindow() && !(q->windowType() == Qt::Popup) && q->parentWidget()
|
if (q->isWindow() && !(q->windowType() == Qt::Popup) && q->parentWidget()
|
||||||
&& !q->parentWidget()->isHidden() && q->isActiveWindow())
|
&& !q->parentWidget()->isHidden() && q->isActiveWindow())
|
||||||
q->parentWidget()->activateWindow(); // Activate parent
|
q->parentWidget()->activateWindow(); // Activate parent
|
||||||
@ -8091,7 +8091,7 @@ void QWidget::setVisible(bool visible)
|
|||||||
} else { // hide
|
} else { // hide
|
||||||
if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden))
|
if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden))
|
||||||
return;
|
return;
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
// reset WS_DISABLED style in a Blocked window
|
// reset WS_DISABLED style in a Blocked window
|
||||||
if(isWindow() && testAttribute(Qt::WA_WState_Created)
|
if(isWindow() && testAttribute(Qt::WA_WState_Created)
|
||||||
&& QApplicationPrivate::isBlockedByModal(this))
|
&& QApplicationPrivate::isBlockedByModal(this))
|
||||||
@ -8176,7 +8176,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous)
|
|||||||
QWidget *widget = qobject_cast<QWidget*>(childList.at(i));
|
QWidget *widget = qobject_cast<QWidget*>(childList.at(i));
|
||||||
if (!widget || widget->isWindow() || widget->testAttribute(Qt::WA_WState_Hidden))
|
if (!widget || widget->isWindow() || widget->testAttribute(Qt::WA_WState_Hidden))
|
||||||
continue;
|
continue;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// Before doing anything we need to make sure that we don't leave anything in a non-consistent state.
|
// Before doing anything we need to make sure that we don't leave anything in a non-consistent state.
|
||||||
// When hiding a widget we need to make sure that no mouse_down events are active, because
|
// When hiding a widget we need to make sure that no mouse_down events are active, because
|
||||||
// the mouse_up event will never be received by a hidden widget or one of its descendants.
|
// the mouse_up event will never be received by a hidden widget or one of its descendants.
|
||||||
@ -8192,7 +8192,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous)
|
|||||||
// supposed to trigger because it is not visible.
|
// supposed to trigger because it is not visible.
|
||||||
if(widget == qt_button_down)
|
if(widget == qt_button_down)
|
||||||
qt_button_down = 0;
|
qt_button_down = 0;
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (spontaneous)
|
if (spontaneous)
|
||||||
widget->setAttribute(Qt::WA_Mapped, false);
|
widget->setAttribute(Qt::WA_Mapped, false);
|
||||||
else
|
else
|
||||||
@ -8427,7 +8427,7 @@ QSize QWidgetPrivate::adjustedSize() const
|
|||||||
s.setWidth(qMax(s.width(), 200));
|
s.setWidth(qMax(s.width(), 200));
|
||||||
if (exp & Qt::Vertical)
|
if (exp & Qt::Vertical)
|
||||||
s.setHeight(qMax(s.height(), 100));
|
s.setHeight(qMax(s.height(), 100));
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
QRect screen = QApplication::desktop()->screenGeometry(q->x11Info().screen());
|
QRect screen = QApplication::desktop()->screenGeometry(q->x11Info().screen());
|
||||||
#else // all others
|
#else // all others
|
||||||
QRect screen = QApplication::desktop()->screenGeometry(q->pos());
|
QRect screen = QApplication::desktop()->screenGeometry(q->pos());
|
||||||
@ -8560,7 +8560,7 @@ bool QWidget::isAncestorOf(const QWidget *child) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
inline void setDisabledStyle(QWidget *w, bool setStyle)
|
inline void setDisabledStyle(QWidget *w, bool setStyle)
|
||||||
{
|
{
|
||||||
// set/reset WS_DISABLED style.
|
// set/reset WS_DISABLED style.
|
||||||
@ -8982,7 +8982,7 @@ bool QWidget::event(QEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
setDisabledStyle(this, (event->type() == QEvent::WindowBlocked));
|
setDisabledStyle(this, (event->type() == QEvent::WindowBlocked));
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -9009,7 +9009,7 @@ bool QWidget::event(QEvent *event)
|
|||||||
case QEvent::EmbeddingControl:
|
case QEvent::EmbeddingControl:
|
||||||
d->topData()->frameStrut.setCoords(0 ,0, 0, 0);
|
d->topData()->frameStrut.setCoords(0 ,0, 0, 0);
|
||||||
data->fstrut_dirty = false;
|
data->fstrut_dirty = false;
|
||||||
#if defined(Q_WS_WIN) || defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) || defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
d->topData()->embedded = 1;
|
d->topData()->embedded = 1;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -9034,7 +9034,7 @@ bool QWidget::event(QEvent *event)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
case QEvent::MacGLWindowChange:
|
case QEvent::MacGLWindowChange:
|
||||||
d->needWindowChange = false;
|
d->needWindowChange = false;
|
||||||
break;
|
break;
|
||||||
@ -9145,7 +9145,7 @@ void QWidget::changeEvent(QEvent * event)
|
|||||||
case QEvent::MacSizeChange:
|
case QEvent::MacSizeChange:
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
break;
|
break;
|
||||||
#elif defined Q_WS_MAC
|
#elif defined Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
case QEvent::ToolTipChange:
|
case QEvent::ToolTipChange:
|
||||||
case QEvent::MouseTrackingChange:
|
case QEvent::MouseTrackingChange:
|
||||||
qt_mac_update_mouseTracking(this);
|
qt_mac_update_mouseTracking(this);
|
||||||
@ -10415,7 +10415,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
|
|||||||
// (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all
|
// (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all
|
||||||
// platforms).
|
// platforms).
|
||||||
if (newParent
|
if (newParent
|
||||||
#if defined(Q_WS_WIN) || defined(QT_OPENGL_ES)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) || defined(QT_OPENGL_ES)
|
||||||
|| (f & Qt::MSWindowsOwnDC)
|
|| (f & Qt::MSWindowsOwnDC)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
@ -10435,7 +10435,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//### already hidden above ---> must probably do something smart on the mac
|
//### already hidden above ---> must probably do something smart on the mac
|
||||||
// #ifdef Q_WS_MAC
|
// #ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// extern bool qt_mac_is_macdrawer(const QWidget *); //qwidget_mac.cpp
|
// extern bool qt_mac_is_macdrawer(const QWidget *); //qwidget_mac.cpp
|
||||||
// if(!qt_mac_is_macdrawer(q)) //special case
|
// if(!qt_mac_is_macdrawer(q)) //special case
|
||||||
// q->setAttribute(Qt::WA_WState_Hidden);
|
// q->setAttribute(Qt::WA_WState_Hidden);
|
||||||
@ -10967,7 +10967,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
d->receiveChildEvents = !on;
|
d->receiveChildEvents = !on;
|
||||||
break;
|
break;
|
||||||
case Qt::WA_MacBrushedMetal:
|
case Qt::WA_MacBrushedMetal:
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
d->setStyle_helper(style(), false, true); // Make sure things get unpolished/polished correctly.
|
d->setStyle_helper(style(), false, true); // Make sure things get unpolished/polished correctly.
|
||||||
// fall through since changing the metal attribute affects the opaque size grip.
|
// fall through since changing the metal attribute affects the opaque size grip.
|
||||||
case Qt::WA_MacOpaqueSizeGrip:
|
case Qt::WA_MacOpaqueSizeGrip:
|
||||||
@ -10984,7 +10984,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case Qt::WA_MacAlwaysShowToolWindow:
|
case Qt::WA_MacAlwaysShowToolWindow:
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
d->macUpdateHideOnSuspend();
|
d->macUpdateHideOnSuspend();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -11061,7 +11061,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
}
|
}
|
||||||
case Qt::WA_PaintOnScreen:
|
case Qt::WA_PaintOnScreen:
|
||||||
d->updateIsOpaque();
|
d->updateIsOpaque();
|
||||||
#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) || defined(Q_DEAD_CODE_FROM_QT4_X11) || defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
// Recreate the widget if it's already created as an alien widget and
|
// Recreate the widget if it's already created as an alien widget and
|
||||||
// WA_PaintOnScreen is enabled. Paint on screen widgets must have win id.
|
// WA_PaintOnScreen is enabled. Paint on screen widgets must have win id.
|
||||||
// So must their children.
|
// So must their children.
|
||||||
@ -11081,7 +11081,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
d->updateSystemBackground();
|
d->updateSystemBackground();
|
||||||
break;
|
break;
|
||||||
case Qt::WA_TransparentForMouseEvents:
|
case Qt::WA_TransparentForMouseEvents:
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
d->macUpdateIgnoreMouseEvents();
|
d->macUpdateIgnoreMouseEvents();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -11100,7 +11100,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
d->resolveFont();
|
d->resolveFont();
|
||||||
d->resolveLocale();
|
d->resolveLocale();
|
||||||
break;
|
break;
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
case Qt::WA_NoX11EventCompression:
|
case Qt::WA_NoX11EventCompression:
|
||||||
if (!d->extra)
|
if (!d->extra)
|
||||||
d->createExtra();
|
d->createExtra();
|
||||||
@ -11125,7 +11125,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
case Qt::WA_X11NetWmWindowTypeDesktop:
|
case Qt::WA_X11NetWmWindowTypeDesktop:
|
||||||
case Qt::WA_X11NetWmWindowTypeDock:
|
case Qt::WA_X11NetWmWindowTypeDock:
|
||||||
case Qt::WA_X11NetWmWindowTypeToolBar:
|
case Qt::WA_X11NetWmWindowTypeToolBar:
|
||||||
@ -11160,7 +11160,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case Qt::WA_AcceptTouchEvents:
|
case Qt::WA_AcceptTouchEvents:
|
||||||
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) || defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (on)
|
if (on)
|
||||||
d->registerTouchWindow();
|
d->registerTouchWindow();
|
||||||
#endif
|
#endif
|
||||||
@ -11781,7 +11781,7 @@ QRect QWidgetPrivate::frameStrut() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (data.fstrut_dirty
|
if (data.fstrut_dirty
|
||||||
#ifndef Q_WS_WIN
|
#ifndef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
// ### Fix properly for 4.3
|
// ### Fix properly for 4.3
|
||||||
&& q->isVisible()
|
&& q->isVisible()
|
||||||
#endif
|
#endif
|
||||||
@ -12689,7 +12689,7 @@ void QWidget::setMask(const QRegion &newMask)
|
|||||||
d->extra->mask = newMask;
|
d->extra->mask = newMask;
|
||||||
d->extra->hasMask = !newMask.isEmpty();
|
d->extra->hasMask = !newMask.isEmpty();
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (!testAttribute(Qt::WA_WState_Created))
|
if (!testAttribute(Qt::WA_WState_Created))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
@ -555,12 +555,12 @@ public:
|
|||||||
inline QWidget *childAt(int x, int y) const;
|
inline QWidget *childAt(int x, int y) const;
|
||||||
QWidget *childAt(const QPoint &p) const;
|
QWidget *childAt(const QPoint &p) const;
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
const QX11Info &x11Info() const;
|
const QX11Info &x11Info() const;
|
||||||
Qt::HANDLE x11PictureHandle() const;
|
Qt::HANDLE x11PictureHandle() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
Qt::HANDLE macQDHandle() const;
|
Qt::HANDLE macQDHandle() const;
|
||||||
Qt::HANDLE macCGHandle() const;
|
Qt::HANDLE macCGHandle() const;
|
||||||
#endif
|
#endif
|
||||||
|
@ -177,7 +177,7 @@ struct QTLWExtra {
|
|||||||
uint embedded : 1;
|
uint embedded : 1;
|
||||||
|
|
||||||
// *************************** Platform specific values (bit fields first) **********
|
// *************************** Platform specific values (bit fields first) **********
|
||||||
#if defined(Q_WS_X11) // <----------------------------------------------------------- X11
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11) // <----------------------------------------------------------- X11
|
||||||
uint spont_unmapped: 1; // window was spontaneously unmapped
|
uint spont_unmapped: 1; // window was spontaneously unmapped
|
||||||
uint dnd : 1; // DND properties installed
|
uint dnd : 1; // DND properties installed
|
||||||
uint validWMState : 1; // is WM_STATE valid?
|
uint validWMState : 1; // is WM_STATE valid?
|
||||||
@ -191,11 +191,11 @@ struct QTLWExtra {
|
|||||||
qint32 newCounterValueHi;
|
qint32 newCounterValueHi;
|
||||||
quint32 newCounterValueLo;
|
quint32 newCounterValueLo;
|
||||||
#endif
|
#endif
|
||||||
#elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
|
#elif defined(Q_DEAD_CODE_FROM_QT4_WIN) // <--------------------------------------------------------- WIN
|
||||||
uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered.
|
uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered.
|
||||||
HICON winIconBig; // internal big Windows icon
|
HICON winIconBig; // internal big Windows icon
|
||||||
HICON winIconSmall; // internal small Windows icon
|
HICON winIconSmall; // internal small Windows icon
|
||||||
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC
|
#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <--------------------------------------------------------- MAC
|
||||||
uint resizer : 4;
|
uint resizer : 4;
|
||||||
uint isSetGeometry : 1;
|
uint isSetGeometry : 1;
|
||||||
uint isMove : 1;
|
uint isMove : 1;
|
||||||
@ -253,15 +253,15 @@ struct QWExtra {
|
|||||||
uint hasWindowContainer : 1;
|
uint hasWindowContainer : 1;
|
||||||
|
|
||||||
// *************************** Platform specific values (bit fields first) **********
|
// *************************** Platform specific values (bit fields first) **********
|
||||||
#if defined(Q_WS_WIN) // <----------------------------------------------------------- WIN
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN) // <----------------------------------------------------------- WIN
|
||||||
#ifndef QT_NO_DRAGANDDROP
|
#ifndef QT_NO_DRAGANDDROP
|
||||||
QOleDropTarget *dropTarget; // drop target
|
QOleDropTarget *dropTarget; // drop target
|
||||||
QList<QPointer<QWidget> > oleDropWidgets;
|
QList<QPointer<QWidget> > oleDropWidgets;
|
||||||
#endif
|
#endif
|
||||||
#elif defined(Q_WS_X11) // <--------------------------------------------------------- X11
|
#elif defined(Q_DEAD_CODE_FROM_QT4_X11) // <--------------------------------------------------------- X11
|
||||||
uint compress_events : 1;
|
uint compress_events : 1;
|
||||||
WId xDndProxy; // XDND forwarding to embedded windows
|
WId xDndProxy; // XDND forwarding to embedded windows
|
||||||
#elif defined(Q_WS_MAC) // <------------------------------------------------------ MAC
|
#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <------------------------------------------------------ MAC
|
||||||
// Cocoa Mask stuff
|
// Cocoa Mask stuff
|
||||||
QImage maskBits;
|
QImage maskBits;
|
||||||
CGImageRef imageMask;
|
CGImageRef imageMask;
|
||||||
@ -745,7 +745,7 @@ public:
|
|||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
uint noPaintOnScreen : 1; // see qwidget.cpp ::paintEngine()
|
uint noPaintOnScreen : 1; // see qwidget.cpp ::paintEngine()
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_WS_X11) // <----------------------------------------------------------- X11
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11) // <----------------------------------------------------------- X11
|
||||||
Qt::HANDLE picture;
|
Qt::HANDLE picture;
|
||||||
static QWidget *mouseGrabber;
|
static QWidget *mouseGrabber;
|
||||||
static QWidget *keyboardGrabber;
|
static QWidget *keyboardGrabber;
|
||||||
@ -758,7 +758,7 @@ public:
|
|||||||
void updateX11AcceptFocus();
|
void updateX11AcceptFocus();
|
||||||
QPoint mapToGlobal(const QPoint &pos) const;
|
QPoint mapToGlobal(const QPoint &pos) const;
|
||||||
QPoint mapFromGlobal(const QPoint &pos) const;
|
QPoint mapFromGlobal(const QPoint &pos) const;
|
||||||
#elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
|
#elif defined(Q_DEAD_CODE_FROM_QT4_WIN) // <--------------------------------------------------------- WIN
|
||||||
#ifndef QT_NO_GESTURES
|
#ifndef QT_NO_GESTURES
|
||||||
uint nativeGesturePanEnabled : 1;
|
uint nativeGesturePanEnabled : 1;
|
||||||
#endif
|
#endif
|
||||||
@ -774,7 +774,7 @@ public:
|
|||||||
void winSetupGestures();
|
void winSetupGestures();
|
||||||
#elif defined(Q_OS_MAC) // <--------------------------------------------------------- MAC
|
#elif defined(Q_OS_MAC) // <--------------------------------------------------------- MAC
|
||||||
void macUpdateSizeAttribute();
|
void macUpdateSizeAttribute();
|
||||||
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC (old stuff)
|
#elif defined(Q_DEAD_CODE_FROM_QT4_MAC) // <--------------------------------------------------------- MAC (old stuff)
|
||||||
// This is new stuff
|
// This is new stuff
|
||||||
uint needWindowChange : 1;
|
uint needWindowChange : 1;
|
||||||
|
|
||||||
|
@ -662,7 +662,7 @@ void QWidgetBackingStore::markDirtyOnScreen(const QRegion ®ion, QWidget *widg
|
|||||||
if (!widget || widget->d_func()->paintOnScreen() || region.isEmpty())
|
if (!widget || widget->d_func()->paintOnScreen() || region.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (!widget->testAttribute(Qt::WA_WState_InPaintEvent))
|
if (!widget->testAttribute(Qt::WA_WState_InPaintEvent))
|
||||||
dirtyOnScreen += region.translated(topLevelOffset);
|
dirtyOnScreen += region.translated(topLevelOffset);
|
||||||
return;
|
return;
|
||||||
@ -1457,7 +1457,7 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn)
|
|||||||
&& (usesDoubleBufferedGLContext || q->autoFillBackground());
|
&& (usesDoubleBufferedGLContext || q->autoFillBackground());
|
||||||
QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn);
|
QRegion toBePainted(noPartialUpdateSupport ? q->rect() : rgn);
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// No difference between update() and repaint() on the Mac.
|
// No difference between update() and repaint() on the Mac.
|
||||||
update_sys(toBePainted);
|
update_sys(toBePainted);
|
||||||
return;
|
return;
|
||||||
|
@ -127,7 +127,7 @@ private:
|
|||||||
friend bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOptionButton *option);
|
friend bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOptionButton *option);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ QStyle *QStyleFactory::create(const QString& key)
|
|||||||
#ifndef QT_NO_STYLE_MAC
|
#ifndef QT_NO_STYLE_MAC
|
||||||
if (style.startsWith(QLatin1String("macintosh"))) {
|
if (style.startsWith(QLatin1String("macintosh"))) {
|
||||||
ret = new QMacStyle;
|
ret = new QMacStyle;
|
||||||
# ifdef Q_WS_MAC
|
# ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (style == QLatin1String("macintosh"))
|
if (style == QLatin1String("macintosh"))
|
||||||
style += QLatin1String(" (aqua)");
|
style += QLatin1String(" (aqua)");
|
||||||
# endif
|
# endif
|
||||||
@ -220,7 +220,7 @@ QStringList QStyleFactory::keys()
|
|||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_STYLE_MAC
|
#ifndef QT_NO_STYLE_MAC
|
||||||
QString mstyle = QLatin1String("Macintosh");
|
QString mstyle = QLatin1String("Macintosh");
|
||||||
# ifdef Q_WS_MAC
|
# ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
mstyle += QLatin1String(" (aqua)");
|
mstyle += QLatin1String(" (aqua)");
|
||||||
# endif
|
# endif
|
||||||
if (!list.contains(mstyle))
|
if (!list.contains(mstyle))
|
||||||
|
@ -193,7 +193,7 @@ void QStyleOption::init(const QWidget *widget)
|
|||||||
state |= QStyle::State_Active;
|
state |= QStyle::State_Active;
|
||||||
if (widget->isWindow())
|
if (widget->isWindow())
|
||||||
state |= QStyle::State_Window;
|
state |= QStyle::State_Window;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp
|
extern bool qt_mac_can_clickThrough(const QWidget *w); //qwidget_mac.cpp
|
||||||
if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
|
if (!(state & QStyle::State_Active) && !qt_mac_can_clickThrough(widget))
|
||||||
state &= ~QStyle::State_Enabled;
|
state &= ~QStyle::State_Enabled;
|
||||||
|
@ -4956,7 +4956,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
|
|||||||
sz = csz + QSize(vertical ? 0 : spaceForIcon, vertical ? spaceForIcon : 0);
|
sz = csz + QSize(vertical ? 0 : spaceForIcon, vertical ? spaceForIcon : 0);
|
||||||
return subRule.boxSize(subRule.adjustSize(sz));
|
return subRule.boxSize(subRule.adjustSize(sz));
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (baseStyle()->inherits("QMacStyle")) {
|
if (baseStyle()->inherits("QMacStyle")) {
|
||||||
//adjust the size after the call to the style because the mac style ignore the size arguments anyway.
|
//adjust the size after the call to the style because the mac style ignore the size arguments anyway.
|
||||||
//this might cause the (max-){width,height} property to include the native style border while they should not.
|
//this might cause the (max-){width,height} property to include the native style border while they should not.
|
||||||
|
@ -2222,7 +2222,7 @@ int QWindowsCEStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const
|
|||||||
case PM_DockWidgetTitleMargin:
|
case PM_DockWidgetTitleMargin:
|
||||||
ret = 2;
|
ret = 2;
|
||||||
break;
|
break;
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
// case PM_DockWidgetFrameWidth:
|
// case PM_DockWidgetFrameWidth:
|
||||||
// ret = GetSystemMetrics(SM_CXFRAME);
|
// ret = GetSystemMetrics(SM_CXFRAME);
|
||||||
// break;
|
// break;
|
||||||
@ -2230,7 +2230,7 @@ int QWindowsCEStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const
|
|||||||
case PM_DockWidgetFrameWidth:
|
case PM_DockWidgetFrameWidth:
|
||||||
ret = 4;
|
ret = 4;
|
||||||
break;
|
break;
|
||||||
#endif // Q_WS_WIN
|
#endif // Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endif // QT_NO_MENU
|
#endif // QT_NO_MENU
|
||||||
@ -2245,7 +2245,7 @@ int QWindowsCEStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, const
|
|||||||
ret = qMax(4, QApplication::globalStrut().width());
|
ret = qMax(4, QApplication::globalStrut().width());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
case PM_MDIFrameWidth:
|
case PM_MDIFrameWidth:
|
||||||
ret = 3;
|
ret = 3;
|
||||||
break;
|
break;
|
||||||
|
@ -7044,12 +7044,12 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co
|
|||||||
case PM_DockWidgetTitleMargin:
|
case PM_DockWidgetTitleMargin:
|
||||||
ret = 2;
|
ret = 2;
|
||||||
break;
|
break;
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
#else
|
#else
|
||||||
case PM_DockWidgetFrameWidth:
|
case PM_DockWidgetFrameWidth:
|
||||||
ret = 4;
|
ret = 4;
|
||||||
break;
|
break;
|
||||||
#endif // Q_WS_WIN
|
#endif // Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
break;
|
break;
|
||||||
#endif // QT_NO_MENU
|
#endif // QT_NO_MENU
|
||||||
|
|
||||||
@ -7101,7 +7101,7 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co
|
|||||||
ret = qMax(4, QApplication::globalStrut().width());
|
ret = qMax(4, QApplication::globalStrut().width());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
case PM_MDIFrameWidth:
|
case PM_MDIFrameWidth:
|
||||||
ret = 1;
|
ret = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -455,7 +455,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
// the only way to distinguish between real mouse wheels and wheel
|
// the only way to distinguish between real mouse wheels and wheel
|
||||||
// events generated by the native 2 finger swipe gesture is to listen
|
// events generated by the native 2 finger swipe gesture is to listen
|
||||||
// for these events (according to Apple's Cocoa Event-Handling Guide)
|
// for these events (according to Apple's Cocoa Event-Handling Guide)
|
||||||
|
@ -1002,12 +1002,12 @@ bool QScroller::handleInput(Input input, const QPointF &position, qint64 timesta
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(Q_WS_MAC)
|
#if !defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
// the Mac version is implemented in qscroller_mac.mm
|
// the Mac version is implemented in qscroller_mac.mm
|
||||||
|
|
||||||
QPointF QScrollerPrivate::realDpi(int screen)
|
QPointF QScrollerPrivate::realDpi(int screen)
|
||||||
{
|
{
|
||||||
# if defined(Q_WS_X11) && !defined(QT_NO_XRANDR)
|
# if defined(Q_DEAD_CODE_FROM_QT4_X11) && !defined(QT_NO_XRANDR)
|
||||||
if (X11 && X11->use_xrandr && X11->ptrXRRSizes && X11->ptrXRRRootToScreen) {
|
if (X11 && X11->use_xrandr && X11->ptrXRRSizes && X11->ptrXRRRootToScreen) {
|
||||||
int nsizes = 0;
|
int nsizes = 0;
|
||||||
// QDesktopWidget is based on Xinerama screens, which do not always
|
// QDesktopWidget is based on Xinerama screens, which do not always
|
||||||
@ -1033,7 +1033,7 @@ QPointF QScrollerPrivate::realDpi(int screen)
|
|||||||
return QPointF(w->physicalDpiX(), w->physicalDpiY());
|
return QPointF(w->physicalDpiX(), w->physicalDpiY());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !Q_WS_MAC
|
#endif // !Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
|
|
||||||
/*! \internal
|
/*! \internal
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QtCore/qmath.h>
|
#include <QtCore/qmath.h>
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
# include <QLibrary>
|
# include <QLibrary>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ QScrollerPropertiesPrivate *QScrollerPropertiesPrivate::defaults()
|
|||||||
spp.overshootDragDistanceFactor = qreal(1);
|
spp.overshootDragDistanceFactor = qreal(1);
|
||||||
spp.overshootScrollDistanceFactor = qreal(0.5);
|
spp.overshootScrollDistanceFactor = qreal(0.5);
|
||||||
spp.overshootScrollTime = qreal(0.7);
|
spp.overshootScrollTime = qreal(0.7);
|
||||||
# ifdef Q_WS_WIN
|
# ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
if (QLibrary::resolve(QLatin1String("UxTheme"), "BeginPanningFeedback"))
|
if (QLibrary::resolve(QLatin1String("UxTheme"), "BeginPanningFeedback"))
|
||||||
spp.overshootScrollTime = qreal(0.35);
|
spp.overshootScrollTime = qreal(0.35);
|
||||||
# endif
|
# endif
|
||||||
|
@ -283,7 +283,7 @@ bool QSystemTrayIcon::isVisible() const
|
|||||||
*/
|
*/
|
||||||
bool QSystemTrayIcon::event(QEvent *e)
|
bool QSystemTrayIcon::event(QEvent *e)
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
if (e->type() == QEvent::ToolTip) {
|
if (e->type() == QEvent::ToolTip) {
|
||||||
Q_D(QSystemTrayIcon);
|
Q_D(QSystemTrayIcon);
|
||||||
return d->sys->deliverToolTipEvent(e);
|
return d->sys->deliverToolTipEvent(e);
|
||||||
@ -586,7 +586,7 @@ void QBalloonTip::balloon(const QPoint& pos, int msecs, bool showArrow)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
#if defined(QT_NO_XSHAPE) && defined(Q_WS_X11)
|
#if defined(QT_NO_XSHAPE) && defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
// XShape is required for setting the mask, so we just
|
// XShape is required for setting the mask, so we just
|
||||||
// draw an ugly square when its not available
|
// draw an ugly square when its not available
|
||||||
path.moveTo(0, 0);
|
path.moveTo(0, 0);
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
#include <private/qapplication_p.h>
|
#include <private/qapplication_p.h>
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <private/qt_mac_p.h>
|
#include <private/qt_mac_p.h>
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
@ -162,7 +162,7 @@ QAbstractScrollAreaPrivate::QAbstractScrollAreaPrivate()
|
|||||||
shownOnce(false), inResize(false), sizeAdjustPolicy(QAbstractScrollArea::AdjustIgnored),
|
shownOnce(false), inResize(false), sizeAdjustPolicy(QAbstractScrollArea::AdjustIgnored),
|
||||||
viewport(0), cornerWidget(0), left(0), top(0), right(0), bottom(0),
|
viewport(0), cornerWidget(0), left(0), top(0), right(0), bottom(0),
|
||||||
xoffset(0), yoffset(0), viewportFilter(0)
|
xoffset(0), yoffset(0), viewportFilter(0)
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
, singleFingerPanEnabled(false)
|
, singleFingerPanEnabled(false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -308,7 +308,7 @@ void QAbstractScrollAreaPrivate::init()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
void QAbstractScrollAreaPrivate::setSingleFingerPanEnabled(bool on)
|
void QAbstractScrollAreaPrivate::setSingleFingerPanEnabled(bool on)
|
||||||
{
|
{
|
||||||
singleFingerPanEnabled = on;
|
singleFingerPanEnabled = on;
|
||||||
@ -316,7 +316,7 @@ void QAbstractScrollAreaPrivate::setSingleFingerPanEnabled(bool on)
|
|||||||
if (dd)
|
if (dd)
|
||||||
dd->winSetupGestures();
|
dd->winSetupGestures();
|
||||||
}
|
}
|
||||||
#endif // Q_WS_WIN
|
#endif // Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
|
|
||||||
void QAbstractScrollAreaPrivate::layoutChildren()
|
void QAbstractScrollAreaPrivate::layoutChildren()
|
||||||
{
|
{
|
||||||
@ -337,7 +337,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
|
|||||||
const int hscrollOverlap = hbar->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarOverlap, &opt, hbar);
|
const int hscrollOverlap = hbar->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarOverlap, &opt, hbar);
|
||||||
const int vscrollOverlap = vbar->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarOverlap, &opt, vbar);
|
const int vscrollOverlap = vbar->style()->pixelMetric(QStyle::PM_ScrollView_ScrollBarOverlap, &opt, vbar);
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QWidget * const window = q->window();
|
QWidget * const window = q->window();
|
||||||
|
|
||||||
// Use small scroll bars for tool windows, to match the native size grip.
|
// Use small scroll bars for tool windows, to match the native size grip.
|
||||||
@ -380,7 +380,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
|
|||||||
|
|
||||||
// If the scroll bars are at the very right and bottom of the window we
|
// If the scroll bars are at the very right and bottom of the window we
|
||||||
// move their positions to be aligned with the size grip.
|
// move their positions to be aligned with the size grip.
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// Check if a native sizegrip is present.
|
// Check if a native sizegrip is present.
|
||||||
bool hasMacReverseSizeGrip = false;
|
bool hasMacReverseSizeGrip = false;
|
||||||
bool hasMacSizeGrip = false;
|
bool hasMacSizeGrip = false;
|
||||||
@ -433,7 +433,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
|
|||||||
if (hasCornerWidget && ((needv && vscrollOverlap == 0) || (needh && hscrollOverlap == 0)))
|
if (hasCornerWidget && ((needv && vscrollOverlap == 0) || (needh && hscrollOverlap == 0)))
|
||||||
cornerOffset = extPoint;
|
cornerOffset = extPoint;
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// Also move the scroll bars if they are covered by the native Mac size grip.
|
// Also move the scroll bars if they are covered by the native Mac size grip.
|
||||||
if (hasMacSizeGrip)
|
if (hasMacSizeGrip)
|
||||||
cornerOffset = extPoint;
|
cornerOffset = extPoint;
|
||||||
@ -448,7 +448,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
|
|||||||
// (transparent) sizegrip in the area where a corner widget would be.
|
// (transparent) sizegrip in the area where a corner widget would be.
|
||||||
if ((needv && needh && hasCornerWidget == false && hscrollOverlap == 0 && vscrollOverlap == 0)
|
if ((needv && needh && hasCornerWidget == false && hscrollOverlap == 0 && vscrollOverlap == 0)
|
||||||
|| ((needv || needh)
|
|| ((needv || needh)
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
&& hasMacSizeGrip
|
&& hasMacSizeGrip
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@ -458,7 +458,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
|
|||||||
cornerPaintingRect = QRect();
|
cornerPaintingRect = QRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (hasMacReverseSizeGrip)
|
if (hasMacReverseSizeGrip)
|
||||||
reverseCornerPaintingRect = QRect(controlsRect.bottomRight() + QPoint(1, 1) - extPoint, extSize);
|
reverseCornerPaintingRect = QRect(controlsRect.bottomRight() + QPoint(1, 1) - extPoint, extSize);
|
||||||
else
|
else
|
||||||
@ -483,7 +483,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
|
|||||||
|
|
||||||
if (needh) {
|
if (needh) {
|
||||||
QRect horizontalScrollBarRect(QPoint(controlsRect.left() + vHeaderRight, cornerPoint.y()), QPoint(cornerPoint.x() - 1, controlsRect.bottom()));
|
QRect horizontalScrollBarRect(QPoint(controlsRect.left() + vHeaderRight, cornerPoint.y()), QPoint(cornerPoint.x() - 1, controlsRect.bottom()));
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (hasMacReverseSizeGrip)
|
if (hasMacReverseSizeGrip)
|
||||||
horizontalScrollBarRect.adjust(vsbExt, 0, 0, 0);
|
horizontalScrollBarRect.adjust(vsbExt, 0, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
@ -603,7 +603,7 @@ void QAbstractScrollArea::setViewport(QWidget *widget)
|
|||||||
d->viewport->setParent(this);
|
d->viewport->setParent(this);
|
||||||
d->viewport->setFocusProxy(this);
|
d->viewport->setFocusProxy(this);
|
||||||
d->viewport->installEventFilter(d->viewportFilter.data());
|
d->viewport->installEventFilter(d->viewportFilter.data());
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#ifndef QT_NO_GESTURES
|
#ifndef QT_NO_GESTURES
|
||||||
d->viewport->grabGesture(Qt::PanGesture);
|
d->viewport->grabGesture(Qt::PanGesture);
|
||||||
#endif
|
#endif
|
||||||
@ -1030,7 +1030,7 @@ bool QAbstractScrollArea::event(QEvent *e)
|
|||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this);
|
style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this);
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (d->reverseCornerPaintingRect.isValid()) {
|
if (d->reverseCornerPaintingRect.isValid()) {
|
||||||
option.rect = d->reverseCornerPaintingRect;
|
option.rect = d->reverseCornerPaintingRect;
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
@ -1109,7 +1109,7 @@ bool QAbstractScrollArea::event(QEvent *e)
|
|||||||
hBar->setValue(se->contentPos().x());
|
hBar->setValue(se->contentPos().x());
|
||||||
vBar->setValue(se->contentPos().y());
|
vBar->setValue(se->contentPos().y());
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
typedef BOOL (*PtrBeginPanningFeedback)(HWND);
|
typedef BOOL (*PtrBeginPanningFeedback)(HWND);
|
||||||
typedef BOOL (*PtrUpdatePanningFeedback)(HWND, LONG, LONG, BOOL);
|
typedef BOOL (*PtrUpdatePanningFeedback)(HWND, LONG, LONG, BOOL);
|
||||||
typedef BOOL (*PtrEndPanningFeedback)(HWND, BOOL);
|
typedef BOOL (*PtrEndPanningFeedback)(HWND, BOOL);
|
||||||
@ -1533,13 +1533,13 @@ void QAbstractScrollAreaPrivate::_q_vslide(int y)
|
|||||||
void QAbstractScrollAreaPrivate::_q_showOrHideScrollBars()
|
void QAbstractScrollAreaPrivate::_q_showOrHideScrollBars()
|
||||||
{
|
{
|
||||||
layoutChildren();
|
layoutChildren();
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
// Need to re-subscribe to gestures as the content changes to make sure we
|
// Need to re-subscribe to gestures as the content changes to make sure we
|
||||||
// enable/disable panning when needed.
|
// enable/disable panning when needed.
|
||||||
QWidgetPrivate *dd = static_cast<QWidgetPrivate *>(QObjectPrivate::get(viewport));
|
QWidgetPrivate *dd = static_cast<QWidgetPrivate *>(QObjectPrivate::get(viewport));
|
||||||
if (dd)
|
if (dd)
|
||||||
dd->winSetupGestures();
|
dd->winSetupGestures();
|
||||||
#endif // Q_WS_WIN
|
#endif // Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint QAbstractScrollAreaPrivate::contentsOffset() const
|
QPoint QAbstractScrollAreaPrivate::contentsOffset() const
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
QWidget *viewport;
|
QWidget *viewport;
|
||||||
QWidget *cornerWidget;
|
QWidget *cornerWidget;
|
||||||
QRect cornerPaintingRect;
|
QRect cornerPaintingRect;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QRect reverseCornerPaintingRect;
|
QRect reverseCornerPaintingRect;
|
||||||
#endif
|
#endif
|
||||||
int left, top, right, bottom; // viewport margin
|
int left, top, right, bottom; // viewport margin
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
{ return q_func()->viewportEvent(event); }
|
{ return q_func()->viewportEvent(event); }
|
||||||
QScopedPointer<QObject> viewportFilter;
|
QScopedPointer<QObject> viewportFilter;
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
bool singleFingerPanEnabled;
|
bool singleFingerPanEnabled;
|
||||||
void setSingleFingerPanEnabled(bool on = true);
|
void setSingleFingerPanEnabled(bool on = true);
|
||||||
#endif
|
#endif
|
||||||
|
@ -710,7 +710,7 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb
|
|||||||
offset_accumulated = 0;
|
offset_accumulated = 0;
|
||||||
|
|
||||||
offset_accumulated += stepsToScrollF;
|
offset_accumulated += stepsToScrollF;
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// Don't scroll more than one page in any case:
|
// Don't scroll more than one page in any case:
|
||||||
stepsToScroll = qBound(-pageStep, int(offset_accumulated), pageStep);
|
stepsToScroll = qBound(-pageStep, int(offset_accumulated), pageStep);
|
||||||
#else
|
#else
|
||||||
|
@ -1558,7 +1558,7 @@ protected:
|
|||||||
{
|
{
|
||||||
Q_UNUSED(e)
|
Q_UNUSED(e)
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QStyleOptionToolButton opt;
|
QStyleOptionToolButton opt;
|
||||||
initStyleOption(&opt);
|
initStyleOption(&opt);
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
#include <private/qabstractitemmodel_p.h>
|
#include <private/qabstractitemmodel_p.h>
|
||||||
#include <private/qabstractscrollarea_p.h>
|
#include <private/qabstractscrollarea_p.h>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
#if defined(Q_WS_MAC) && !defined(QT_NO_EFFECTS) && !defined(QT_NO_STYLE_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC) && !defined(QT_NO_EFFECTS) && !defined(QT_NO_STYLE_MAC)
|
||||||
#include <private/qcore_mac_p.h>
|
#include <private/qcore_mac_p.h>
|
||||||
#include <private/qmacstyle_mac_p.h>
|
#include <private/qmacstyle_mac_p.h>
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
@ -397,7 +397,7 @@ void QComboBoxPrivateContainer::leaveEvent(QEvent *)
|
|||||||
{
|
{
|
||||||
// On Mac using the Mac style we want to clear the selection
|
// On Mac using the Mac style we want to clear the selection
|
||||||
// when the mouse moves outside the popup.
|
// when the mouse moves outside the popup.
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QStyleOptionComboBox opt = comboStyleOption();
|
QStyleOptionComboBox opt = comboStyleOption();
|
||||||
if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo))
|
if (combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo))
|
||||||
view->clearSelection();
|
view->clearSelection();
|
||||||
|
@ -1125,7 +1125,7 @@ void QDateTimeEdit::keyPressEvent(QKeyEvent *event)
|
|||||||
select = false;
|
select = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
else
|
else
|
||||||
#ifdef QT_KEYPAD_NAVIGATION
|
#ifdef QT_KEYPAD_NAVIGATION
|
||||||
if (!QApplication::keypadNavigationEnabled())
|
if (!QApplication::keypadNavigationEnabled())
|
||||||
|
@ -411,7 +411,7 @@ QPushButton *QDialogButtonBoxPrivate::createButton(QDialogButtonBox::StandardBut
|
|||||||
qWarning("QDialogButtonBox::createButton: Invalid ButtonRole, button not added");
|
qWarning("QDialogButtonBox::createButton: Invalid ButtonRole, button not added");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// Since mnemonics is off by default on Mac, we add a Cmd-D
|
// Since mnemonics is off by default on Mac, we add a Cmd-D
|
||||||
// shortcut here to e.g. make the "Don't Save" button work nativly:
|
// shortcut here to e.g. make the "Don't Save" button work nativly:
|
||||||
if (sbutton == QDialogButtonBox::Discard)
|
if (sbutton == QDialogButtonBox::Discard)
|
||||||
|
@ -1934,7 +1934,7 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
|
|||||||
QDockAreaLayoutItem item(new QDockWidgetItem(widget));
|
QDockAreaLayoutItem item(new QDockWidgetItem(widget));
|
||||||
if (flags & StateFlagFloating) {
|
if (flags & StateFlagFloating) {
|
||||||
bool drawer = false;
|
bool drawer = false;
|
||||||
#ifdef Q_WS_MAC // drawer support
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC // drawer support
|
||||||
extern bool qt_mac_is_macdrawer(const QWidget *); //qwidget_mac.cpp
|
extern bool qt_mac_is_macdrawer(const QWidget *); //qwidget_mac.cpp
|
||||||
extern bool qt_mac_set_drawer_preferred_edge(QWidget *, Qt::DockWidgetArea); //qwidget_mac.cpp
|
extern bool qt_mac_set_drawer_preferred_edge(QWidget *, Qt::DockWidgetArea); //qwidget_mac.cpp
|
||||||
drawer = qt_mac_is_macdrawer(widget);
|
drawer = qt_mac_is_macdrawer(widget);
|
||||||
@ -1949,7 +1949,7 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
|
|||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
stream >> x >> y >> w >> h;
|
stream >> x >> y >> w >> h;
|
||||||
|
|
||||||
#ifdef Q_WS_MAC // drawer support
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC // drawer support
|
||||||
if (drawer) {
|
if (drawer) {
|
||||||
mainWindow->window()->createWinId();
|
mainWindow->window()->createWinId();
|
||||||
widget->window()->createWinId();
|
widget->window()->createWinId();
|
||||||
@ -2057,7 +2057,7 @@ void QDockAreaLayoutInfo::updateSeparatorWidgets() const
|
|||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
sepWidget->raise();
|
sepWidget->raise();
|
||||||
#endif
|
#endif
|
||||||
QRect sepRect = separatorRect(i).adjusted(-2, -2, 2, 2);
|
QRect sepRect = separatorRect(i).adjusted(-2, -2, 2, 2);
|
||||||
@ -2979,7 +2979,7 @@ bool QDockAreaLayout::restoreDockWidget(QDockWidget *dockWidget)
|
|||||||
dockWidget->d_func()->setWindowState(true, true, r);
|
dockWidget->d_func()->setWindowState(true, true, r);
|
||||||
}
|
}
|
||||||
dockWidget->setVisible(!placeHolder->hidden);
|
dockWidget->setVisible(!placeHolder->hidden);
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
if (placeHolder->window) // gets rid of the X11BypassWindowManager window flag
|
if (placeHolder->window) // gets rid of the X11BypassWindowManager window flag
|
||||||
dockWidget->d_func()->setWindowState(true);
|
dockWidget->d_func()->setWindowState(true);
|
||||||
#endif
|
#endif
|
||||||
@ -3169,7 +3169,7 @@ void QDockAreaLayout::updateSeparatorWidgets() const
|
|||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
sepWidget->raise();
|
sepWidget->raise();
|
||||||
#endif
|
#endif
|
||||||
QRect sepRect = separatorRect(i).adjusted(-2, -2, 2, 2);
|
QRect sepRect = separatorRect(i).adjusted(-2, -2, 2, 2);
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
#include "qdockwidget_p.h"
|
#include "qdockwidget_p.h"
|
||||||
#include "qmainwindowlayout_p.h"
|
#include "qmainwindowlayout_p.h"
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <private/qapplication_p.h>
|
#include <private/qapplication_p.h>
|
||||||
#include <private/qt_mac_p.h>
|
#include <private/qt_mac_p.h>
|
||||||
#include <private/qmacstyle_mac_p.h>
|
#include <private/qmacstyle_mac_p.h>
|
||||||
@ -860,7 +860,7 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event)
|
|||||||
&& (event->pos() - state->pressPos).manhattanLength()
|
&& (event->pos() - state->pressPos).manhattanLength()
|
||||||
> QApplication::startDragDistance()) {
|
> QApplication::startDragDistance()) {
|
||||||
startDrag();
|
startDrag();
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
grabMouseWhileInWindow();
|
grabMouseWhileInWindow();
|
||||||
#else
|
#else
|
||||||
q->grabMouse();
|
q->grabMouse();
|
||||||
@ -904,7 +904,7 @@ void QDockWidgetPrivate::nonClientAreaMouseEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
QRect geo = q->geometry();
|
QRect geo = q->geometry();
|
||||||
QRect titleRect = q->frameGeometry();
|
QRect titleRect = q->frameGeometry();
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if ((features & QDockWidget::DockWidgetVerticalTitleBar)) {
|
if ((features & QDockWidget::DockWidgetVerticalTitleBar)) {
|
||||||
titleRect.setTop(geo.top());
|
titleRect.setTop(geo.top());
|
||||||
titleRect.setBottom(geo.bottom());
|
titleRect.setBottom(geo.bottom());
|
||||||
@ -1437,7 +1437,7 @@ bool QDockWidget::event(QEvent *event)
|
|||||||
if (d->mouseMoveEvent(static_cast<QMouseEvent *>(event)))
|
if (d->mouseMoveEvent(static_cast<QMouseEvent *>(event)))
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
case QEvent::Leave:
|
case QEvent::Leave:
|
||||||
if (d->state != 0 && d->state->dragging && !d->state->nca) {
|
if (d->state != 0 && d->state->dragging && !d->state->nca) {
|
||||||
// This is a workaround for loosing the mouse on Vista.
|
// This is a workaround for loosing the mouse on Vista.
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
extern void qt_mac_secure_keyboard(bool); //qapplication_mac.cpp
|
extern void qt_mac_secure_keyboard(bool); //qapplication_mac.cpp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -575,7 +575,7 @@ void QLineEdit::setEchoMode(EchoMode mode)
|
|||||||
setInputMethodHints(imHints);
|
setInputMethodHints(imHints);
|
||||||
d->control->setEchoMode(mode);
|
d->control->setEchoMode(mode);
|
||||||
update();
|
update();
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (hasFocus())
|
if (hasFocus())
|
||||||
qt_mac_secure_keyboard(mode == Password || mode == NoEcho);
|
qt_mac_secure_keyboard(mode == Password || mode == NoEcho);
|
||||||
#endif
|
#endif
|
||||||
@ -1800,7 +1800,7 @@ void QLineEdit::focusInEvent(QFocusEvent *e)
|
|||||||
if((!hasSelectedText() && d->control->preeditAreaText().isEmpty())
|
if((!hasSelectedText() && d->control->preeditAreaText().isEmpty())
|
||||||
|| style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this))
|
|| style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this))
|
||||||
d->setCursorVisible(true);
|
d->setCursorVisible(true);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho)
|
if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho)
|
||||||
qt_mac_secure_keyboard(true);
|
qt_mac_secure_keyboard(true);
|
||||||
#endif
|
#endif
|
||||||
@ -1848,7 +1848,7 @@ void QLineEdit::focusOutEvent(QFocusEvent *e)
|
|||||||
if (hasAcceptableInput() || d->control->fixup())
|
if (hasAcceptableInput() || d->control->fixup())
|
||||||
emit editingFinished();
|
emit editingFinished();
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho)
|
if (d->control->echoMode() == Password || d->control->echoMode() == NoEcho)
|
||||||
qt_mac_secure_keyboard(false);
|
qt_mac_secure_keyboard(false);
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
#include <qpa/qplatformnativeinterface.h>
|
#include <qpa/qplatformnativeinterface.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <private/qt_mac_p.h>
|
#include <private/qt_mac_p.h>
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -74,7 +74,7 @@ public:
|
|||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
, useUnifiedToolBar(false)
|
, useUnifiedToolBar(false)
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
, useHIToolBar(false)
|
, useHIToolBar(false)
|
||||||
, activateUnifiedToolbarAfterFullScreen(false)
|
, activateUnifiedToolbarAfterFullScreen(false)
|
||||||
#endif
|
#endif
|
||||||
@ -89,7 +89,7 @@ public:
|
|||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
bool useUnifiedToolBar;
|
bool useUnifiedToolBar;
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
bool useHIToolBar;
|
bool useHIToolBar;
|
||||||
bool activateUnifiedToolbarAfterFullScreen;
|
bool activateUnifiedToolbarAfterFullScreen;
|
||||||
#endif
|
#endif
|
||||||
@ -1079,7 +1079,7 @@ void QMainWindow::addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget
|
|||||||
d_func()->layout->removeWidget(dockwidget); // in case it was already in here
|
d_func()->layout->removeWidget(dockwidget); // in case it was already in here
|
||||||
addDockWidget(area, dockwidget, orientation);
|
addDockWidget(area, dockwidget, orientation);
|
||||||
|
|
||||||
#ifdef Q_WS_MAC //drawer support
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC //drawer support
|
||||||
QMacCocoaAutoReleasePool pool;
|
QMacCocoaAutoReleasePool pool;
|
||||||
extern bool qt_mac_is_macdrawer(const QWidget *); //qwidget_mac.cpp
|
extern bool qt_mac_is_macdrawer(const QWidget *); //qwidget_mac.cpp
|
||||||
if (qt_mac_is_macdrawer(dockwidget)) {
|
if (qt_mac_is_macdrawer(dockwidget)) {
|
||||||
@ -1454,7 +1454,7 @@ bool QMainWindow::event(QEvent *event)
|
|||||||
if (!d->explicitIconSize)
|
if (!d->explicitIconSize)
|
||||||
setIconSize(QSize());
|
setIconSize(QSize());
|
||||||
break;
|
break;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
case QEvent::Show:
|
case QEvent::Show:
|
||||||
if (unifiedTitleAndToolBarOnMac())
|
if (unifiedTitleAndToolBarOnMac())
|
||||||
d->layout->syncUnifiedToolbarVisibility();
|
d->layout->syncUnifiedToolbarVisibility();
|
||||||
@ -1473,7 +1473,7 @@ bool QMainWindow::event(QEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
|
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
|
||||||
case QEvent::CursorChange:
|
case QEvent::CursorChange:
|
||||||
// CursorChange events are triggered as mouse moves to new widgets even
|
// CursorChange events are triggered as mouse moves to new widgets even
|
||||||
@ -1529,7 +1529,7 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
Q_D(QMainWindow);
|
Q_D(QMainWindow);
|
||||||
if (!isWindow() || d->useHIToolBar == set || QSysInfo::MacintoshVersion < QSysInfo::MV_10_3)
|
if (!isWindow() || d->useHIToolBar == set || QSysInfo::MacintoshVersion < QSysInfo::MV_10_3)
|
||||||
return;
|
return;
|
||||||
@ -1564,7 +1564,7 @@ bool QMainWindow::unifiedTitleAndToolBarOnMac() const
|
|||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
return d_func()->useUnifiedToolBar;
|
return d_func()->useUnifiedToolBar;
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
return d_func()->useHIToolBar && !testAttribute(Qt::WA_MacBrushedMetal) && !(windowFlags() & Qt::FramelessWindowHint);
|
return d_func()->useHIToolBar && !testAttribute(Qt::WA_MacBrushedMetal) && !(windowFlags() & Qt::FramelessWindowHint);
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
#include <private/qapplication_p.h>
|
#include <private/qapplication_p.h>
|
||||||
#include <private/qlayoutengine_p.h>
|
#include <private/qlayoutengine_p.h>
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
# include <private/qcore_mac_p.h>
|
# include <private/qcore_mac_p.h>
|
||||||
# include <private/qt_cocoa_helpers_mac_p.h>
|
# include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
@ -830,11 +830,11 @@ void QMainWindowLayout::removeToolBar(QToolBar *toolbar)
|
|||||||
QObject::disconnect(parentWidget(), SIGNAL(toolButtonStyleChanged(Qt::ToolButtonStyle)),
|
QObject::disconnect(parentWidget(), SIGNAL(toolButtonStyleChanged(Qt::ToolButtonStyle)),
|
||||||
toolbar, SLOT(_q_updateToolButtonStyle(Qt::ToolButtonStyle)));
|
toolbar, SLOT(_q_updateToolButtonStyle(Qt::ToolButtonStyle)));
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (usesHIToolBar(toolbar)) {
|
if (usesHIToolBar(toolbar)) {
|
||||||
removeFromMacToolbar(toolbar);
|
removeFromMacToolbar(toolbar);
|
||||||
} else
|
} else
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
{
|
{
|
||||||
removeWidget(toolbar);
|
removeWidget(toolbar);
|
||||||
}
|
}
|
||||||
@ -849,7 +849,7 @@ void QMainWindowLayout::addToolBar(Qt::ToolBarArea area,
|
|||||||
bool)
|
bool)
|
||||||
{
|
{
|
||||||
validateToolBarArea(area);
|
validateToolBarArea(area);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if ((area == Qt::TopToolBarArea)
|
if ((area == Qt::TopToolBarArea)
|
||||||
&& layoutState.mainWindow->unifiedTitleAndToolBarOnMac()) {
|
&& layoutState.mainWindow->unifiedTitleAndToolBarOnMac()) {
|
||||||
insertIntoMacToolbar(0, toolbar);
|
insertIntoMacToolbar(0, toolbar);
|
||||||
@ -875,11 +875,11 @@ void QMainWindowLayout::addToolBar(Qt::ToolBarArea area,
|
|||||||
*/
|
*/
|
||||||
void QMainWindowLayout::insertToolBar(QToolBar *before, QToolBar *toolbar)
|
void QMainWindowLayout::insertToolBar(QToolBar *before, QToolBar *toolbar)
|
||||||
{
|
{
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (usesHIToolBar(before)) {
|
if (usesHIToolBar(before)) {
|
||||||
insertIntoMacToolbar(before, toolbar);
|
insertIntoMacToolbar(before, toolbar);
|
||||||
} else
|
} else
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
{
|
{
|
||||||
addChildWidget(toolbar);
|
addChildWidget(toolbar);
|
||||||
QLayoutItem * item = layoutState.toolBarAreaLayout.insertToolBar(before, toolbar);
|
QLayoutItem * item = layoutState.toolBarAreaLayout.insertToolBar(before, toolbar);
|
||||||
@ -908,7 +908,7 @@ Qt::ToolBarArea QMainWindowLayout::toolBarArea(QToolBar *toolbar) const
|
|||||||
case QInternal::BottomDock: return Qt::BottomToolBarArea;
|
case QInternal::BottomDock: return Qt::BottomToolBarArea;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (pos == QInternal::DockCount) {
|
if (pos == QInternal::DockCount) {
|
||||||
if (qtoolbarsInUnifiedToolbarList.contains(toolbar))
|
if (qtoolbarsInUnifiedToolbarList.contains(toolbar))
|
||||||
return Qt::TopToolBarArea;
|
return Qt::TopToolBarArea;
|
||||||
@ -931,7 +931,7 @@ void QMainWindowLayout::getStyleOptionInfo(QStyleOptionToolBar *option, QToolBar
|
|||||||
void QMainWindowLayout::toggleToolBarsVisible()
|
void QMainWindowLayout::toggleToolBarsVisible()
|
||||||
{
|
{
|
||||||
bool updateNonUnifiedParts = true;
|
bool updateNonUnifiedParts = true;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (layoutState.mainWindow->unifiedTitleAndToolBarOnMac()) {
|
if (layoutState.mainWindow->unifiedTitleAndToolBarOnMac()) {
|
||||||
// If we hit this case, someone has pressed the "toolbar button" which will
|
// If we hit this case, someone has pressed the "toolbar button" which will
|
||||||
// toggle the unified toolbar visibility, because that's what the user wants.
|
// toggle the unified toolbar visibility, because that's what the user wants.
|
||||||
@ -1475,7 +1475,7 @@ QSize QMainWindowLayout::minimumSize() const
|
|||||||
const QSize sbMin = statusbar ? statusbar->minimumSize() : QSize(0, 0);
|
const QSize sbMin = statusbar ? statusbar->minimumSize() : QSize(0, 0);
|
||||||
minSize = QSize(qMax(sbMin.width(), minSize.width()),
|
minSize = QSize(qMax(sbMin.width(), minSize.width()),
|
||||||
sbMin.height() + minSize.height());
|
sbMin.height() + minSize.height());
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
const QSize storedSize = minSize;
|
const QSize storedSize = minSize;
|
||||||
int minWidth = 0;
|
int minWidth = 0;
|
||||||
foreach (QToolBar *toolbar, qtoolbarsInUnifiedToolbarList) {
|
foreach (QToolBar *toolbar, qtoolbarsInUnifiedToolbarList) {
|
||||||
@ -1676,7 +1676,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
|
|||||||
#ifndef QT_NO_RUBBERBAND
|
#ifndef QT_NO_RUBBERBAND
|
||||||
, gapIndicator(new QRubberBand(QRubberBand::Rectangle, mainwindow))
|
, gapIndicator(new QRubberBand(QRubberBand::Rectangle, mainwindow))
|
||||||
#endif //QT_NO_RUBBERBAND
|
#endif //QT_NO_RUBBERBAND
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
, blockVisiblityCheck(false)
|
, blockVisiblityCheck(false)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -1709,7 +1709,7 @@ QMainWindowLayout::~QMainWindowLayout()
|
|||||||
layoutState.deleteAllLayoutItems();
|
layoutState.deleteAllLayoutItems();
|
||||||
layoutState.deleteCentralWidgetItem();
|
layoutState.deleteCentralWidgetItem();
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
cleanUpMacToolbarItems();
|
cleanUpMacToolbarItems();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1956,7 +1956,7 @@ bool QMainWindowLayout::restoreState(QDataStream &stream)
|
|||||||
// HIToolbar.
|
// HIToolbar.
|
||||||
bool QMainWindowLayout::usesHIToolBar(QToolBar *toolbar) const
|
bool QMainWindowLayout::usesHIToolBar(QToolBar *toolbar) const
|
||||||
{
|
{
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
Q_UNUSED(toolbar);
|
Q_UNUSED(toolbar);
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
#include "qdockarealayout_p.h"
|
#include "qdockarealayout_p.h"
|
||||||
#include "qtoolbararealayout_p.h"
|
#include "qtoolbararealayout_p.h"
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
// Forward defs to make avoid including Carbon.h (faster compile you know ;).
|
// Forward defs to make avoid including Carbon.h (faster compile you know ;).
|
||||||
struct OpaqueHIObjectRef;
|
struct OpaqueHIObjectRef;
|
||||||
typedef struct OpaqueHIObjectRef* HIObjectRef;
|
typedef struct OpaqueHIObjectRef* HIObjectRef;
|
||||||
@ -70,7 +70,7 @@ typedef const struct __CFString * CFStringRef;
|
|||||||
|
|
||||||
#include <private/qunifiedtoolbarsurface_mac_p.h>
|
#include <private/qunifiedtoolbarsurface_mac_p.h>
|
||||||
|
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ private:
|
|||||||
#ifndef QT_NO_TABBAR
|
#ifndef QT_NO_TABBAR
|
||||||
void updateTabBarShapes();
|
void updateTabBarShapes();
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
static OSStatus qtmacToolbarDelegate(EventHandlerCallRef, EventRef , void *);
|
static OSStatus qtmacToolbarDelegate(EventHandlerCallRef, EventRef , void *);
|
||||||
static OSStatus qtoolbarInHIToolbarHandler(EventHandlerCallRef inCallRef, EventRef event,
|
static OSStatus qtoolbarInHIToolbarHandler(EventHandlerCallRef inCallRef, EventRef event,
|
||||||
void *data);
|
void *data);
|
||||||
@ -325,7 +325,7 @@ public:
|
|||||||
QUnifiedToolbarSurface *unifiedSurface;
|
QUnifiedToolbarSurface *unifiedSurface;
|
||||||
void updateUnifiedToolbarOffset();
|
void updateUnifiedToolbarOffset();
|
||||||
|
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_DEBUG_STREAM)
|
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_DEBUG_STREAM)
|
||||||
|
@ -154,7 +154,7 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC) && !defined(QT_NO_STYLE_MAC)
|
||||||
#include <private/qmacstyle_mac_p.h>
|
#include <private/qmacstyle_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
#include <QChildEvent>
|
#include <QChildEvent>
|
||||||
@ -2491,7 +2491,7 @@ bool QMdiArea::event(QEvent *event)
|
|||||||
{
|
{
|
||||||
Q_D(QMdiArea);
|
Q_D(QMdiArea);
|
||||||
switch (event->type()) {
|
switch (event->type()) {
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
// QWidgetPrivate::hide_helper activates another sub-window when closing a
|
// QWidgetPrivate::hide_helper activates another sub-window when closing a
|
||||||
// modal dialog on Windows (see activateWindow() inside the ifdef).
|
// modal dialog on Windows (see activateWindow() inside the ifdef).
|
||||||
case QEvent::WindowUnblocked:
|
case QEvent::WindowUnblocked:
|
||||||
@ -2555,7 +2555,7 @@ bool QMdiArea::eventFilter(QObject *object, QEvent *event)
|
|||||||
|
|
||||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||||
// Ingore key events without a Ctrl modifier (except for press/release on the modifier itself).
|
// Ingore key events without a Ctrl modifier (except for press/release on the modifier itself).
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (!(keyEvent->modifiers() & Qt::MetaModifier) && keyEvent->key() != Qt::Key_Meta)
|
if (!(keyEvent->modifiers() & Qt::MetaModifier) && keyEvent->key() != Qt::Key_Meta)
|
||||||
#else
|
#else
|
||||||
if (!(keyEvent->modifiers() & Qt::ControlModifier) && keyEvent->key() != Qt::Key_Control)
|
if (!(keyEvent->modifiers() & Qt::ControlModifier) && keyEvent->key() != Qt::Key_Control)
|
||||||
@ -2574,7 +2574,7 @@ bool QMdiArea::eventFilter(QObject *object, QEvent *event)
|
|||||||
// 3) Ctrl-Shift-Tab (Tab, Tab, ...) -> iterate through all windows in the opposite
|
// 3) Ctrl-Shift-Tab (Tab, Tab, ...) -> iterate through all windows in the opposite
|
||||||
// direction (activatePreviousSubWindow())
|
// direction (activatePreviousSubWindow())
|
||||||
switch (keyEvent->key()) {
|
switch (keyEvent->key()) {
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
case Qt::Key_Meta:
|
case Qt::Key_Meta:
|
||||||
#else
|
#else
|
||||||
case Qt::Key_Control:
|
case Qt::Key_Control:
|
||||||
|
@ -274,7 +274,7 @@ static inline bool isHoverControl(QStyle::SubControl control)
|
|||||||
return control != QStyle::SC_None && control != QStyle::SC_TitleBarLabel;
|
return control != QStyle::SC_None && control != QStyle::SC_TitleBarLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_WS_WIN)
|
#if defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
static inline QRgb colorref2qrgb(COLORREF col)
|
static inline QRgb colorref2qrgb(COLORREF col)
|
||||||
{
|
{
|
||||||
return qRgb(GetRValue(col),GetGValue(col),GetBValue(col));
|
return qRgb(GetRValue(col),GetGValue(col),GetBValue(col));
|
||||||
@ -1921,7 +1921,7 @@ QPalette QMdiSubWindowPrivate::desktopPalette() const
|
|||||||
QPalette newPalette = q->palette();
|
QPalette newPalette = q->palette();
|
||||||
|
|
||||||
bool colorsInitialized = false;
|
bool colorsInitialized = false;
|
||||||
#ifdef Q_WS_WIN // ask system properties on windows
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN // ask system properties on windows
|
||||||
#ifndef SPI_GETGRADIENTCAPTIONS
|
#ifndef SPI_GETGRADIENTCAPTIONS
|
||||||
#define SPI_GETGRADIENTCAPTIONS 0x1008
|
#define SPI_GETGRADIENTCAPTIONS 0x1008
|
||||||
#endif
|
#endif
|
||||||
@ -1957,7 +1957,7 @@ QPalette QMdiSubWindowPrivate::desktopPalette() const
|
|||||||
newPalette.color(QPalette::Inactive, QPalette::Highlight));
|
newPalette.color(QPalette::Inactive, QPalette::Highlight));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // Q_WS_WIN
|
#endif // Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
if (!colorsInitialized) {
|
if (!colorsInitialized) {
|
||||||
newPalette.setColor(QPalette::Active, QPalette::Highlight,
|
newPalette.setColor(QPalette::Active, QPalette::Highlight,
|
||||||
newPalette.color(QPalette::Active, QPalette::Highlight));
|
newPalette.color(QPalette::Active, QPalette::Highlight));
|
||||||
|
@ -804,7 +804,7 @@ void QPlainTextEditPrivate::init(const QString &txt)
|
|||||||
viewport->setCursor(Qt::IBeamCursor);
|
viewport->setCursor(Qt::IBeamCursor);
|
||||||
#endif
|
#endif
|
||||||
originalOffsetY = 0;
|
originalOffsetY = 0;
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
setSingleFingerPanEnabled(true);
|
setSingleFingerPanEnabled(true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -50,10 +50,10 @@
|
|||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
#include "qlayoutitem.h"
|
#include "qlayoutitem.h"
|
||||||
#include "qdialogbuttonbox.h"
|
#include "qdialogbuttonbox.h"
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include "private/qmacstyle_mac_p.h"
|
#include "private/qmacstyle_mac_p.h"
|
||||||
#include "private/qmacstyle_mac_p_p.h"
|
#include "private/qmacstyle_mac_p_p.h"
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
#include "qaccessible.h"
|
#include "qaccessible.h"
|
||||||
@ -673,7 +673,7 @@ bool QPushButton::event(QEvent *e)
|
|||||||
return QAbstractButton::event(e);
|
return QAbstractButton::event(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
/*! \reimp */
|
/*! \reimp */
|
||||||
bool QPushButton::hitButton(const QPoint &pos) const
|
bool QPushButton::hitButton(const QPoint &pos) const
|
||||||
{
|
{
|
||||||
@ -702,7 +702,7 @@ bool QPushButtonPrivate::hitButton(const QPoint &pos)
|
|||||||
q->rect().height() - QMacStylePrivate::PushButtonBottomOffset);
|
q->rect().height() - QMacStylePrivate::PushButtonBottomOffset);
|
||||||
return roundedRect.contains(pos);
|
return roundedRect.contains(pos);
|
||||||
}
|
}
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -80,9 +80,9 @@ public Q_SLOTS:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent *e) Q_DECL_OVERRIDE;
|
bool event(QEvent *e) Q_DECL_OVERRIDE;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
bool hitButton(const QPoint &pos) const;
|
bool hitButton(const QPoint &pos) const;
|
||||||
#endif // Q_WS_MAC
|
#endif // Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
||||||
void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
|
void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
|
||||||
void focusInEvent(QFocusEvent *) Q_DECL_OVERRIDE;
|
void focusInEvent(QFocusEvent *) Q_DECL_OVERRIDE;
|
||||||
|
@ -64,7 +64,7 @@ public:
|
|||||||
|
|
||||||
inline void init() { resetLayoutItemMargins(); }
|
inline void init() { resetLayoutItemMargins(); }
|
||||||
static QPushButtonPrivate* get(QPushButton *b) { return b->d_func(); }
|
static QPushButtonPrivate* get(QPushButton *b) { return b->d_func(); }
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
bool hitButton(const QPoint &pos);
|
bool hitButton(const QPoint &pos);
|
||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_MENU
|
#ifndef QT_NO_MENU
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include "qstyle.h"
|
#include "qstyle.h"
|
||||||
#include "qstyleoption.h"
|
#include "qstyleoption.h"
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
# include <private/qt_mac_p.h>
|
# include <private/qt_mac_p.h>
|
||||||
# include <private/qt_cocoa_helpers_mac_p.h>
|
# include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
@ -136,12 +136,12 @@ QRubberBand::QRubberBand(Shape s, QWidget *p)
|
|||||||
Q_D(QRubberBand);
|
Q_D(QRubberBand);
|
||||||
d->shape = s;
|
d->shape = s;
|
||||||
setAttribute(Qt::WA_TransparentForMouseEvents);
|
setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
#ifndef Q_WS_WIN
|
#ifndef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
setAttribute(Qt::WA_NoSystemBackground);
|
setAttribute(Qt::WA_NoSystemBackground);
|
||||||
#endif //Q_WS_WIN
|
#endif //Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
setAttribute(Qt::WA_WState_ExplicitShowHide);
|
setAttribute(Qt::WA_WState_ExplicitShowHide);
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
if (isWindow()) {
|
if (isWindow()) {
|
||||||
createWinId();
|
createWinId();
|
||||||
extern OSWindowRef qt_mac_window_for(const QWidget *); //qwidget_mac.cpp
|
extern OSWindowRef qt_mac_window_for(const QWidget *); //qwidget_mac.cpp
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <private/qt_mac_p.h>
|
#include <private/qt_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ public:
|
|||||||
Qt::Corner m_corner;
|
Qt::Corner m_corner;
|
||||||
bool gotMousePress;
|
bool gotMousePress;
|
||||||
QPointer<QWidget> tlw;
|
QPointer<QWidget> tlw;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
void updateMacSizer(bool hide) const;
|
void updateMacSizer(bool hide) const;
|
||||||
#endif
|
#endif
|
||||||
Qt::Corner corner() const;
|
Qt::Corner corner() const;
|
||||||
@ -114,7 +114,7 @@ public:
|
|||||||
updateTopLevelWidget();
|
updateTopLevelWidget();
|
||||||
if (tlw && showSizeGrip) {
|
if (tlw && showSizeGrip) {
|
||||||
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
|
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
sizeGripNotVisibleState |= Qt::WindowMaximized;
|
sizeGripNotVisibleState |= Qt::WindowMaximized;
|
||||||
#endif
|
#endif
|
||||||
// Don't show the size grip if the tlw is maximized or in full screen mode.
|
// Don't show the size grip if the tlw is maximized or in full screen mode.
|
||||||
@ -136,7 +136,7 @@ QSizeGripPrivate::QSizeGripPrivate()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
void QSizeGripPrivate::updateMacSizer(bool hide) const
|
void QSizeGripPrivate::updateMacSizer(bool hide) const
|
||||||
{
|
{
|
||||||
Q_Q(const QSizeGrip);
|
Q_Q(const QSizeGrip);
|
||||||
@ -219,7 +219,7 @@ void QSizeGripPrivate::init()
|
|||||||
Q_Q(QSizeGrip);
|
Q_Q(QSizeGrip);
|
||||||
m_corner = q->isLeftToRight() ? Qt::BottomRightCorner : Qt::BottomLeftCorner;
|
m_corner = q->isLeftToRight() ? Qt::BottomRightCorner : Qt::BottomLeftCorner;
|
||||||
|
|
||||||
#if !defined(QT_NO_CURSOR) && !defined(Q_WS_MAC)
|
#if !defined(QT_NO_CURSOR) && !defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
q->setCursor(m_corner == Qt::TopLeftCorner || m_corner == Qt::BottomRightCorner
|
q->setCursor(m_corner == Qt::TopLeftCorner || m_corner == Qt::BottomRightCorner
|
||||||
? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
|
? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
|
||||||
#endif
|
#endif
|
||||||
@ -432,7 +432,7 @@ void QSizeGrip::moveEvent(QMoveEvent * /*moveEvent*/)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
d->m_corner = d->corner();
|
d->m_corner = d->corner();
|
||||||
#if !defined(QT_NO_CURSOR) && !defined(Q_WS_MAC)
|
#if !defined(QT_NO_CURSOR) && !defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
setCursor(d->m_corner == Qt::TopLeftCorner || d->m_corner == Qt::BottomRightCorner
|
setCursor(d->m_corner == Qt::TopLeftCorner || d->m_corner == Qt::BottomRightCorner
|
||||||
? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
|
? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
|
||||||
#endif
|
#endif
|
||||||
@ -443,7 +443,7 @@ void QSizeGrip::moveEvent(QMoveEvent * /*moveEvent*/)
|
|||||||
*/
|
*/
|
||||||
void QSizeGrip::showEvent(QShowEvent *showEvent)
|
void QSizeGrip::showEvent(QShowEvent *showEvent)
|
||||||
{
|
{
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
d_func()->updateMacSizer(false);
|
d_func()->updateMacSizer(false);
|
||||||
#endif
|
#endif
|
||||||
QWidget::showEvent(showEvent);
|
QWidget::showEvent(showEvent);
|
||||||
@ -454,7 +454,7 @@ void QSizeGrip::showEvent(QShowEvent *showEvent)
|
|||||||
*/
|
*/
|
||||||
void QSizeGrip::hideEvent(QHideEvent *hideEvent)
|
void QSizeGrip::hideEvent(QHideEvent *hideEvent)
|
||||||
{
|
{
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
d_func()->updateMacSizer(true);
|
d_func()->updateMacSizer(true);
|
||||||
#endif
|
#endif
|
||||||
QWidget::hideEvent(hideEvent);
|
QWidget::hideEvent(hideEvent);
|
||||||
@ -478,7 +478,7 @@ bool QSizeGrip::eventFilter(QObject *o, QEvent *e)
|
|||||||
return QWidget::eventFilter(o, e);
|
return QWidget::eventFilter(o, e);
|
||||||
}
|
}
|
||||||
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
|
Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen;
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
sizeGripNotVisibleState |= Qt::WindowMaximized;
|
sizeGripNotVisibleState |= Qt::WindowMaximized;
|
||||||
#endif
|
#endif
|
||||||
// Don't show the size grip if the tlw is maximized or in full screen mode.
|
// Don't show the size grip if the tlw is maximized or in full screen mode.
|
||||||
|
@ -81,7 +81,7 @@ public:
|
|||||||
|
|
||||||
int savedStrut;
|
int savedStrut;
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
QPoint dragStart;
|
QPoint dragStart;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -740,7 +740,7 @@ bool QStatusBar::event(QEvent *e)
|
|||||||
|
|
||||||
// On Mac OS X Leopard it is possible to drag the window by clicking
|
// On Mac OS X Leopard it is possible to drag the window by clicking
|
||||||
// on the tool bar on most applications.
|
// on the tool bar on most applications.
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
return QWidget::event(e);
|
return QWidget::event(e);
|
||||||
#else
|
#else
|
||||||
if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_4)
|
if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_4)
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
#ifndef QT_NO_TABBAR
|
#ifndef QT_NO_TABBAR
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
#include <private/qt_mac_p.h>
|
#include <private/qt_mac_p.h>
|
||||||
#include <private/qt_cocoa_helpers_mac_p.h>
|
#include <private/qt_cocoa_helpers_mac_p.h>
|
||||||
#endif
|
#endif
|
||||||
@ -1802,7 +1802,7 @@ void QTabBar::mousePressEvent(QMouseEvent *event)
|
|||||||
d->moveTabFinished(d->pressedIndex);
|
d->moveTabFinished(d->pressedIndex);
|
||||||
|
|
||||||
d->pressedIndex = d->indexAtPos(event->pos());
|
d->pressedIndex = d->indexAtPos(event->pos());
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
d->previousPressedIndex = d->pressedIndex;
|
d->previousPressedIndex = d->pressedIndex;
|
||||||
#endif
|
#endif
|
||||||
if (d->validIndex(d->pressedIndex)) {
|
if (d->validIndex(d->pressedIndex)) {
|
||||||
@ -1885,7 +1885,7 @@ void QTabBar::mouseMoveEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
} else if (!d->documentMode && event->buttons() == Qt::LeftButton && d->previousPressedIndex != -1) {
|
} else if (!d->documentMode && event->buttons() == Qt::LeftButton && d->previousPressedIndex != -1) {
|
||||||
int newPressedIndex = d->indexAtPos(event->pos());
|
int newPressedIndex = d->indexAtPos(event->pos());
|
||||||
if (d->pressedIndex == -1 && d->previousPressedIndex == newPressedIndex) {
|
if (d->pressedIndex == -1 && d->previousPressedIndex == newPressedIndex) {
|
||||||
@ -1988,7 +1988,7 @@ void QTabBar::mouseReleaseEvent(QMouseEvent *event)
|
|||||||
event->ignore();
|
event->ignore();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
d->previousPressedIndex = -1;
|
d->previousPressedIndex = -1;
|
||||||
#endif
|
#endif
|
||||||
if (d->movable && d->dragInProgress && d->validIndex(d->pressedIndex)) {
|
if (d->movable && d->dragInProgress && d->validIndex(d->pressedIndex)) {
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
|
selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
|
||||||
dragInProgress(false), documentMode(false), autoHide(false), changeCurrentOnDrag(false),
|
dragInProgress(false), documentMode(false), autoHide(false), changeCurrentOnDrag(false),
|
||||||
switchTabCurrentIndex(-1), switchTabTimerId(0), movingTab(0)
|
switchTabCurrentIndex(-1), switchTabTimerId(0), movingTab(0)
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
, previousPressedIndex(-1)
|
, previousPressedIndex(-1)
|
||||||
#endif
|
#endif
|
||||||
{}
|
{}
|
||||||
@ -202,7 +202,7 @@ public:
|
|||||||
int switchTabTimerId;
|
int switchTabTimerId;
|
||||||
|
|
||||||
QWidget *movingTab;
|
QWidget *movingTab;
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_DEAD_CODE_FROM_QT4_MAC
|
||||||
int previousPressedIndex;
|
int previousPressedIndex;
|
||||||
#endif
|
#endif
|
||||||
// shared by tabwidget and qtabbar
|
// shared by tabwidget and qtabbar
|
||||||
|
@ -178,7 +178,7 @@ void QTextEditPrivate::init(const QString &html)
|
|||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
viewport->setCursor(Qt::IBeamCursor);
|
viewport->setCursor(Qt::IBeamCursor);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
setSingleFingerPanEnabled(true);
|
setSingleFingerPanEnabled(true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
startDrag(moving);
|
startDrag(moving);
|
||||||
if (!moving && !wasDragging) {
|
if (!moving && !wasDragging) {
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
grabMouseWhileInWindow();
|
grabMouseWhileInWindow();
|
||||||
#else
|
#else
|
||||||
q->grabMouse();
|
q->grabMouse();
|
||||||
|
@ -66,7 +66,7 @@ int QWidgetLineControl::redoTextLayout() const
|
|||||||
QTextLine l = m_textLayout.createLine();
|
QTextLine l = m_textLayout.createLine();
|
||||||
m_textLayout.endLayout();
|
m_textLayout.endLayout();
|
||||||
|
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (m_threadChecks)
|
if (m_threadChecks)
|
||||||
m_textLayoutThread = QThread::currentThread();
|
m_textLayoutThread = QThread::currentThread();
|
||||||
#endif
|
#endif
|
||||||
|
@ -83,7 +83,7 @@ public:
|
|||||||
m_selstart(0), m_selend(0), m_passwordEchoEditing(false)
|
m_selstart(0), m_selend(0), m_passwordEchoEditing(false)
|
||||||
, m_passwordEchoTimer(0)
|
, m_passwordEchoTimer(0)
|
||||||
, m_passwordMaskDelay(-1)
|
, m_passwordMaskDelay(-1)
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
, m_threadChecks(false)
|
, m_threadChecks(false)
|
||||||
, m_textLayoutThread(0)
|
, m_textLayoutThread(0)
|
||||||
#endif
|
#endif
|
||||||
@ -372,14 +372,14 @@ public:
|
|||||||
|
|
||||||
QTextLayout *textLayout() const
|
QTextLayout *textLayout() const
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
if (m_threadChecks && QThread::currentThread() != m_textLayoutThread)
|
if (m_threadChecks && QThread::currentThread() != m_textLayoutThread)
|
||||||
redoTextLayout();
|
redoTextLayout();
|
||||||
#endif
|
#endif
|
||||||
return &m_textLayout;
|
return &m_textLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
void setThreadChecks(bool threadChecks)
|
void setThreadChecks(bool threadChecks)
|
||||||
{
|
{
|
||||||
m_threadChecks = threadChecks;
|
m_threadChecks = threadChecks;
|
||||||
@ -503,7 +503,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int redoTextLayout() const;
|
int redoTextLayout() const;
|
||||||
#if defined(Q_WS_MAC)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAC)
|
||||||
bool m_threadChecks;
|
bool m_threadChecks;
|
||||||
mutable QThread *m_textLayoutThread;
|
mutable QThread *m_textLayoutThread;
|
||||||
#endif
|
#endif
|
||||||
|
@ -114,7 +114,7 @@ bool QWidgetResizeHandler::eventFilter(QObject *o, QEvent *ee)
|
|||||||
if (!widget->rect().contains(widget->mapFromGlobal(e->globalPos())))
|
if (!widget->rect().contains(widget->mapFromGlobal(e->globalPos())))
|
||||||
return false;
|
return false;
|
||||||
if (e->button() == Qt::LeftButton) {
|
if (e->button() == Qt::LeftButton) {
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
/*
|
/*
|
||||||
Implicit grabs do not stop the X server from changing
|
Implicit grabs do not stop the X server from changing
|
||||||
the cursor in children, which looks *really* bad when
|
the cursor in children, which looks *really* bad when
|
||||||
@ -128,7 +128,7 @@ bool QWidgetResizeHandler::eventFilter(QObject *o, QEvent *ee)
|
|||||||
# else
|
# else
|
||||||
widget->grabMouse();
|
widget->grabMouse();
|
||||||
# endif // QT_NO_CURSOR
|
# endif // QT_NO_CURSOR
|
||||||
#endif // Q_WS_X11
|
#endif // Q_DEAD_CODE_FROM_QT4_X11
|
||||||
buttonDown = false;
|
buttonDown = false;
|
||||||
emit activate();
|
emit activate();
|
||||||
bool me = movingEnabled;
|
bool me = movingEnabled;
|
||||||
|
@ -281,7 +281,7 @@ void tst_QPixmap::fromImage()
|
|||||||
image.fill(0x7f7f7f7f);
|
image.fill(0x7f7f7f7f);
|
||||||
|
|
||||||
const QPixmap pixmap = QPixmap::fromImage(image);
|
const QPixmap pixmap = QPixmap::fromImage(image);
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
if (pixmap.handle()->classId() == QPlatformPixmap::X11Class && !pixmap.x11PictureHandle())
|
if (pixmap.handle()->classId() == QPlatformPixmap::X11Class && !pixmap.x11PictureHandle())
|
||||||
QSKIP("Requires XRender support");
|
QSKIP("Requires XRender support");
|
||||||
#endif
|
#endif
|
||||||
@ -510,7 +510,7 @@ void tst_QPixmap::fill()
|
|||||||
else
|
else
|
||||||
pm = QPixmap(400, 400);
|
pm = QPixmap(400, 400);
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
if (!bitmap && pm.handle()->classId() == QPlatformPixmap::X11Class && !pm.x11PictureHandle())
|
if (!bitmap && pm.handle()->classId() == QPlatformPixmap::X11Class && !pm.x11PictureHandle())
|
||||||
QSKIP("Requires XRender support");
|
QSKIP("Requires XRender support");
|
||||||
#endif
|
#endif
|
||||||
@ -540,7 +540,7 @@ void tst_QPixmap::fill()
|
|||||||
void tst_QPixmap::fill_transparent()
|
void tst_QPixmap::fill_transparent()
|
||||||
{
|
{
|
||||||
QPixmap pixmap(10, 10);
|
QPixmap pixmap(10, 10);
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
if (pixmap.handle()->classId() == QPlatformPixmap::X11Class && !pixmap.x11PictureHandle())
|
if (pixmap.handle()->classId() == QPlatformPixmap::X11Class && !pixmap.x11PictureHandle())
|
||||||
QSKIP("Requires XRender support");
|
QSKIP("Requires XRender support");
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,7 +102,7 @@ private slots:
|
|||||||
|
|
||||||
void achromaticHslHue();
|
void achromaticHslHue();
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
void setallowX11ColorNames();
|
void setallowX11ColorNames();
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -1373,7 +1373,7 @@ void tst_QColor::achromaticHslHue()
|
|||||||
QCOMPARE(hsl.hslHue(), -1);
|
QCOMPARE(hsl.hslHue(), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
void tst_QColor::setallowX11ColorNames()
|
void tst_QColor::setallowX11ColorNames()
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_IRIX)
|
#if defined(Q_OS_IRIX)
|
||||||
|
@ -501,7 +501,7 @@ void tst_QPainter::drawPixmap_comp()
|
|||||||
destPm.fill(c1);
|
destPm.fill(c1);
|
||||||
srcPm.fill(c2);
|
srcPm.fill(c2);
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
if (!destPm.x11PictureHandle())
|
if (!destPm.x11PictureHandle())
|
||||||
QSKIP("Requires XRender support");
|
QSKIP("Requires XRender support");
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <qbitmap.h>
|
#include <qbitmap.h>
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
#include <qpolygon.h>
|
#include <qpolygon.h>
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
#include <private/qt_x11_p.h>
|
#include <private/qt_x11_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ private slots:
|
|||||||
|
|
||||||
void isEmpty_data();
|
void isEmpty_data();
|
||||||
void isEmpty();
|
void isEmpty();
|
||||||
#if defined(Q_WS_X11) && defined(QT_BUILD_INTERNAL)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11) && defined(QT_BUILD_INTERNAL)
|
||||||
void clipRectangles();
|
void clipRectangles();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -848,7 +848,7 @@ void tst_QRegion::isEmpty()
|
|||||||
QVERIFY(region.rects().isEmpty());
|
QVERIFY(region.rects().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_WS_X11) && defined(QT_BUILD_INTERNAL)
|
#if defined(Q_DEAD_CODE_FROM_QT4_X11) && defined(QT_BUILD_INTERNAL)
|
||||||
void tst_QRegion::clipRectangles()
|
void tst_QRegion::clipRectangles()
|
||||||
{
|
{
|
||||||
QRegion region(30, 30, 30, 30);
|
QRegion region(30, 30, 30, 30);
|
||||||
|
@ -728,7 +728,7 @@ void tst_QGLThreads::painterOnPixmapInThread()
|
|||||||
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)
|
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)
|
||||||
|| !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedPixmaps))
|
|| !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedPixmaps))
|
||||||
QSKIP("No platformsupport for ThreadedOpenGL or ThreadedPixmaps");
|
QSKIP("No platformsupport for ThreadedOpenGL or ThreadedPixmaps");
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
QSKIP("Drawing text in threads onto X11 drawables currently crashes on some X11 servers.");
|
QSKIP("Drawing text in threads onto X11 drawables currently crashes on some X11 servers.");
|
||||||
#endif
|
#endif
|
||||||
PaintThreadManager<PixmapWrapper> painterThreads(5);
|
PaintThreadManager<PixmapWrapper> painterThreads(5);
|
||||||
|
@ -2385,7 +2385,7 @@ void PaintCommands::command_surface_begin(QRegExp re)
|
|||||||
m_painter = new QPainter(m_surface_glpaintdevice);
|
m_painter = new QPainter(m_surface_glpaintdevice);
|
||||||
m_painter->fillRect(QRect(0, 0, qRound(w), qRound(h)), Qt::transparent);
|
m_painter->fillRect(QRect(0, 0, qRound(w), qRound(h)), Qt::transparent);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
} else if (m_type == WidgetType) {
|
} else if (m_type == WidgetType) {
|
||||||
m_surface_pixmap = QPixmap(qRound(w), qRound(h));
|
m_surface_pixmap = QPixmap(qRound(w), qRound(h));
|
||||||
m_surface_pixmap.fill(Qt::transparent);
|
m_surface_pixmap.fill(Qt::transparent);
|
||||||
@ -2436,7 +2436,7 @@ void PaintCommands::command_surface_end(QRegExp)
|
|||||||
m_painter->beginNativePainting();
|
m_painter->beginNativePainting();
|
||||||
m_painter->endNativePainting();
|
m_painter->endNativePainting();
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
} else if (m_type == WidgetType) {
|
} else if (m_type == WidgetType) {
|
||||||
m_painter->drawPixmap(m_surface_rect.topLeft(), m_surface_pixmap);
|
m_painter->drawPixmap(m_surface_rect.topLeft(), m_surface_pixmap);
|
||||||
m_surface_pixmap = QPixmap();
|
m_surface_pixmap = QPixmap();
|
||||||
|
@ -2780,7 +2780,7 @@ void tst_QGraphicsProxyWidget::windowOpacity()
|
|||||||
// disabled on platforms without alpha channel support in QPixmap (e.g.,
|
// disabled on platforms without alpha channel support in QPixmap (e.g.,
|
||||||
// X11 without XRender).
|
// X11 without XRender).
|
||||||
int paints = 0;
|
int paints = 0;
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
paints = !X11->use_xrender;
|
paints = !X11->use_xrender;
|
||||||
#endif
|
#endif
|
||||||
QTRY_COMPARE(eventSpy.counts[QEvent::UpdateRequest], 0);
|
QTRY_COMPARE(eventSpy.counts[QEvent::UpdateRequest], 0);
|
||||||
|
@ -1117,7 +1117,7 @@ void tst_QAbstractItemView::setItemDelegate()
|
|||||||
centerOnScreen(&v);
|
centerOnScreen(&v);
|
||||||
moveCursorAway(&v);
|
moveCursorAway(&v);
|
||||||
v.show();
|
v.show();
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
QCursor::setPos(v.geometry().center());
|
QCursor::setPos(v.geometry().center());
|
||||||
#endif
|
#endif
|
||||||
QApplication::setActiveWindow(&v);
|
QApplication::setActiveWindow(&v);
|
||||||
|
@ -336,7 +336,7 @@ void tst_QWidget_window::tst_windowFilePath()
|
|||||||
|
|
||||||
void tst_QWidget_window::tst_showWithoutActivating()
|
void tst_QWidget_window::tst_showWithoutActivating()
|
||||||
{
|
{
|
||||||
#ifndef Q_WS_X11
|
#ifndef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
QSKIP("This test is X11-only.");
|
QSKIP("This test is X11-only.");
|
||||||
#else
|
#else
|
||||||
QWidget w;
|
QWidget w;
|
||||||
@ -359,7 +359,7 @@ void tst_QWidget_window::tst_showWithoutActivating()
|
|||||||
// Note the use of the , before window because we want the XGetInputFocus to be re-executed
|
// Note the use of the , before window because we want the XGetInputFocus to be re-executed
|
||||||
// in each iteration of the inside loop of the QTRY_COMPARE macro
|
// in each iteration of the inside loop of the QTRY_COMPARE macro
|
||||||
|
|
||||||
#endif // Q_WS_X11
|
#endif // Q_DEAD_CODE_FROM_QT4_X11
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QWidget_window::tst_paintEventOnSecondShow()
|
void tst_QWidget_window::tst_paintEventOnSecondShow()
|
||||||
|
@ -487,7 +487,7 @@ void tst_QMdiArea::subWindowActivated2()
|
|||||||
// Check that we only emit _one_ signal and the active window
|
// Check that we only emit _one_ signal and the active window
|
||||||
// is unchanged after hide/show.
|
// is unchanged after hide/show.
|
||||||
mdiArea.hide();
|
mdiArea.hide();
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
qt_x11_wait_for_window_manager(&mdiArea);
|
qt_x11_wait_for_window_manager(&mdiArea);
|
||||||
#endif
|
#endif
|
||||||
QTest::qWait(100);
|
QTest::qWait(100);
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
#include "../../../qtest-config.h"
|
#include "../../../qtest-config.h"
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
#if !defined(Q_WS_WIN)
|
#if !defined(Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
extern bool qt_tab_all_widgets();
|
extern bool qt_tab_all_widgets();
|
||||||
#endif
|
#endif
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
#define CALLGRIND_START_INSTRUMENTATION {}
|
#define CALLGRIND_START_INSTRUMENTATION {}
|
||||||
#define CALLGRIND_STOP_INSTRUMENTATION {}
|
#define CALLGRIND_STOP_INSTRUMENTATION {}
|
||||||
#else
|
#else
|
||||||
|
@ -32,14 +32,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
#define CALLGRIND_START_INSTRUMENTATION {}
|
#define CALLGRIND_START_INSTRUMENTATION {}
|
||||||
#define CALLGRIND_STOP_INSTRUMENTATION {}
|
#define CALLGRIND_STOP_INSTRUMENTATION {}
|
||||||
#else
|
#else
|
||||||
#include "valgrind/callgrind.h"
|
#include "valgrind/callgrind.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
extern void qt_x11_wait_for_window_manager(QWidget *);
|
extern void qt_x11_wait_for_window_manager(QWidget *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
|
|||||||
View view(&scene, item);
|
View view(&scene, item);
|
||||||
view.resize(300, 300);
|
view.resize(300, 300);
|
||||||
view.show();
|
view.show();
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_DEAD_CODE_FROM_QT4_X11
|
||||||
qt_x11_wait_for_window_manager(&view);
|
qt_x11_wait_for_window_manager(&view);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_DEAD_CODE_FROM_QT4_WIN
|
||||||
#define CALLGRIND_START_INSTRUMENTATION {}
|
#define CALLGRIND_START_INSTRUMENTATION {}
|
||||||
#define CALLGRIND_STOP_INSTRUMENTATION {}
|
#define CALLGRIND_STOP_INSTRUMENTATION {}
|
||||||
#else
|
#else
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#include "ui_detailedinfodialog.h"
|
#include "ui_detailedinfodialog.h"
|
||||||
|
|
||||||
#if defined(Q_WS_MAEMO_6)
|
#if defined(Q_DEAD_CODE_FROM_QT4_MAEMO_6)
|
||||||
#include "ui_bearerex_maemo.h"
|
#include "ui_bearerex_maemo.h"
|
||||||
#include "ui_sessiondialog_maemo.h"
|
#include "ui_sessiondialog_maemo.h"
|
||||||
#else
|
#else
|
||||||
|
@ -332,7 +332,7 @@ int main(int argc, char **argv)
|
|||||||
checkers_background = false;
|
checkers_background = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if defined (Q_WS_WIN)
|
#if defined (Q_DEAD_CODE_FROM_QT4_WIN)
|
||||||
QString input = QString::fromLocal8Bit(argv[i]);
|
QString input = QString::fromLocal8Bit(argv[i]);
|
||||||
if (input.indexOf('*') >= 0) {
|
if (input.indexOf('*') >= 0) {
|
||||||
QFileInfo info(input);
|
QFileInfo info(input);
|
||||||
|
@ -165,7 +165,7 @@ bool dumpHtml(const QString &pathName)
|
|||||||
QString platformName = QString::fromLatin1(
|
QString platformName = QString::fromLatin1(
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
"Win32"
|
"Win32"
|
||||||
#elif defined(Q_WS_X11)
|
#elif defined(Q_DEAD_CODE_FROM_QT4_X11)
|
||||||
"X11"
|
"X11"
|
||||||
#else
|
#else
|
||||||
""
|
""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user