diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-24 16:03:28 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-24 16:04:43 (GMT) |
commit | 117b9bb3d576d9974b3d05174d1fccf98e47cb22 (patch) | |
tree | 47e8fd427dfc17e2709f898e16d873450e2ca4b6 /src/gui/widgets/qtoolbararealayout_p.h | |
parent | 962d3938380dde01e2bd4915c51c95f47fafa0ec (diff) | |
download | Qt-117b9bb3d576d9974b3d05174d1fccf98e47cb22.zip Qt-117b9bb3d576d9974b3d05174d1fccf98e47cb22.tar.gz Qt-117b9bb3d576d9974b3d05174d1fccf98e47cb22.tar.bz2 |
QDockWidget/Toolbars refactor to avoid list copies
This also helps understanding the code better.
Diffstat (limited to 'src/gui/widgets/qtoolbararealayout_p.h')
-rw-r--r-- | src/gui/widgets/qtoolbararealayout_p.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/widgets/qtoolbararealayout_p.h b/src/gui/widgets/qtoolbararealayout_p.h index a44fbc7..636c9ca 100644 --- a/src/gui/widgets/qtoolbararealayout_p.h +++ b/src/gui/widgets/qtoolbararealayout_p.h @@ -174,9 +174,9 @@ public: void moveToolBar(QToolBar *toolbar, int pos); QList<int> gapIndex(const QPoint &pos) const; - bool insertGap(QList<int> path, QLayoutItem *item); + bool insertGap(const QList<int> &path, QLayoutItem *item); void clear(); - QRect itemRect(QList<int> path) const; + QRect itemRect(const QList<int> &path) const; QRect appendLineDropRect() const; QRect rect; @@ -194,11 +194,11 @@ public: }; QRect rect; - QMainWindow *mainWindow; + const QMainWindow *mainWindow; QToolBarAreaLayoutInfo docks[4]; bool visible; - QToolBarAreaLayout(QMainWindow *win); + QToolBarAreaLayout(const QMainWindow *win); QRect fitLayout(); @@ -230,14 +230,14 @@ public: QList<int> indexOf(QWidget *toolBar) const; QList<int> gapIndex(const QPoint &pos) const; QList<int> currentGapIndex() const; - bool insertGap(QList<int> path, QLayoutItem *item); - void remove(QList<int> path); + bool insertGap(const QList<int> &path, QLayoutItem *item); + void remove(const QList<int> &path); void remove(QLayoutItem *item); void clear(); - QToolBarAreaLayoutItem &item(QList<int> path); - QRect itemRect(QList<int> path) const; - QLayoutItem *plug(QList<int> path); - QLayoutItem *unplug(QList<int> path, QToolBarAreaLayout *other); + QToolBarAreaLayoutItem &item(const QList<int> &path); + QRect itemRect(const QList<int> &path) const; + QLayoutItem *plug(const QList<int> &path); + QLayoutItem *unplug(const QList<int> &path, QToolBarAreaLayout *other); void saveState(QDataStream &stream) const; bool restoreState(QDataStream &stream, const QList<QToolBar*> &toolBars, uchar tmarker, bool pre43, bool testing = false); |