Gui: fixes OverlayManager issues

* QMetaObject::invokeMethod: No such method Gui::OverlayManager::raiseAll()
* variable 'total' set but not used [-Wunused-but-set-variable]
* 'globalPos' is deprecated: Use globalPosition() [-Wdeprecated-declarations]
This commit is contained in:
wmayer
2023-10-11 15:05:42 +02:00
committed by wwmayer
parent 04af090e86
commit 9eb5fd8036
2 changed files with 13 additions and 7 deletions

View File

@@ -889,11 +889,9 @@ public:
} else if (!checked) {
if (sizes[index] > 0 && sizes.size() > 1) {
int newtotal = 0;
int total = 0;
auto newsizes = sizes;
newsizes[index] = 0;
for (int i=0; i<sizes.size(); ++i) {
total += sizes[i];
if (i != index) {
auto d = tabWidget->dockWidget(i);
auto it = tabWidget->_sizemap.find(d);
@@ -1908,10 +1906,15 @@ void OverlayManager::Private::interceptEvent(QWidget *widget, QEvent *ev)
}
case QEvent::Wheel: {
auto we = static_cast<QWheelEvent*>(ev);
lastIntercept = getChildAt(widget, we->globalPos());
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
QPoint globalPos = we->globalPos();
#else
QPoint globalPos = we->globalPosition().toPoint();
#endif
lastIntercept = getChildAt(widget, globalPos);
#if QT_VERSION >= QT_VERSION_CHECK(5,12,0)
QWheelEvent wheelEvent(lastIntercept->mapFromGlobal(we->globalPos()),
we->globalPos(),
QWheelEvent wheelEvent(lastIntercept->mapFromGlobal(globalPos),
globalPos,
we->pixelDelta(),
we->angleDelta(),
we->buttons(),
@@ -1920,8 +1923,8 @@ void OverlayManager::Private::interceptEvent(QWidget *widget, QEvent *ev)
we->inverted(),
we->source());
#else
QWheelEvent wheelEvent(lastIntercept->mapFromGlobal(we->globalPos()),
we->globalPos(),
QWheelEvent wheelEvent(lastIntercept->mapFromGlobal(globalPos),
globalPos,
we->pixelDelta(),
we->angleDelta(),
0,

View File

@@ -24,6 +24,7 @@
#define FC_OVERLAYMANAGER_H
#include <QObject>
#include <FCGlobal.h>
class QAction;
class QDockWidget;
@@ -177,6 +178,8 @@ private:
void onTaskViewUpdate();
void onFocusChanged(QWidget *, QWidget *);
void onAction();
private Q_SLOTS:
void raiseAll();
private: