pass QStringList by const-ref
This commit is contained in:
@@ -428,7 +428,7 @@ QVector<QWindow *> DockRegistry::topLevels(bool excludeFloatingDocks) const
|
||||
return windows;
|
||||
}
|
||||
|
||||
void DockRegistry::clear(QStringList affinities)
|
||||
void DockRegistry::clear(const QStringList &affinities)
|
||||
{
|
||||
// Clears everything
|
||||
clear(m_dockWidgets, m_mainWindows, affinities);
|
||||
@@ -436,7 +436,7 @@ void DockRegistry::clear(QStringList affinities)
|
||||
|
||||
void DockRegistry::clear(const DockWidgetBase::List &dockWidgets,
|
||||
const MainWindowBase::List &mainWindows,
|
||||
QStringList affinities)
|
||||
const QStringList &affinities)
|
||||
{
|
||||
for (auto dw : qAsConst(dockWidgets)) {
|
||||
if (affinities.isEmpty() || affinitiesMatch(affinities, dw->affinities())) {
|
||||
|
||||
@@ -103,14 +103,14 @@ public:
|
||||
* This is called before restoring a layout.
|
||||
* @param affinities if specified only closes dock widgets and main windows with the specified affinities
|
||||
*/
|
||||
void clear(QStringList affinities = {});
|
||||
void clear(const QStringList &affinities = {});
|
||||
|
||||
/**
|
||||
* @brief clear Overload that only clears the specified dockWidgets and main windows.
|
||||
*/
|
||||
void clear(const DockWidgetBase::List &dockWidgets,
|
||||
const MainWindowBase::List &mainWindows,
|
||||
QStringList affinities);
|
||||
const QStringList &affinities);
|
||||
|
||||
/**
|
||||
* @brief Ensures that all floating DockWidgets have a FloatingWindow as a window.
|
||||
|
||||
@@ -1777,7 +1777,7 @@ bool ItemContainer::contains_recursive(const Item *item) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void ItemContainer::setChildren(const Item::List children, Qt::Orientation o)
|
||||
void ItemContainer::setChildren(const List &children, Qt::Orientation o)
|
||||
{
|
||||
d->m_children = children;
|
||||
for (Item *item : children)
|
||||
|
||||
@@ -418,7 +418,7 @@ private:
|
||||
Item::List visibleChildren(bool includeBeingInserted = false) const;
|
||||
int usableLength() const;
|
||||
bool hasSingleVisibleItem() const;
|
||||
void setChildren(const Item::List children, Qt::Orientation o);
|
||||
void setChildren(const Item::List &children, Qt::Orientation o);
|
||||
void setOrientation(Qt::Orientation);
|
||||
int length() const;
|
||||
QRect rect() const;
|
||||
|
||||
Reference in New Issue
Block a user