Remove dead code from src/widgets
Code that's removed via QT_VERSION(6, 0, 0) check is already no longer compiled. Change-Id: I70865f330a6260ac2e9cf2770d599a5b6f7bb7d4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
This commit is contained in:
parent
219e7bafa2
commit
90210c8d28
@ -3232,11 +3232,7 @@ void QWizard::paintEvent(QPaintEvent * event)
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool QWizard::nativeEvent(const QByteArray &eventType, void *message, qintptr *result)
|
||||
# else
|
||||
bool QWizard::nativeEvent(const QByteArray &eventType, void *message, long *result)
|
||||
# endif
|
||||
{
|
||||
#if QT_CONFIG(style_windowsvista)
|
||||
Q_D(QWizard);
|
||||
|
@ -188,11 +188,7 @@ protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
|
||||
# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result) override;
|
||||
# else
|
||||
bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
|
||||
# endif
|
||||
#endif
|
||||
void done(int result) override;
|
||||
virtual void initializePage(int id);
|
||||
|
@ -339,11 +339,7 @@ void QVistaHelper::setTitleBarIconAndCaptionVisible(bool visible)
|
||||
SetWindowThemeAttribute(handle, WTA_NONCLIENT, &opt, sizeof(WTA_OPTIONS));
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool QVistaHelper::winEvent(MSG* msg, qintptr *result)
|
||||
#else
|
||||
bool QVistaHelper::winEvent(MSG* msg, long* result)
|
||||
#endif
|
||||
{
|
||||
switch (msg->message) {
|
||||
case WM_NCHITTEST: {
|
||||
@ -405,11 +401,7 @@ void QVistaHelper::mouseEvent(QEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool QVistaHelper::handleWinEvent(MSG *message, qintptr *result)
|
||||
#else
|
||||
bool QVistaHelper::handleWinEvent(MSG *message, long *result)
|
||||
#endif
|
||||
{
|
||||
if (message->message == WM_THEMECHANGED || message->message == WM_DWMCOMPOSITIONCHANGED)
|
||||
cachedVistaState = Dirty;
|
||||
@ -517,11 +509,7 @@ bool QVistaHelper::eventFilter(QObject *obj, QEvent *event)
|
||||
|
||||
if (event->type() == QEvent::MouseMove) {
|
||||
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
qintptr result;
|
||||
#else
|
||||
long result;
|
||||
#endif
|
||||
MSG msg;
|
||||
msg.message = WM_NCHITTEST;
|
||||
msg.wParam = 0;
|
||||
@ -535,11 +523,7 @@ bool QVistaHelper::eventFilter(QObject *obj, QEvent *event)
|
||||
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
|
||||
|
||||
if (mouseEvent->button() == Qt::LeftButton) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
qintptr result;
|
||||
#else
|
||||
long result;
|
||||
#endif
|
||||
MSG msg;
|
||||
msg.message = WM_NCHITTEST;
|
||||
msg.wParam = 0;
|
||||
@ -554,11 +538,7 @@ bool QVistaHelper::eventFilter(QObject *obj, QEvent *event)
|
||||
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
|
||||
|
||||
if (mouseEvent->button() == Qt::LeftButton) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
qintptr result;
|
||||
#else
|
||||
long result;
|
||||
#endif
|
||||
MSG msg;
|
||||
msg.message = WM_NCHITTEST;
|
||||
msg.wParam = 0;
|
||||
|
@ -93,11 +93,7 @@ public:
|
||||
bool setDWMTitleBar(TitleBarChangeType type);
|
||||
void setTitleBarIconAndCaptionVisible(bool visible);
|
||||
void mouseEvent(QEvent *event);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool handleWinEvent(MSG *message, qintptr *result);
|
||||
#else
|
||||
bool handleWinEvent(MSG *message, long *result);
|
||||
#endif
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
QVistaBackButton *backButton() const { return backButton_; }
|
||||
@ -136,11 +132,7 @@ private:
|
||||
void drawTitleBar(QPainter *painter);
|
||||
void setMouseCursor(QPoint pos);
|
||||
void collapseTopFrameStrut();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool winEvent(MSG *message, qintptr *result);
|
||||
#else
|
||||
bool winEvent(MSG *message, long *result);
|
||||
#endif
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
|
@ -2006,11 +2006,7 @@ void QGraphicsWidget::addAction(QAction *action)
|
||||
|
||||
\sa removeAction(), QMenu, addAction(), QWidget::addActions()
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
void QGraphicsWidget::addActions(const QList<QAction *> &actions)
|
||||
#else
|
||||
void QGraphicsWidget::addActions(QList<QAction *> actions)
|
||||
#endif
|
||||
{
|
||||
for (int i = 0; i < actions.count(); ++i)
|
||||
insertAction(nullptr, actions.at(i));
|
||||
@ -2067,11 +2063,7 @@ void QGraphicsWidget::insertAction(QAction *before, QAction *action)
|
||||
|
||||
\sa removeAction(), QMenu, insertAction(), QWidget::insertActions()
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
void QGraphicsWidget::insertActions(QAction *before, const QList<QAction *> &actions)
|
||||
#else
|
||||
void QGraphicsWidget::insertActions(QAction *before, QList<QAction *> actions)
|
||||
#endif
|
||||
{
|
||||
for (int i = 0; i < actions.count(); ++i)
|
||||
insertAction(before, actions.at(i));
|
||||
|
@ -148,13 +148,8 @@ public:
|
||||
#ifndef QT_NO_ACTION
|
||||
//actions
|
||||
void addAction(QAction *action);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
void addActions(const QList<QAction*> &actions);
|
||||
void insertActions(QAction *before, const QList<QAction*> &actions);
|
||||
#else
|
||||
void addActions(QList<QAction*> actions);
|
||||
void insertActions(QAction *before, QList<QAction*> actions);
|
||||
#endif
|
||||
void insertAction(QAction *before, QAction *action);
|
||||
void removeAction(QAction *action);
|
||||
QList<QAction*> actions() const;
|
||||
|
@ -100,9 +100,7 @@ public:
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool clearItemData(const QModelIndex &index) override;
|
||||
#endif
|
||||
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
|
||||
|
||||
|
@ -480,7 +480,6 @@ bool QTableModel::setItemData(const QModelIndex &index, const QMap<int, QVariant
|
||||
return true;
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool QTableModel::clearItemData(const QModelIndex &index)
|
||||
{
|
||||
if (!checkIndex(index, CheckIndexOption::IndexIsValid))
|
||||
@ -496,7 +495,6 @@ bool QTableModel::clearItemData(const QModelIndex &index)
|
||||
emit dataChanged(index, index, QVector<int>{});
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
Qt::ItemFlags QTableModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
@ -2582,11 +2580,7 @@ QStringList QTableWidget::mimeTypes() const
|
||||
If the list of items is empty, \nullptr is returned rather than a
|
||||
serialized empty list.
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
QMimeData *QTableWidget::mimeData(const QList<QTableWidgetItem *> &items) const
|
||||
#else
|
||||
QMimeData *QTableWidget::mimeData(const QList<QTableWidgetItem*> items) const
|
||||
#endif
|
||||
{
|
||||
Q_D(const QTableWidget);
|
||||
|
||||
@ -2665,18 +2659,6 @@ QModelIndex QTableWidget::indexFromItem(const QTableWidgetItem *item) const
|
||||
return d->tableModel()->index(item);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
/*!
|
||||
\internal
|
||||
\obsolete
|
||||
\overload
|
||||
*/
|
||||
QModelIndex QTableWidget::indexFromItem(QTableWidgetItem *item) const
|
||||
{
|
||||
return indexFromItem(const_cast<const QTableWidgetItem *>(item));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Returns a pointer to the QTableWidgetItem associated with the given \a index.
|
||||
*/
|
||||
|
@ -231,6 +231,9 @@ public:
|
||||
QTableWidgetItem *item(int row, int column) const;
|
||||
void setItem(int row, int column, QTableWidgetItem *item);
|
||||
QTableWidgetItem *takeItem(int row, int column);
|
||||
QList<QTableWidgetItem*> items(const QMimeData *data) const;
|
||||
QModelIndex indexFromItem(const QTableWidgetItem *item) const;
|
||||
QTableWidgetItem *itemFromIndex(const QModelIndex &index) const;
|
||||
|
||||
QTableWidgetItem *verticalHeaderItem(int row) const;
|
||||
void setVerticalHeaderItem(int row, QTableWidgetItem *item);
|
||||
@ -315,27 +318,10 @@ Q_SIGNALS:
|
||||
protected:
|
||||
bool event(QEvent *e) override;
|
||||
virtual QStringList mimeTypes() const;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
virtual QMimeData *mimeData(const QList<QTableWidgetItem *> &items) const;
|
||||
#else
|
||||
virtual QMimeData *mimeData(const QList<QTableWidgetItem*> items) const;
|
||||
#endif
|
||||
virtual bool dropMimeData(int row, int column, const QMimeData *data, Qt::DropAction action);
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
public:
|
||||
#else
|
||||
protected:
|
||||
#endif
|
||||
QList<QTableWidgetItem*> items(const QMimeData *data) const;
|
||||
|
||||
QModelIndex indexFromItem(const QTableWidgetItem *item) const;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QModelIndex indexFromItem(QTableWidgetItem *item) const; // ### Qt 6: remove
|
||||
#endif
|
||||
QTableWidgetItem *itemFromIndex(const QModelIndex &index) const;
|
||||
|
||||
protected:
|
||||
#if QT_CONFIG(draganddrop)
|
||||
void dropEvent(QDropEvent *event) override;
|
||||
|
@ -129,9 +129,7 @@ public:
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool clearItemData(const QModelIndex &index) override;
|
||||
#endif
|
||||
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
|
||||
|
||||
|
@ -392,7 +392,6 @@ bool QTreeModel::setData(const QModelIndex &index, const QVariant &value, int ro
|
||||
return false;
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool QTreeModel::clearItemData(const QModelIndex &index)
|
||||
{
|
||||
if (!checkIndex(index, CheckIndexOption::IndexIsValid))
|
||||
@ -411,7 +410,6 @@ bool QTreeModel::clearItemData(const QModelIndex &index)
|
||||
emit dataChanged(index, index, QVector<int>{});
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
QMap<int, QVariant> QTreeModel::itemData(const QModelIndex &index) const
|
||||
{
|
||||
@ -3257,11 +3255,7 @@ QStringList QTreeWidget::mimeTypes() const
|
||||
If the list of items is empty, \nullptr is returned rather than a
|
||||
serialized empty list.
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
QMimeData *QTreeWidget::mimeData(const QList<QTreeWidgetItem *> &items) const
|
||||
#else
|
||||
QMimeData *QTreeWidget::mimeData(const QList<QTreeWidgetItem*> items) const
|
||||
#endif
|
||||
{
|
||||
Q_D(const QTreeWidget);
|
||||
if (d->treeModel()->cachedIndexes.isEmpty()) {
|
||||
@ -3339,17 +3333,6 @@ QModelIndex QTreeWidget::indexFromItem(const QTreeWidgetItem *item, int column)
|
||||
return d->index(item, column);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
/*!
|
||||
\overload
|
||||
\internal
|
||||
*/
|
||||
QModelIndex QTreeWidget::indexFromItem(QTreeWidgetItem *item, int column) const
|
||||
{
|
||||
return indexFromItem(const_cast<const QTreeWidgetItem *>(item), column);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Returns a pointer to the QTreeWidgetItem associated with the given \a index.
|
||||
|
||||
|
@ -303,6 +303,10 @@ public:
|
||||
|
||||
QTreeWidgetItem *itemAbove(const QTreeWidgetItem *item) const;
|
||||
QTreeWidgetItem *itemBelow(const QTreeWidgetItem *item) const;
|
||||
QList<QTreeWidgetItem*> items(const QMimeData *data) const;
|
||||
|
||||
QModelIndex indexFromItem(const QTreeWidgetItem *item, int column = 0) const;
|
||||
QTreeWidgetItem *itemFromIndex(const QModelIndex &index) const;
|
||||
|
||||
void setSelectionModel(QItemSelectionModel *selectionModel) override;
|
||||
|
||||
@ -329,29 +333,11 @@ Q_SIGNALS:
|
||||
protected:
|
||||
bool event(QEvent *e) override;
|
||||
virtual QStringList mimeTypes() const;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
virtual QMimeData *mimeData(const QList<QTreeWidgetItem *> &items) const;
|
||||
#else
|
||||
virtual QMimeData *mimeData(const QList<QTreeWidgetItem*> items) const;
|
||||
#endif
|
||||
virtual bool dropMimeData(QTreeWidgetItem *parent, int index,
|
||||
const QMimeData *data, Qt::DropAction action);
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
public:
|
||||
#else
|
||||
protected:
|
||||
#endif
|
||||
QList<QTreeWidgetItem*> items(const QMimeData *data) const;
|
||||
|
||||
QModelIndex indexFromItem(const QTreeWidgetItem *item, int column = 0) const;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QModelIndex indexFromItem(QTreeWidgetItem *item, int column = 0) const; // ### Qt 6: remove
|
||||
#endif
|
||||
QTreeWidgetItem *itemFromIndex(const QModelIndex &index) const;
|
||||
|
||||
protected:
|
||||
#if QT_CONFIG(draganddrop)
|
||||
void dropEvent(QDropEvent *event) override;
|
||||
#endif
|
||||
|
@ -99,9 +99,7 @@ public:
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool clearItemData(const QModelIndex &index) override;
|
||||
#endif
|
||||
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
|
||||
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
|
@ -376,11 +376,7 @@ Q_WIDGETS_EXPORT QSize qSmartMinSize(const QSize &sizeHint, const QSize &minSize
|
||||
|
||||
Q_WIDGETS_EXPORT QSize qSmartMinSize(const QWidgetItem *i)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QWidget *w = const_cast<QWidgetItem *>(i)->widget();
|
||||
#else
|
||||
QWidget *w = i->widget();
|
||||
#endif
|
||||
return qSmartMinSize(w->sizeHint(), w->minimumSizeHint(),
|
||||
w->minimumSize(), w->maximumSize(),
|
||||
w->sizePolicy());
|
||||
@ -418,11 +414,7 @@ Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QSize &sizeHint,
|
||||
|
||||
Q_WIDGETS_EXPORT QSize qSmartMaxSize(const QWidgetItem *i, Qt::Alignment align)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QWidget *w = const_cast<QWidgetItem *>(i)->widget();
|
||||
#else
|
||||
QWidget *w = i->widget();
|
||||
#endif
|
||||
return qSmartMaxSize(w->sizeHint().expandedTo(w->minimumSizeHint()), w->minimumSize(), w->maximumSize(),
|
||||
w->sizePolicy(), align);
|
||||
}
|
||||
|
@ -360,11 +360,7 @@ QSpacerItem * QSpacerItem::spacerItem()
|
||||
|
||||
\sa layout(), spacerItem()
|
||||
*/
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QWidget *QLayoutItem::widget()
|
||||
#else
|
||||
QWidget *QLayoutItem::widget() const
|
||||
#endif
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
@ -372,11 +368,7 @@ QWidget *QLayoutItem::widget() const
|
||||
/*!
|
||||
Returns the widget managed by this item.
|
||||
*/
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QWidget *QWidgetItem::widget()
|
||||
#else
|
||||
QWidget *QWidgetItem::widget() const
|
||||
#endif
|
||||
{
|
||||
return wid;
|
||||
}
|
||||
|
@ -74,11 +74,7 @@ public:
|
||||
virtual int minimumHeightForWidth(int) const;
|
||||
virtual void invalidate();
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
virtual QWidget *widget();
|
||||
#else
|
||||
virtual QWidget *widget() const;
|
||||
#endif
|
||||
virtual QLayout *layout();
|
||||
virtual QSpacerItem *spacerItem();
|
||||
|
||||
@ -137,11 +133,7 @@ public:
|
||||
bool isEmpty() const override;
|
||||
void setGeometry(const QRect&) override;
|
||||
QRect geometry() const override;
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QWidget *widget() override;
|
||||
#else
|
||||
QWidget *widget() const override;
|
||||
#endif
|
||||
|
||||
bool hasHeightForWidth() const override;
|
||||
int heightForWidth(int) const override;
|
||||
|
@ -224,12 +224,8 @@ private:
|
||||
quint32 data;
|
||||
};
|
||||
};
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
// Can't add in Qt 5, as QList<QSizePolicy> would be BiC:
|
||||
|
||||
Q_DECLARE_TYPEINFO(QSizePolicy, Q_PRIMITIVE_TYPE);
|
||||
#else
|
||||
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
|
||||
#endif
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QSizePolicy::ControlTypes)
|
||||
|
||||
|
@ -3097,11 +3097,7 @@ void QWidget::addAction(QAction *action)
|
||||
|
||||
\sa removeAction(), QMenu, addAction()
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
void QWidget::addActions(const QList<QAction *> &actions)
|
||||
#else
|
||||
void QWidget::addActions(QList<QAction*> actions)
|
||||
#endif
|
||||
{
|
||||
for(int i = 0; i < actions.count(); i++)
|
||||
insertAction(nullptr, actions.at(i));
|
||||
@ -3150,11 +3146,7 @@ void QWidget::insertAction(QAction *before, QAction *action)
|
||||
|
||||
\sa removeAction(), QMenu, insertAction(), contextMenuPolicy
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
void QWidget::insertActions(QAction *before, const QList<QAction*> &actions)
|
||||
#else
|
||||
void QWidget::insertActions(QAction *before, QList<QAction*> actions)
|
||||
#endif
|
||||
{
|
||||
for(int i = 0; i < actions.count(); ++i)
|
||||
insertAction(before, actions.at(i));
|
||||
@ -9825,11 +9817,7 @@ void QWidget::hideEvent(QHideEvent *)
|
||||
\endtable
|
||||
*/
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool QWidget::nativeEvent(const QByteArray &eventType, void *message, qintptr *result)
|
||||
#else
|
||||
bool QWidget::nativeEvent(const QByteArray &eventType, void *message, long *result)
|
||||
#endif
|
||||
{
|
||||
Q_UNUSED(eventType);
|
||||
Q_UNUSED(message);
|
||||
|
@ -551,13 +551,8 @@ public:
|
||||
#ifndef QT_NO_ACTION
|
||||
//actions
|
||||
void addAction(QAction *action);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
void addActions(const QList<QAction*> &actions);
|
||||
void insertActions(QAction *before, const QList<QAction*> &actions);
|
||||
#else
|
||||
void addActions(QList<QAction*> actions);
|
||||
void insertActions(QAction *before, QList<QAction*> actions);
|
||||
#endif
|
||||
void insertAction(QAction *before, QAction *action);
|
||||
void removeAction(QAction *action);
|
||||
QList<QAction*> actions() const;
|
||||
@ -648,11 +643,7 @@ protected:
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
virtual void hideEvent(QHideEvent *event);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
virtual bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result);
|
||||
#else
|
||||
virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result);
|
||||
#endif
|
||||
|
||||
// Misc. protected functions
|
||||
virtual void changeEvent(QEvent *);
|
||||
|
@ -1047,11 +1047,7 @@ void QWidgetWindow::handleWindowStateChangedEvent(QWindowStateChangeEvent *event
|
||||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, qintptr *result)
|
||||
#else
|
||||
bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, long *result)
|
||||
#endif
|
||||
{
|
||||
return m_widget->nativeEvent(eventType, message, result);
|
||||
}
|
||||
|
@ -103,11 +103,7 @@ protected:
|
||||
#endif
|
||||
void handleExposeEvent(QExposeEvent *);
|
||||
void handleWindowStateChangedEvent(QWindowStateChangeEvent *event);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result) override;
|
||||
#else
|
||||
bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
|
||||
#endif
|
||||
#if QT_CONFIG(tabletevent)
|
||||
void handleTabletEvent(QTabletEvent *);
|
||||
#endif
|
||||
|
@ -2393,25 +2393,6 @@ int QStyle::combinedLayoutSpacing(QSizePolicy::ControlTypes controls1,
|
||||
return result;
|
||||
}
|
||||
|
||||
// ### Qt 6: Remove in favor of template<class T> QDebug operator<<(QDebug, const QFlags<T> &).
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
QT_BEGIN_INCLUDE_NAMESPACE
|
||||
# include <QDebug>
|
||||
QT_END_INCLUDE_NAMESPACE
|
||||
|
||||
# if !defined(QT_NO_DEBUG_STREAM)
|
||||
QDebug operator<<(QDebug debug, QStyle::State state)
|
||||
{
|
||||
# if !defined(QT_NO_DEBUG)
|
||||
return operator<< <QStyle::StateFlag>(debug, state);
|
||||
# else
|
||||
Q_UNUSED(state);
|
||||
return debug;
|
||||
# endif
|
||||
}
|
||||
# endif // !QT_NO_DEBUG_STREAM
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
|
||||
/*!
|
||||
\since 4.6
|
||||
|
||||
|
@ -868,13 +868,6 @@ private:
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::State)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::SubControls)
|
||||
|
||||
#if !defined(QT_NO_DEBUG_STREAM)
|
||||
// ### Qt 6: Remove in favor of template<class T> QDebug operator<<(QDebug, const QFlags<T> &).
|
||||
# if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, QStyle::State state);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QSTYLE_H
|
||||
|
@ -66,15 +66,10 @@ public:
|
||||
QString description() const;
|
||||
void setDescription(const QString &description);
|
||||
|
||||
// QTBUG-68722
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
protected:
|
||||
#else
|
||||
public:
|
||||
#endif
|
||||
QSize sizeHint() const override;
|
||||
int heightForWidth(int) const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
protected:
|
||||
bool event(QEvent *e) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
|
@ -198,18 +198,9 @@ QDateTimeEdit::QDateTimeEdit(QTime time, QWidget *parent)
|
||||
d->init(time.isValid() ? time : QDATETIMEEDIT_TIME_MIN);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
QDateTimeEdit::QDateTimeEdit(const QVariant &var, QVariant::Type parserType, QWidget *parent)
|
||||
: QDateTimeEdit(var, QMetaType::Type(parserType), parent)
|
||||
{ }
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
#endif
|
||||
|
||||
QDateTimeEdit::QDateTimeEdit(const QVariant &var, QMetaType::Type parserType, QWidget *parent)
|
||||
: QAbstractSpinBox(*new QDateTimeEditPrivate, parent)
|
||||
{
|
||||
|
@ -195,9 +195,6 @@ protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void initStyleOption(QStyleOptionSpinBox *option) const;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QDateTimeEdit(const QVariant &val, QVariant::Type parserType, QWidget *parent = nullptr);
|
||||
#endif
|
||||
QDateTimeEdit(const QVariant &val, QMetaType::Type parserType, QWidget *parent = nullptr);
|
||||
private:
|
||||
Q_DECLARE_PRIVATE(QDateTimeEdit)
|
||||
|
@ -201,11 +201,7 @@ inline QLayoutItem *QDockWidgetItem::dockWidgetChildItem() const
|
||||
|
||||
inline QDockWidgetLayout *QDockWidgetItem::dockWidgetLayout() const
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QWidget *w = const_cast<QDockWidgetItem*>(this)->widget();
|
||||
#else
|
||||
QWidget *w = widget();
|
||||
#endif
|
||||
if (w != nullptr)
|
||||
return qobject_cast<QDockWidgetLayout*>(w->layout());
|
||||
return nullptr;
|
||||
|
@ -851,11 +851,7 @@ void QMainWindow::removeToolBar(QToolBar *toolbar)
|
||||
|
||||
\sa addToolBar(), addToolBarBreak(), Qt::ToolBarArea
|
||||
*/
|
||||
Qt::ToolBarArea QMainWindow::toolBarArea(
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
const
|
||||
#endif
|
||||
QToolBar *toolbar) const
|
||||
Qt::ToolBarArea QMainWindow::toolBarArea(const QToolBar *toolbar) const
|
||||
{ return d_func()->layout->toolBarArea(toolbar); }
|
||||
|
||||
/*!
|
||||
|
@ -158,13 +158,10 @@ public:
|
||||
|
||||
bool unifiedTitleAndToolBarOnMac() const;
|
||||
|
||||
Qt::ToolBarArea toolBarArea(
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
const
|
||||
#endif
|
||||
QToolBar *toolbar) const;
|
||||
Qt::ToolBarArea toolBarArea(const QToolBar *toolbar) const;
|
||||
bool toolBarBreak(QToolBar *toolbar) const;
|
||||
#endif
|
||||
#endif // QT_CONFIG(toolbar)
|
||||
|
||||
#if QT_CONFIG(dockwidget)
|
||||
void addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget);
|
||||
void addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget,
|
||||
|
@ -2738,11 +2738,7 @@ QAction *QMenuPrivate::exec(const QPoint &p, QAction *action, PositionFunction p
|
||||
|
||||
\sa popup(), QWidget::mapToGlobal()
|
||||
*/
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
QAction *QMenu::exec(const QList<QAction *> &actions, const QPoint &pos, QAction *at, QWidget *parent)
|
||||
#else
|
||||
QAction *QMenu::exec(QList<QAction*> actions, const QPoint &pos, QAction *at, QWidget *parent)
|
||||
#endif
|
||||
{
|
||||
QMenu menu(parent);
|
||||
menu.addActions(actions);
|
||||
|
@ -202,11 +202,7 @@ public:
|
||||
QAction *exec();
|
||||
QAction *exec(const QPoint &pos, QAction *at = nullptr);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
static QAction *exec(const QList<QAction *> &actions, const QPoint &pos, QAction *at = nullptr, QWidget *parent = nullptr);
|
||||
#else
|
||||
static QAction *exec(QList<QAction*> actions, const QPoint &pos, QAction *at = nullptr, QWidget *parent = nullptr);
|
||||
#endif
|
||||
|
||||
QSize sizeHint() const override;
|
||||
|
||||
|
@ -810,13 +810,6 @@ void QTextBrowser::reload()
|
||||
setSource(s, d->currentType);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
void QTextBrowser::setSource(const QUrl &url)
|
||||
{
|
||||
setSource(url, QTextDocument::UnknownResource);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Attempts to load the document at the given \a url with the specified \a type.
|
||||
|
||||
@ -832,14 +825,12 @@ void QTextBrowser::setSource(const QUrl &url, QTextDocument::ResourceType type)
|
||||
doSetSource(url, type);
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
/*!
|
||||
Attempts to load the document at the given \a url with the specified \a type.
|
||||
|
||||
setSource() calls doSetSource. In Qt 5, setSource(const QUrl &url) was virtual.
|
||||
In Qt 6, doSetSource() is virtual instead, so that it can be overridden in subclasses.
|
||||
*/
|
||||
#endif
|
||||
void QTextBrowser::doSetSource(const QUrl &url, QTextDocument::ResourceType type)
|
||||
{
|
||||
Q_D(QTextBrowser);
|
||||
|
@ -90,12 +90,7 @@ public:
|
||||
void setOpenLinks(bool open);
|
||||
|
||||
public Q_SLOTS:
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
virtual void setSource(const QUrl &name);
|
||||
void setSource(const QUrl &name, QTextDocument::ResourceType type);
|
||||
#else
|
||||
void setSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource);
|
||||
#endif
|
||||
virtual void backward();
|
||||
virtual void forward();
|
||||
virtual void home();
|
||||
@ -118,10 +113,7 @@ protected:
|
||||
virtual void focusOutEvent(QFocusEvent *ev) override;
|
||||
virtual bool focusNextPrevChild(bool next) override;
|
||||
virtual void paintEvent(QPaintEvent *e) override;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
virtual
|
||||
#endif
|
||||
void doSetSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource);
|
||||
virtual void doSetSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QTextBrowser)
|
||||
|
Loading…
x
Reference in New Issue
Block a user