diff --git a/python/examples-qt6/MyMainWindow.py b/python/examples-qt6/MyMainWindow.py index a598e933..9637f2c7 100644 --- a/python/examples-qt6/MyMainWindow.py +++ b/python/examples-qt6/MyMainWindow.py @@ -11,8 +11,8 @@ # pylint: disable=missing-module-docstring,missing-function-docstring,missing-class-docstring +# pylint: disable=no-name-in-module from PyKDDockWidgetsQt6 import KDDockWidgets - from PySide6 import QtCore, QtWidgets, QtGui from MyWidget1 import MyWidget1 diff --git a/python/examples-qt6/MyWidget1.py b/python/examples-qt6/MyWidget1.py index cd17261c..ecec4329 100644 --- a/python/examples-qt6/MyWidget1.py +++ b/python/examples-qt6/MyWidget1.py @@ -15,6 +15,7 @@ from PySide6 import QtGui from MyWidget import MyWidget +# pylint: disable=too-few-public-methods class MyWidget1(MyWidget): def __init__(self, parent=None): super().__init__(":/assets/triangles.png", ":/assets/KDAB_bubble_white.png", parent) diff --git a/python/examples-qt6/MyWidget2.py b/python/examples-qt6/MyWidget2.py index 42312bbf..9a7e9d24 100644 --- a/python/examples-qt6/MyWidget2.py +++ b/python/examples-qt6/MyWidget2.py @@ -15,6 +15,7 @@ from PySide6 import QtGui, QtCore from MyWidget import MyWidget +# pylint: disable=too-few-public-methods class MyWidget2(MyWidget): def __init__(self, parent=None): diff --git a/python/examples-qt6/MyWidget3.py b/python/examples-qt6/MyWidget3.py index 095114b5..433e0f0e 100644 --- a/python/examples-qt6/MyWidget3.py +++ b/python/examples-qt6/MyWidget3.py @@ -15,6 +15,7 @@ from PySide6 import QtGui, QtCore from MyWidget import MyWidget +# pylint: disable=too-few-public-methods class MyWidget3(MyWidget): def __init__(self, parent=None): diff --git a/python/examples/MyMainWindow.py b/python/examples/MyMainWindow.py index 99ed9cef..d2526897 100644 --- a/python/examples/MyMainWindow.py +++ b/python/examples/MyMainWindow.py @@ -11,8 +11,8 @@ # pylint: disable=missing-module-docstring,missing-function-docstring,missing-class-docstring +# pylint: disable=no-name-in-module from PyKDDockWidgets import KDDockWidgets - from PySide2 import QtCore, QtWidgets, QtGui from MyWidget1 import MyWidget1 diff --git a/python/examples/MyWidget1.py b/python/examples/MyWidget1.py index e0833d86..c5dca13d 100644 --- a/python/examples/MyWidget1.py +++ b/python/examples/MyWidget1.py @@ -15,6 +15,7 @@ from PySide2 import QtGui from MyWidget import MyWidget +# pylint: disable=too-few-public-methods class MyWidget1(MyWidget): def __init__(self, parent=None): super().__init__(":/assets/triangles.png", ":/assets/KDAB_bubble_white.png", parent) diff --git a/python/examples/MyWidget2.py b/python/examples/MyWidget2.py index 4db68b66..f90e9ebc 100644 --- a/python/examples/MyWidget2.py +++ b/python/examples/MyWidget2.py @@ -15,6 +15,7 @@ from PySide2 import QtGui, QtCore from MyWidget import MyWidget +# pylint: disable=too-few-public-methods class MyWidget2(MyWidget): def __init__(self, parent=None): diff --git a/python/examples/MyWidget3.py b/python/examples/MyWidget3.py index 42aee99c..26541d59 100644 --- a/python/examples/MyWidget3.py +++ b/python/examples/MyWidget3.py @@ -15,6 +15,7 @@ from PySide2 import QtGui, QtCore from MyWidget import MyWidget +# pylint: disable=too-few-public-methods class MyWidget3(MyWidget): def __init__(self, parent=None): diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 01dc527c..a4ba1d52 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -153,7 +153,7 @@ QMargins MainWindow::centerWidgetMargins() const return d->m_centerWidgetMargins; } -void MainWindow::setCenterWidgetMargins(const QMargins &margins) +void MainWindow::setCenterWidgetMargins(QMargins margins) { if (d->m_centerWidgetMargins == margins) return; diff --git a/src/MainWindow.h b/src/MainWindow.h index e96d46f8..a9d74b55 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -58,7 +58,7 @@ public: QMargins centerWidgetMargins() const override; //@brief sets the margins for the contents widgets - void setCenterWidgetMargins(const QMargins &margins); + void setCenterWidgetMargins(QMargins); ///@brief returns the internal layout /// this is rarely needed unless you want to layout other widgets next to the diff --git a/src/private/widgets/FloatingWindowWidget.cpp b/src/private/widgets/FloatingWindowWidget.cpp index 235cf27e..53cff1b9 100644 --- a/src/private/widgets/FloatingWindowWidget.cpp +++ b/src/private/widgets/FloatingWindowWidget.cpp @@ -86,7 +86,7 @@ bool FloatingWindowWidget::event(QEvent *ev) return FloatingWindow::event(ev); } -bool FloatingWindowWidget::eventFilter(QObject *, QEvent *ev) +bool FloatingWindowWidget::eventFilter(QObject *o, QEvent *ev) { if (ev->type() == QEvent::WindowStateChange) { @@ -102,10 +102,9 @@ bool FloatingWindowWidget::eventFilter(QObject *, QEvent *ev) } } - return false; + return FloatingWindow::eventFilter(o, ev); } - void FloatingWindowWidget::init() { m_vlayout->setSpacing(0);