Move utility function into tests

used by the tests only
This commit is contained in:
Sergio Martins
2020-07-27 21:32:58 +01:00
parent a574364100
commit c87f5ba6eb
2 changed files with 6 additions and 6 deletions

View File

@@ -64,10 +64,4 @@ private:
Q_DISABLE_COPY(Widget_qwidget) Q_DISABLE_COPY(Widget_qwidget)
}; };
inline int widgetMinLength(const QWidget *w, Qt::Orientation o)
{
const QSize sz = Widget_qwidget::widgetMinSize(w);
return o == Qt::Vertical ? sz.height() : sz.width();
}
} }

View File

@@ -56,6 +56,12 @@ using namespace KDDockWidgets;
using namespace KDDockWidgets::Tests; using namespace KDDockWidgets::Tests;
using namespace Layouting; using namespace Layouting;
inline int widgetMinLength(const QWidget *w, Qt::Orientation o)
{
const QSize sz = Widget_qwidget::widgetMinSize(w);
return o == Qt::Vertical ? sz.height() : sz.width();
}
struct SetExpectedWarning struct SetExpectedWarning
{ {
explicit SetExpectedWarning(const QString &s) explicit SetExpectedWarning(const QString &s)