Convert features.dockwidget to QT_[REQUIRE_]CONFIG
Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
4d70a501db
commit
2d02c4c799
|
|
@ -215,7 +215,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
|||
} else if (classname == QLatin1String("QCalendarWidget")) {
|
||||
iface = new QAccessibleCalendarWidget(widget);
|
||||
#endif
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
} else if (classname == QLatin1String("QDockWidget")) {
|
||||
iface = new QAccessibleDockWidget(widget);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -68,9 +68,11 @@
|
|||
#if QT_CONFIG(itemviews)
|
||||
#include <QAbstractItemView>
|
||||
#endif
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
#include <private/qdockwidget_p.h>
|
||||
#endif
|
||||
#include <QMainWindow>
|
||||
#include <QFocusFrame>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
|
@ -567,7 +569,7 @@ QWidget *QAccessibleCalendarWidget::navigationBar() const
|
|||
}
|
||||
#endif // QT_CONFIG(calendarwidget)
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
|
||||
// Dock Widget - order of children:
|
||||
// - Content widget
|
||||
|
|
@ -648,7 +650,7 @@ QString QAccessibleDockWidget::text(QAccessible::Text t) const
|
|||
}
|
||||
return QString();
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
#ifndef QT_NO_CURSOR
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ private:
|
|||
};
|
||||
#endif // QT_CONFIG(calendarwidget)
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
class QAccessibleDockWidget: public QAccessibleWidget
|
||||
{
|
||||
public:
|
||||
|
|
@ -302,7 +302,7 @@ protected:
|
|||
QDockWidgetLayout *dockWidgetLayout() const;
|
||||
};
|
||||
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
#ifndef QT_NO_MAINWINDOW
|
||||
class QAccessibleMainWindow : public QAccessibleWidget
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@
|
|||
#include <qpa/qplatformtheme.h>
|
||||
#include <qbitmap.h>
|
||||
#include <qcache.h>
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <qdockwidget.h>
|
||||
#endif
|
||||
#include <qdrawutil.h>
|
||||
#if QT_CONFIG(dialogbuttonbox)
|
||||
#include <qdialogbuttonbox.h>
|
||||
|
|
@ -454,7 +456,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
|||
}
|
||||
break;
|
||||
#endif // QT_NO_GROUPBOX
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case PE_FrameDockWidget:
|
||||
if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
||||
int lw = frame->lineWidth;
|
||||
|
|
@ -464,7 +466,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
|||
qDrawShadePanel(p, frame->rect, frame->palette, false, lw);
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TOOLBAR
|
||||
case PE_IndicatorToolBarHandle:
|
||||
p->save();
|
||||
|
|
@ -2040,7 +2042,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
|||
}
|
||||
break; }
|
||||
#endif // QT_CONFIG(rubberband)
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case CE_DockWidgetTitle:
|
||||
if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
|
||||
QRect r = dwOpt->rect.adjusted(0, 0, -1, -1);
|
||||
|
|
@ -2072,7 +2074,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
|||
}
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
case CE_Header:
|
||||
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)) {
|
||||
QRegion clipRegion = p->clipRegion();
|
||||
|
|
@ -2923,7 +2925,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
r = f->rect.adjusted(frameWidth, frameWidth, -frameWidth, -frameWidth);
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case SE_DockWidgetCloseButton:
|
||||
case SE_DockWidgetFloatButton:
|
||||
case SE_DockWidgetTitleBarText:
|
||||
|
|
@ -3443,7 +3445,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
|
|||
ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarCloseButton, widget);
|
||||
down = tb->activeSubControls & SC_TitleBarCloseButton && (opt->state & State_Sunken);
|
||||
if ((tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
|| qobject_cast<const QDockWidget *>(widget)
|
||||
#endif
|
||||
)
|
||||
|
|
@ -4416,7 +4418,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
|
|||
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) {
|
||||
if ((tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool) {
|
||||
ret = qMax(widget ? widget->fontMetrics().height() : opt->fontMetrics.height(), 16);
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
} else if (qobject_cast<const QDockWidget*>(widget)) {
|
||||
ret = qMax(widget->fontMetrics().height(), int(QStyleHelper::dpiScaled(13)));
|
||||
#endif
|
||||
|
|
@ -4528,7 +4530,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
|
|||
}
|
||||
break;
|
||||
#endif // QT_NO_SLIDER
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case PM_DockWidgetSeparatorExtent:
|
||||
ret = int(QStyleHelper::dpiScaled(6.));
|
||||
break;
|
||||
|
|
@ -4542,7 +4544,7 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
|
|||
case PM_DockWidgetFrameWidth:
|
||||
ret = 1;
|
||||
break;
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
case PM_SpinBoxSliderHeight:
|
||||
case PM_MenuBarPanelWidth:
|
||||
|
|
|
|||
|
|
@ -62,7 +62,9 @@
|
|||
#if QT_CONFIG(dialogbuttonbox)
|
||||
#include <qdialogbuttonbox.h>
|
||||
#endif
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <qdockwidget.h>
|
||||
#endif
|
||||
#include <qevent.h>
|
||||
#include <qfocusframe.h>
|
||||
#include <qformlayout.h>
|
||||
|
|
@ -4319,7 +4321,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case CE_DockWidgetTitle:
|
||||
if (const QDockWidget *dockWidget = qobject_cast<const QDockWidget *>(w)) {
|
||||
bool floating = dockWidget->isFloating();
|
||||
|
|
@ -5226,7 +5228,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case SE_DockWidgetCloseButton:
|
||||
case SE_DockWidgetFloatButton:
|
||||
case SE_DockWidgetTitleBarText:
|
||||
|
|
|
|||
|
|
@ -62,7 +62,9 @@
|
|||
#if QT_CONFIG(dialogbuttonbox)
|
||||
#include <qdialogbuttonbox.h>
|
||||
#endif
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <qdockwidget.h>
|
||||
#endif
|
||||
#include <qevent.h>
|
||||
#include <qfocusframe.h>
|
||||
#include <qformlayout.h>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@
|
|||
#include <qtabbar.h>
|
||||
#include <QMetaProperty>
|
||||
#include <qmainwindow.h>
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <qdockwidget.h>
|
||||
#endif
|
||||
#include <qmdisubwindow.h>
|
||||
#if QT_CONFIG(dialog)
|
||||
#include <qdialog.h>
|
||||
|
|
@ -1721,7 +1723,7 @@ static quint64 pseudoClass(QStyle::State state)
|
|||
|
||||
static void qt_check_if_internal_object(const QObject **obj, int *element)
|
||||
{
|
||||
#ifdef QT_NO_DOCKWIDGET
|
||||
#if !QT_CONFIG(dockwidget)
|
||||
Q_UNUSED(obj);
|
||||
Q_UNUSED(element);
|
||||
#else
|
||||
|
|
@ -1996,7 +1998,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
|
|||
extraClass |= PseudoClass_PreviousSelected;
|
||||
}
|
||||
#endif // QT_NO_TOOLBOX
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
else if (const QStyleOptionDockWidget *dw = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
|
||||
if (dw->verticalTitleBar)
|
||||
extraClass |= PseudoClass_Vertical;
|
||||
|
|
@ -2009,7 +2011,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
|
|||
if (dw->movable)
|
||||
extraClass |= PseudoClass_Movable;
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
#if QT_CONFIG(itemviews)
|
||||
else if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
if (vopt->features & QStyleOptionViewItem::Alternate)
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
|
|||
case PE_FrameButtonTool:
|
||||
case PE_PanelButtonTool: {
|
||||
QPen oldPen = p->pen();
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (w && w->inherits("QDockWidgetTitleButton")) {
|
||||
if (const QWidget *dw = w->parentWidget())
|
||||
if (dw->isWindow()){
|
||||
|
|
@ -727,7 +727,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
QBrush fill;
|
||||
bool stippled;
|
||||
bool panel = (pe == PE_PanelButtonTool);
|
||||
|
|
@ -1022,7 +1022,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
|
|||
popupPal.setColor(QPalette::Midlight, opt->palette.light().color());
|
||||
qDrawWinPanel(p, opt->rect, popupPal, opt->state & State_Sunken);
|
||||
break; }
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case PE_IndicatorDockWidgetResizeHandle:
|
||||
break;
|
||||
case PE_FrameDockWidget:
|
||||
|
|
@ -1030,7 +1030,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
|
|||
proxy()->drawPrimitive(QStyle::PE_FrameWindow, opt, p, w);
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
case PE_FrameStatusBarItem:
|
||||
qDrawShadePanel(p, opt->rect, opt->palette, true, 1, 0);
|
||||
|
|
@ -1784,7 +1784,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
|
|||
}
|
||||
break;
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case CE_DockWidgetTitle:
|
||||
|
||||
if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
|
||||
|
|
@ -1858,7 +1858,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
|
|||
p->restore();
|
||||
}
|
||||
return;
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
#if QT_CONFIG(combobox)
|
||||
case CE_ComboBoxLabel:
|
||||
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,9 @@
|
|||
#endif
|
||||
#include <qscrollbar.h>
|
||||
#include <qprogressbar.h>
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <qdockwidget.h>
|
||||
#endif
|
||||
#if QT_CONFIG(listview)
|
||||
#include <qlistview.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2290,7 +2290,7 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op
|
|||
drawItemText(p, mbi->rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, textRole);
|
||||
}
|
||||
return;
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case CE_DockWidgetTitle:
|
||||
if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(option))
|
||||
{
|
||||
|
|
@ -2415,7 +2415,7 @@ void QWindowsXPStyle::drawControl(ControlElement element, const QStyleOption *op
|
|||
return;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
#if QT_CONFIG(rubberband)
|
||||
case CE_RubberBand:
|
||||
if (qstyleoption_cast<const QStyleOptionRubberBand *>(option)) {
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@
|
|||
#include <qpainter.h>
|
||||
#include <qstyleoption.h>
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// qmainwindow.cpp
|
||||
|
|
@ -3483,5 +3481,3 @@ void QDockAreaLayout::styleChangedEvent()
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
#include "QtCore/qvector.h"
|
||||
#include "QtWidgets/qlayout.h"
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
QT_REQUIRE_CONFIG(dockwidget);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -310,6 +310,4 @@ public:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_QDOCKWIDGET
|
||||
|
||||
#endif // QDOCKAREALAYOUT_P_H
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "qdockwidget.h"
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#include <qaction.h>
|
||||
#include <qapplication.h>
|
||||
#include <qdesktopwidget.h>
|
||||
|
|
@ -1695,5 +1694,3 @@ QT_END_NAMESPACE
|
|||
#include "qdockwidget.moc"
|
||||
#include "moc_qdockwidget.cpp"
|
||||
#include "moc_qdockwidget_p.cpp"
|
||||
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
|
|
|
|||
|
|
@ -43,11 +43,10 @@
|
|||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qwidget.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(dockwidget);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
|
||||
class QDockAreaLayout;
|
||||
class QDockWidgetPrivate;
|
||||
class QMainWindow;
|
||||
|
|
@ -134,8 +133,6 @@ private:
|
|||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QDockWidget::DockWidgetFeatures)
|
||||
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QDYNAMICDOCKWIDGET_H
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
#include "QtWidgets/qboxlayout.h"
|
||||
#include "QtWidgets/qdockwidget.h"
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
QT_REQUIRE_CONFIG(dockwidget);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -204,6 +204,4 @@ inline QDockWidgetLayout *QDockWidgetItem::dockWidgetLayout() const
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
|
||||
#endif // QDYNAMICDOCKWIDGET_P_H
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@
|
|||
|
||||
#ifndef QT_NO_MAINWINDOW
|
||||
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include "qdockwidget.h"
|
||||
#endif
|
||||
#include "qtoolbar.h"
|
||||
|
||||
#include <qapplication.h>
|
||||
|
|
@ -84,7 +86,7 @@ public:
|
|||
, useHIToolBar(false)
|
||||
, activateUnifiedToolbarAfterFullScreen(false)
|
||||
#endif
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_CURSOR)
|
||||
, hasOldCursor(false) , cursorAdjusted(false)
|
||||
#endif
|
||||
{ }
|
||||
|
|
@ -103,7 +105,7 @@ public:
|
|||
QList<int> hoverSeparator;
|
||||
QPoint hoverPos;
|
||||
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_CURSOR)
|
||||
QCursor separatorCursor(const QList<int> &path) const;
|
||||
void adjustCursor(const QPoint &pos);
|
||||
QCursor oldCursor;
|
||||
|
|
@ -377,7 +379,7 @@ void QMainWindowPrivate::init()
|
|||
\sa setToolButtonStyle()
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
/*!
|
||||
\fn void QMainWindow::tabifiedDockWidgetActivated(QDockWidget *dockWidget)
|
||||
|
||||
|
|
@ -689,7 +691,7 @@ QWidget *QMainWindow::takeCentralWidget()
|
|||
return oldcentralwidget;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
/*!
|
||||
Sets the given dock widget \a area to occupy the specified \a
|
||||
corner.
|
||||
|
|
@ -795,12 +797,12 @@ void QMainWindow::addToolBar(Qt::ToolBarArea area, QToolBar *toolbar)
|
|||
|
||||
if(toolbar->d_func()->state && toolbar->d_func()->state->dragging) {
|
||||
//removing a toolbar which is dragging will cause crash
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
bool animated = isAnimated();
|
||||
setAnimated(false);
|
||||
#endif
|
||||
toolbar->d_func()->endDrag();
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
setAnimated(animated);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -903,7 +905,7 @@ bool QMainWindow::toolBarBreak(QToolBar *toolbar) const
|
|||
|
||||
#endif // QT_NO_TOOLBAR
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
|
||||
/*! \property QMainWindow::animated
|
||||
\brief whether manipulating dock widgets and tool bars is animated
|
||||
|
|
@ -1280,7 +1282,7 @@ void QMainWindow::resizeDocks(const QList<QDockWidget *> &docks,
|
|||
}
|
||||
|
||||
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
/*!
|
||||
Saves the current state of this mainwindow's toolbars and
|
||||
|
|
@ -1344,7 +1346,7 @@ bool QMainWindow::restoreState(const QByteArray &state, int version)
|
|||
return restored;
|
||||
}
|
||||
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_CURSOR)
|
||||
QCursor QMainWindowPrivate::separatorCursor(const QList<int> &path) const
|
||||
{
|
||||
QDockAreaLayoutInfo *info = layout->layoutState.dockAreaLayout.info(path);
|
||||
|
|
@ -1426,7 +1428,7 @@ bool QMainWindow::event(QEvent *event)
|
|||
Q_D(QMainWindow);
|
||||
switch (event->type()) {
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case QEvent::Paint: {
|
||||
QPainter p(this);
|
||||
QRegion r = static_cast<QPaintEvent*>(event)->region();
|
||||
|
|
@ -1510,7 +1512,7 @@ bool QMainWindow::event(QEvent *event)
|
|||
#endif // QT_CONFIG(statustip)
|
||||
|
||||
case QEvent::StyleChange:
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
d->layout->layoutState.dockAreaLayout.styleChangedEvent();
|
||||
#endif
|
||||
if (!d->explicitIconSize)
|
||||
|
|
@ -1536,7 +1538,7 @@ bool QMainWindow::event(QEvent *event)
|
|||
}
|
||||
break;
|
||||
#endif
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_CURSOR)
|
||||
case QEvent::CursorChange:
|
||||
// CursorChange events are triggered as mouse moves to new widgets even
|
||||
// if the cursor doesn't actually change, so do not change oldCursor if
|
||||
|
|
@ -1639,7 +1641,7 @@ bool QMainWindow::unifiedTitleAndToolBarOnMac() const
|
|||
*/
|
||||
bool QMainWindow::isSeparator(const QPoint &pos) const
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
Q_D(const QMainWindow);
|
||||
return !d->layout->layoutState.dockAreaLayout.findSeparator(pos).isEmpty();
|
||||
#else
|
||||
|
|
@ -1666,7 +1668,7 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (QDockWidget *dw = qobject_cast<QDockWidget *>(child)) {
|
||||
if (dw->parentWidget() != this)
|
||||
return;
|
||||
|
|
@ -1677,7 +1679,7 @@ void QMainWindow::contextMenuEvent(QContextMenuEvent *event)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TOOLBAR
|
||||
if (QToolBar *tb = qobject_cast<QToolBar *>(child)) {
|
||||
if (tb->parentWidget() != this)
|
||||
|
|
@ -1725,7 +1727,7 @@ QMenu *QMainWindow::createPopupMenu()
|
|||
{
|
||||
Q_D(QMainWindow);
|
||||
QMenu *menu = 0;
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
QList<QDockWidget *> dockwidgets = findChildren<QDockWidget *>();
|
||||
if (dockwidgets.size()) {
|
||||
menu = new QMenu(this);
|
||||
|
|
@ -1748,7 +1750,7 @@ QMenu *QMainWindow::createPopupMenu()
|
|||
}
|
||||
menu->addSeparator();
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TOOLBAR
|
||||
QList<QToolBar *> toolbars = findChildren<QToolBar *>();
|
||||
if (toolbars.size()) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class Q_WIDGETS_EXPORT QMainWindow : public QWidget
|
|||
|
||||
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
|
||||
Q_PROPERTY(Qt::ToolButtonStyle toolButtonStyle READ toolButtonStyle WRITE setToolButtonStyle)
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
Q_PROPERTY(bool animated READ isAnimated WRITE setAnimated)
|
||||
#ifndef QT_NO_TABBAR
|
||||
Q_PROPERTY(bool documentMode READ documentMode WRITE setDocumentMode)
|
||||
|
|
@ -73,7 +73,7 @@ class Q_WIDGETS_EXPORT QMainWindow : public QWidget
|
|||
Q_PROPERTY(QTabWidget::TabShape tabShape READ tabShape WRITE setTabShape)
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
Q_PROPERTY(bool dockNestingEnabled READ isDockNestingEnabled WRITE setDockNestingEnabled)
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
Q_PROPERTY(DockOptions dockOptions READ dockOptions WRITE setDockOptions)
|
||||
#ifndef QT_NO_TOOLBAR
|
||||
Q_PROPERTY(bool unifiedTitleAndToolBarOnMac READ unifiedTitleAndToolBarOnMac WRITE setUnifiedTitleAndToolBarOnMac)
|
||||
|
|
@ -101,7 +101,7 @@ public:
|
|||
Qt::ToolButtonStyle toolButtonStyle() const;
|
||||
void setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle);
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
bool isAnimated() const;
|
||||
bool isDockNestingEnabled() const;
|
||||
#endif
|
||||
|
|
@ -141,7 +141,7 @@ public:
|
|||
|
||||
QWidget *takeCentralWidget();
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
void setCorner(Qt::Corner corner, Qt::DockWidgetArea area);
|
||||
Qt::DockWidgetArea corner(Qt::Corner corner) const;
|
||||
#endif
|
||||
|
|
@ -162,7 +162,7 @@ public:
|
|||
Qt::ToolBarArea toolBarArea(QToolBar *toolbar) const;
|
||||
bool toolBarBreak(QToolBar *toolbar) const;
|
||||
#endif
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
void addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget);
|
||||
void addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget,
|
||||
Qt::Orientation orientation);
|
||||
|
|
@ -177,7 +177,7 @@ public:
|
|||
|
||||
void resizeDocks(const QList<QDockWidget *> &docks,
|
||||
const QList<int> &sizes, Qt::Orientation orientation);
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
QByteArray saveState(int version = 0) const;
|
||||
bool restoreState(const QByteArray &state, int version = 0);
|
||||
|
|
@ -187,7 +187,7 @@ public:
|
|||
#endif
|
||||
|
||||
public Q_SLOTS:
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
void setAnimated(bool enabled);
|
||||
void setDockNestingEnabled(bool enabled);
|
||||
#endif
|
||||
|
|
@ -198,7 +198,7 @@ public Q_SLOTS:
|
|||
Q_SIGNALS:
|
||||
void iconSizeChanged(const QSize &iconSize);
|
||||
void toolButtonStyleChanged(Qt::ToolButtonStyle toolButtonStyle);
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
void tabifiedDockWidgetActivated(QDockWidget *dockWidget);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -39,11 +39,13 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "qmainwindowlayout_p.h"
|
||||
#include "qdockarealayout_p.h"
|
||||
|
||||
#ifndef QT_NO_MAINWINDOW
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include "qdockarealayout_p.h"
|
||||
#include "qdockwidget.h"
|
||||
#include "qdockwidget_p.h"
|
||||
#endif
|
||||
#include "qtoolbar_p.h"
|
||||
#include "qmainwindow.h"
|
||||
#include "qtoolbar.h"
|
||||
|
|
@ -85,7 +87,7 @@ extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window);
|
|||
** debug
|
||||
*/
|
||||
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_DEBUG_STREAM)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_DEBUG_STREAM)
|
||||
|
||||
static void dumpLayout(QTextStream &qout, const QDockAreaLayoutInfo &layout, QString indent);
|
||||
|
||||
|
|
@ -174,7 +176,7 @@ QDebug operator<<(QDebug debug, const QMainWindowLayout *layout)
|
|||
return debug;
|
||||
}
|
||||
|
||||
#endif // !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_DEBUG)
|
||||
#endif // QT_CONFIG(dockwidget) && !defined(QT_NO_DEBUG)
|
||||
|
||||
/******************************************************************************
|
||||
** QDockWidgetGroupWindow
|
||||
|
|
@ -183,7 +185,7 @@ QDebug operator<<(QDebug debug, const QMainWindowLayout *layout)
|
|||
// dockwidgets are dragged together (QMainWindow::GroupedDragging feature).
|
||||
// QDockWidgetGroupLayout is the layout of that window and use a QDockAreaLayoutInfo to layout
|
||||
// the tabs inside it.
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
class QDockWidgetGroupLayout : public QLayout {
|
||||
QDockAreaLayoutInfo info;
|
||||
QWidgetResizeHandler *resizer;
|
||||
|
|
@ -462,7 +464,7 @@ QMainWindowLayoutState::QMainWindowLayoutState(QMainWindow *win)
|
|||
#ifndef QT_NO_TOOLBAR
|
||||
toolBarAreaLayout(win),
|
||||
#endif
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
dockAreaLayout(win)
|
||||
#else
|
||||
centralWidgetItem(0)
|
||||
|
|
@ -477,7 +479,7 @@ QSize QMainWindowLayoutState::sizeHint() const
|
|||
|
||||
QSize result(0, 0);
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
result = dockAreaLayout.sizeHint();
|
||||
#else
|
||||
if (centralWidgetItem != 0)
|
||||
|
|
@ -495,7 +497,7 @@ QSize QMainWindowLayoutState::minimumSize() const
|
|||
{
|
||||
QSize result(0, 0);
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
result = dockAreaLayout.minimumSize();
|
||||
#else
|
||||
if (centralWidgetItem != 0)
|
||||
|
|
@ -515,7 +517,7 @@ void QMainWindowLayoutState::apply(bool animated)
|
|||
toolBarAreaLayout.apply(animated);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
// dumpLayout(dockAreaLayout, QString());
|
||||
dockAreaLayout.apply(animated);
|
||||
#else
|
||||
|
|
@ -537,7 +539,7 @@ void QMainWindowLayoutState::fitLayout()
|
|||
r = toolBarAreaLayout.fitLayout();
|
||||
#endif // QT_NO_TOOLBAR
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
dockAreaLayout.rect = r;
|
||||
dockAreaLayout.fitLayout();
|
||||
#else
|
||||
|
|
@ -551,14 +553,14 @@ void QMainWindowLayoutState::deleteAllLayoutItems()
|
|||
toolBarAreaLayout.deleteAllLayoutItems();
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
dockAreaLayout.deleteAllLayoutItems();
|
||||
#endif
|
||||
}
|
||||
|
||||
void QMainWindowLayoutState::deleteCentralWidgetItem()
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
delete dockAreaLayout.centralWidgetItem;
|
||||
dockAreaLayout.centralWidgetItem = 0;
|
||||
#else
|
||||
|
|
@ -574,7 +576,7 @@ QLayoutItem *QMainWindowLayoutState::itemAt(int index, int *x) const
|
|||
return ret;
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (QLayoutItem *ret = dockAreaLayout.itemAt(x, index))
|
||||
return ret;
|
||||
#else
|
||||
|
|
@ -592,7 +594,7 @@ QLayoutItem *QMainWindowLayoutState::takeAt(int index, int *x)
|
|||
return ret;
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (QLayoutItem *ret = dockAreaLayout.takeAt(x, index))
|
||||
return ret;
|
||||
#else
|
||||
|
|
@ -620,7 +622,7 @@ QList<int> QMainWindowLayoutState::indexOf(QWidget *widget) const
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
// is it a dock widget?
|
||||
if (qobject_cast<QDockWidget *>(widget) || qobject_cast<QDockWidgetGroupWindow *>(widget)) {
|
||||
result = dockAreaLayout.indexOf(widget);
|
||||
|
|
@ -628,14 +630,14 @@ QList<int> QMainWindowLayoutState::indexOf(QWidget *widget) const
|
|||
result.prepend(1);
|
||||
return result;
|
||||
}
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool QMainWindowLayoutState::contains(QWidget *widget) const
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (dockAreaLayout.centralWidgetItem != 0 && dockAreaLayout.centralWidgetItem->widget() == widget)
|
||||
return true;
|
||||
if (!dockAreaLayout.indexOf(widget).isEmpty())
|
||||
|
|
@ -661,7 +663,7 @@ void QMainWindowLayoutState::setCentralWidget(QWidget *widget)
|
|||
if (widget != 0)
|
||||
item = new QWidgetItemV2(widget);
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
dockAreaLayout.centralWidgetItem = item;
|
||||
#else
|
||||
centralWidgetItem = item;
|
||||
|
|
@ -672,7 +674,7 @@ QWidget *QMainWindowLayoutState::centralWidget() const
|
|||
{
|
||||
QLayoutItem *item = 0;
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
item = dockAreaLayout.centralWidgetItem;
|
||||
#else
|
||||
item = centralWidgetItem;
|
||||
|
|
@ -698,7 +700,7 @@ QList<int> QMainWindowLayoutState::gapIndex(QWidget *widget,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
// is it a dock widget?
|
||||
if (qobject_cast<QDockWidget *>(widget) != 0
|
||||
|| qobject_cast<QDockWidgetGroupWindow *>(widget)) {
|
||||
|
|
@ -707,7 +709,7 @@ QList<int> QMainWindowLayoutState::gapIndex(QWidget *widget,
|
|||
result.prepend(1);
|
||||
return result;
|
||||
}
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -726,12 +728,12 @@ bool QMainWindowLayoutState::insertGap(const QList<int> &path, QLayoutItem *item
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (i == 1) {
|
||||
Q_ASSERT(qobject_cast<QDockWidget*>(item->widget()) || qobject_cast<QDockWidgetGroupWindow*>(item->widget()));
|
||||
return dockAreaLayout.insertGap(path.mid(1), item);
|
||||
}
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -745,10 +747,10 @@ void QMainWindowLayoutState::remove(const QList<int> &path)
|
|||
toolBarAreaLayout.remove(path.mid(1));
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (i == 1)
|
||||
dockAreaLayout.remove(path.mid(1));
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
}
|
||||
|
||||
void QMainWindowLayoutState::remove(QLayoutItem *item)
|
||||
|
|
@ -757,14 +759,14 @@ void QMainWindowLayoutState::remove(QLayoutItem *item)
|
|||
toolBarAreaLayout.remove(item);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
// is it a dock widget?
|
||||
if (QDockWidget *dockWidget = qobject_cast<QDockWidget *>(item->widget())) {
|
||||
QList<int> path = dockAreaLayout.indexOf(dockWidget);
|
||||
if (!path.isEmpty())
|
||||
dockAreaLayout.remove(path);
|
||||
}
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
}
|
||||
|
||||
void QMainWindowLayoutState::clear()
|
||||
|
|
@ -773,7 +775,7 @@ void QMainWindowLayoutState::clear()
|
|||
toolBarAreaLayout.clear();
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
dockAreaLayout.clear();
|
||||
#else
|
||||
centralWidgetRect = QRect();
|
||||
|
|
@ -799,10 +801,10 @@ QLayoutItem *QMainWindowLayoutState::item(const QList<int> &path)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (i == 1)
|
||||
return dockAreaLayout.item(path.mid(1)).widgetItem;
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -816,10 +818,10 @@ QRect QMainWindowLayoutState::itemRect(const QList<int> &path) const
|
|||
return toolBarAreaLayout.itemRect(path.mid(1));
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (i == 1)
|
||||
return dockAreaLayout.itemRect(path.mid(1));
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return QRect();
|
||||
}
|
||||
|
|
@ -833,10 +835,10 @@ QRect QMainWindowLayoutState::gapRect(const QList<int> &path) const
|
|||
return toolBarAreaLayout.itemRect(path.mid(1));
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (i == 1)
|
||||
return dockAreaLayout.gapRect(path.mid(1));
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return QRect();
|
||||
}
|
||||
|
|
@ -850,10 +852,10 @@ QLayoutItem *QMainWindowLayoutState::plug(const QList<int> &path)
|
|||
return toolBarAreaLayout.plug(path.mid(1));
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (i == 1)
|
||||
return dockAreaLayout.plug(path.mid(1));
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -869,17 +871,17 @@ QLayoutItem *QMainWindowLayoutState::unplug(const QList<int> &path, QMainWindowL
|
|||
return toolBarAreaLayout.unplug(path.mid(1), other ? &other->toolBarAreaLayout : 0);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (i == 1)
|
||||
return dockAreaLayout.unplug(path.mid(1));
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void QMainWindowLayoutState::saveState(QDataStream &stream) const
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
dockAreaLayout.saveState(stream);
|
||||
#ifndef QT_NO_TABBAR
|
||||
QList<QDockWidgetGroupWindow *> floatingTabs =
|
||||
|
|
@ -913,7 +915,7 @@ static QList<T> findChildrenHelper(const QObject *o)
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
static QList<QDockWidget*> allMyDockWidgets(const QWidget *mainWindow)
|
||||
{
|
||||
QList<QDockWidget*> result;
|
||||
|
|
@ -930,7 +932,7 @@ static QList<QDockWidget*> allMyDockWidgets(const QWidget *mainWindow)
|
|||
|
||||
return result;
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
//pre4.3 tests the format that was used before 4.3
|
||||
bool QMainWindowLayoutState::checkFormat(QDataStream &stream)
|
||||
|
|
@ -952,7 +954,7 @@ bool QMainWindowLayoutState::checkFormat(QDataStream &stream)
|
|||
break;
|
||||
#endif // QT_NO_TOOLBAR
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case QDockAreaLayout::DockWidgetStateMarker:
|
||||
{
|
||||
const auto dockWidgets = allMyDockWidgets(mainWindow);
|
||||
|
|
@ -973,7 +975,7 @@ bool QMainWindowLayoutState::checkFormat(QDataStream &stream)
|
|||
}
|
||||
break;
|
||||
#endif // QT_NO_TABBAR
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
default:
|
||||
//there was an error during the parsing
|
||||
return false;
|
||||
|
|
@ -1008,7 +1010,7 @@ bool QMainWindowLayoutState::restoreState(QDataStream &_stream,
|
|||
stream >> marker;
|
||||
switch(marker)
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
case QDockAreaLayout::DockWidgetStateMarker:
|
||||
{
|
||||
const auto dockWidgets = allMyDockWidgets(mainWindow);
|
||||
|
|
@ -1057,7 +1059,7 @@ bool QMainWindowLayoutState::restoreState(QDataStream &_stream,
|
|||
}
|
||||
break;
|
||||
#endif // QT_CONFIG(tabwidget)
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
#ifndef QT_NO_TOOLBAR
|
||||
case QToolBarAreaLayout::ToolBarStateMarker:
|
||||
|
|
@ -1358,7 +1360,7 @@ void QMainWindowLayout::toggleToolBarsVisible()
|
|||
** QMainWindowLayoutState - dock areas
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
|
||||
static QInternal::DockPosition toDockPos(Qt::DockWidgetArea area)
|
||||
{
|
||||
|
|
@ -1823,7 +1825,7 @@ void QMainWindowLayout::raise(QDockWidget *widget)
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
|
@ -1953,7 +1955,7 @@ void QMainWindowLayout::invalidate()
|
|||
minSize = szHint = QSize();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
void QMainWindowLayout::setCurrentHoveredFloat(QWidget *w)
|
||||
{
|
||||
if (currentHoveredFloat != w) {
|
||||
|
|
@ -1972,7 +1974,7 @@ void QMainWindowLayout::setCurrentHoveredFloat(QWidget *w)
|
|||
updateGapIndicator();
|
||||
}
|
||||
}
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
/******************************************************************************
|
||||
** QMainWindowLayout - remaining stuff
|
||||
|
|
@ -2030,7 +2032,7 @@ void QMainWindowLayout::revert(QLayoutItem *widgetItem)
|
|||
|
||||
bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (currentHoveredFloat) {
|
||||
QWidget *widget = widgetItem->widget();
|
||||
QList<int> previousPath = layoutState.indexOf(widget);
|
||||
|
|
@ -2087,7 +2089,7 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
|
|||
|
||||
QWidget *widget = widgetItem->widget();
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
// Let's remove the widget from any possible group window
|
||||
foreach (QDockWidgetGroupWindow *dwgw,
|
||||
parent()->findChildren<QDockWidgetGroupWindow*>(QString(), Qt::FindDirectChildrenOnly)) {
|
||||
|
|
@ -2109,7 +2111,7 @@ bool QMainWindowLayout::plug(QLayoutItem *widgetItem)
|
|||
pluggingWidget = widget;
|
||||
QRect globalRect = currentGapRect;
|
||||
globalRect.moveTopLeft(parentWidget()->mapToGlobal(globalRect.topLeft()));
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (qobject_cast<QDockWidget*>(widget) != 0) {
|
||||
QDockWidgetLayout *layout = qobject_cast<QDockWidgetLayout*>(widget->layout());
|
||||
if (layout->nativeWindowDeco()) {
|
||||
|
|
@ -2143,7 +2145,7 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
|
|||
|
||||
if (widget == pluggingWidget) {
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (QDockWidgetGroupWindow *dwgw = qobject_cast<QDockWidgetGroupWindow *>(widget)) {
|
||||
// When the animated widget was a QDockWidgetGroupWindow, it means each of the
|
||||
// embedded QDockWidget needs to be plugged back into the QMainWindow layout.
|
||||
|
|
@ -2217,7 +2219,7 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
|
|||
//and all the geometries (especially the one from the central widget) is correct
|
||||
layoutState.apply(false);
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TABBAR
|
||||
if (qobject_cast<QDockWidget*>(widget) != 0) {
|
||||
// info() might return null if the widget is destroyed while
|
||||
|
|
@ -2231,13 +2233,13 @@ void QMainWindowLayout::animationFinished(QWidget *widget)
|
|||
|
||||
if (!widgetAnimator.animating()) {
|
||||
//all animations are finished
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
|
||||
#ifndef QT_NO_TABBAR
|
||||
foreach (QTabBar *tab_bar, usedTabBars)
|
||||
tab_bar->show();
|
||||
#endif // QT_NO_TABBAR
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
}
|
||||
|
||||
updateGapIndicator();
|
||||
|
|
@ -2263,7 +2265,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
|
|||
, savedState(mainwindow)
|
||||
, dockOptions(QMainWindow::AnimatedDocks | QMainWindow::AllowTabbedDocks)
|
||||
, statusbar(0)
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TABBAR
|
||||
, _documentMode(false)
|
||||
, verticalTabsEnabled(false)
|
||||
|
|
@ -2271,7 +2273,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
|
|||
, _tabShape(QTabWidget::Rounded)
|
||||
#endif
|
||||
#endif
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
, widgetAnimator(this)
|
||||
, pluggingWidget(0)
|
||||
#if 0 // Used to be included in Qt4 for Q_WS_MAC
|
||||
|
|
@ -2281,7 +2283,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
|
|||
if (parentLayout)
|
||||
setParent(parentLayout);
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TABBAR
|
||||
sep = mainwindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, 0, mainwindow);
|
||||
#endif
|
||||
|
|
@ -2290,7 +2292,7 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLay
|
|||
for (int i = 0; i < QInternal::DockCount; ++i)
|
||||
tabPositions[i] = QTabWidget::South;
|
||||
#endif
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
pluggingWidget = 0;
|
||||
|
||||
setObjectName(mainwindow->objectName() + QLatin1String("_layout"));
|
||||
|
|
@ -2315,7 +2317,7 @@ void QMainWindowLayout::setDockOptions(QMainWindow::DockOptions opts)
|
|||
|
||||
dockOptions = opts;
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
setVerticalTabsEnabled(opts & QMainWindow::VerticalTabs);
|
||||
#endif
|
||||
|
||||
|
|
@ -2347,7 +2349,7 @@ void QMainWindowLayout::setCentralWidget(QWidget *widget)
|
|||
addChildWidget(widget);
|
||||
layoutState.setCentralWidget(widget);
|
||||
if (savedState.isValid()) {
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
savedState.dockAreaLayout.centralWidgetItem = layoutState.dockAreaLayout.centralWidgetItem;
|
||||
savedState.dockAreaLayout.fallbackToSizeHints = true;
|
||||
#else
|
||||
|
|
@ -2369,7 +2371,7 @@ void QMainWindowLayout::setCentralWidget(QWidget *widget)
|
|||
*/
|
||||
QLayoutItem *QMainWindowLayout::unplug(QWidget *widget, bool group)
|
||||
{
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_TABBAR)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_TABBAR)
|
||||
if (!widget->isWindow() && qobject_cast<const QDockWidgetGroupWindow *>(widget->parentWidget())) {
|
||||
if (group) {
|
||||
// We are just dragging a floating window as it, not need to do anything, we just have to
|
||||
|
|
@ -2397,7 +2399,7 @@ QLayoutItem *QMainWindowLayout::unplug(QWidget *widget, bool group)
|
|||
QRect r = layoutState.itemRect(path);
|
||||
savedState = layoutState;
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget)) {
|
||||
Q_ASSERT(path.constFirst() == 1);
|
||||
bool actualGroup = false;
|
||||
|
|
@ -2427,7 +2429,7 @@ QLayoutItem *QMainWindowLayout::unplug(QWidget *widget, bool group)
|
|||
dw->d_func()->unplug(r);
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TOOLBAR
|
||||
if (QToolBar *tb = qobject_cast<QToolBar*>(widget)) {
|
||||
tb->d_func()->unplug(r);
|
||||
|
|
@ -2490,7 +2492,7 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
|
|||
|
||||
QWidget *widget = widgetItem->widget();
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if ((dockOptions & QMainWindow::GroupedDragging) && (qobject_cast<QDockWidget*>(widget)
|
||||
|| qobject_cast<QDockWidgetGroupWindow *>(widget))) {
|
||||
|
||||
|
|
@ -2528,7 +2530,7 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
|
|||
}
|
||||
}
|
||||
setCurrentHoveredFloat(nullptr);
|
||||
#endif //QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
QPoint pos = parentWidget()->mapFromGlobal(mousePos);
|
||||
|
||||
|
|
@ -2540,7 +2542,7 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
|
|||
if (!path.isEmpty()) {
|
||||
bool allowed = false;
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (QDockWidget *dw = qobject_cast<QDockWidget*>(widget))
|
||||
allowed = dw->isAreaAllowed(toDockWidgetArea(path.at(1)));
|
||||
|
||||
|
|
@ -2587,7 +2589,7 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
|
|||
|
||||
currentGapRect = newState.gapRect(currentGapPos);
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
parentWidget()->update(layoutState.dockAreaLayout.separatorRegion());
|
||||
#endif
|
||||
layoutState = newState;
|
||||
|
|
@ -2666,7 +2668,7 @@ bool QMainWindowLayout::restoreState(QDataStream &stream)
|
|||
savedState.deleteAllLayoutItems();
|
||||
savedState.clear();
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (parentWidget()->isVisible()) {
|
||||
#ifndef QT_NO_TABBAR
|
||||
foreach (QTabBar *tab_bar, usedTabBars)
|
||||
|
|
@ -2674,7 +2676,7 @@ bool QMainWindowLayout::restoreState(QDataStream &stream)
|
|||
|
||||
#endif
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2697,7 +2699,7 @@ bool QMainWindowLayout::usesHIToolBar(QToolBar *toolbar) const
|
|||
|
||||
void QMainWindowLayout::timerEvent(QTimerEvent *e)
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
if (e->timerId() == separatorMoveTimer.timerId()) {
|
||||
//let's move the separators
|
||||
separatorMoveTimer.stop();
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@
|
|||
#include "private/qlayoutengine_p.h"
|
||||
#include "private/qwidgetanimator_p.h"
|
||||
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include "qdockarealayout_p.h"
|
||||
#endif
|
||||
#include "qtoolbararealayout_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
@ -72,7 +74,7 @@ QT_BEGIN_NAMESPACE
|
|||
class QToolBar;
|
||||
class QRubberBand;
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
class QDockWidgetGroupWindow : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -126,7 +128,7 @@ public:
|
|||
QToolBarAreaLayout toolBarAreaLayout;
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
QDockAreaLayout dockAreaLayout;
|
||||
#else
|
||||
QLayoutItem *centralWidgetItem;
|
||||
|
|
@ -217,7 +219,7 @@ public:
|
|||
|
||||
// dock widgets
|
||||
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
void setCorner(Qt::Corner corner, Qt::DockWidgetArea area);
|
||||
Qt::DockWidgetArea corner(Qt::Corner corner) const;
|
||||
void addDockWidget(Qt::DockWidgetArea area,
|
||||
|
|
@ -271,7 +273,7 @@ public:
|
|||
bool separatorMove(const QPoint &pos);
|
||||
bool endSeparatorMove(const QPoint &pos);
|
||||
void keepSize(QDockWidget *w);
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
|
||||
// save/restore
|
||||
|
||||
|
|
@ -304,7 +306,7 @@ public:
|
|||
#if QT_CONFIG(rubberband)
|
||||
QPointer<QRubberBand> gapIndicator;
|
||||
#endif
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
QPointer<QWidget> currentHoveredFloat; // set when dragging over a floating dock widget
|
||||
void setCurrentHoveredFloat(QWidget *w);
|
||||
#endif
|
||||
|
|
@ -321,7 +323,7 @@ public:
|
|||
|
||||
private Q_SLOTS:
|
||||
void updateGapIndicator();
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#ifndef QT_NO_TABBAR
|
||||
void tabChanged();
|
||||
void tabMoved(int from, int to);
|
||||
|
|
@ -367,7 +369,7 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_DEBUG_STREAM)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_DEBUG_STREAM)
|
||||
class QDebug;
|
||||
QDebug operator<<(QDebug debug, const QDockAreaLayout &layout);
|
||||
QDebug operator<<(QDebug debug, const QMainWindowLayout *layout);
|
||||
|
|
|
|||
|
|
@ -666,7 +666,7 @@ void QToolBarLayout::setExpanded(bool exp)
|
|||
extension->setChecked(expanded);
|
||||
|
||||
if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) {
|
||||
#ifdef QT_NO_DOCKWIDGET
|
||||
#if !QT_CONFIG(dockwidget)
|
||||
animating = false;
|
||||
#else
|
||||
animating = !tb->isWindow() && win->isAnimated();
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ HEADERS += \
|
|||
widgets/qabstractspinbox.h \
|
||||
widgets/qabstractspinbox_p.h \
|
||||
widgets/qdial.h \
|
||||
widgets/qdockwidget.h \
|
||||
widgets/qdockwidget_p.h \
|
||||
widgets/qdockarealayout_p.h \
|
||||
widgets/qframe.h \
|
||||
widgets/qframe_p.h \
|
||||
widgets/qgroupbox.h \
|
||||
|
|
@ -64,8 +61,6 @@ SOURCES += \
|
|||
widgets/qbuttongroup.cpp \
|
||||
widgets/qabstractspinbox.cpp \
|
||||
widgets/qdial.cpp \
|
||||
widgets/qdockwidget.cpp \
|
||||
widgets/qdockarealayout.cpp \
|
||||
widgets/qeffects.cpp \
|
||||
widgets/qframe.cpp \
|
||||
widgets/qgroupbox.cpp \
|
||||
|
|
@ -160,6 +155,17 @@ qtConfig(datetimeedit) {
|
|||
widgets/qdatetimeedit.cpp
|
||||
}
|
||||
|
||||
qtConfig(dockwidget) {
|
||||
HEADERS += \
|
||||
widgets/qdockwidget.h \
|
||||
widgets/qdockwidget_p.h \
|
||||
widgets/qdockarealayout_p.h
|
||||
|
||||
SOURCES += \
|
||||
widgets/qdockwidget.cpp \
|
||||
widgets/qdockarealayout.cpp
|
||||
}
|
||||
|
||||
qtConfig(fontcombobox) {
|
||||
HEADERS += widgets/qfontcombobox.h
|
||||
SOURCES += widgets/qfontcombobox.cpp
|
||||
|
|
|
|||
|
|
@ -3425,7 +3425,7 @@ void tst_QAccessibility::calendarWidgetTest()
|
|||
|
||||
void tst_QAccessibility::dockWidgetTest()
|
||||
{
|
||||
#ifndef QT_NO_DOCKWIDGET
|
||||
#if QT_CONFIG(dockwidget)
|
||||
// Set up a proper main window with two dock widgets
|
||||
QMainWindow *mw = new QMainWindow();
|
||||
QFrame *central = new QFrame(mw);
|
||||
|
|
@ -3558,7 +3558,7 @@ void tst_QAccessibility::dockWidgetTest()
|
|||
|
||||
delete mw;
|
||||
QTestAccessibility::clearEvents();
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#endif // QT_CONFIG(dockwidget)
|
||||
}
|
||||
|
||||
void tst_QAccessibility::comboBoxTest()
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@
|
|||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <qdockwidget.h>
|
||||
#endif
|
||||
#include <qlayout.h>
|
||||
#include <qmainwindow.h>
|
||||
#include <qmenubar.h>
|
||||
|
|
@ -148,7 +150,7 @@ private slots:
|
|||
void QTBUG21378_animationFinished();
|
||||
void resizeDocks();
|
||||
void resizeDocks_data();
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_TABBAR)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_TABBAR)
|
||||
void QTBUG52175_tabifiedDockWidgetActivated();
|
||||
#endif
|
||||
};
|
||||
|
|
@ -2044,7 +2046,7 @@ void tst_QMainWindow::resizeDocks()
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_TABBAR)
|
||||
#if QT_CONFIG(dockwidget) && !defined(QT_NO_TABBAR)
|
||||
void tst_QMainWindow::QTBUG52175_tabifiedDockWidgetActivated()
|
||||
{
|
||||
QMainWindow w;
|
||||
|
|
|
|||
Loading…
Reference in New Issue