summaryrefslogtreecommitdiffstats
path: root/src/widget/wsingletoncontainer.h
diff options
context:
space:
mode:
authorOwen Williams <owilliams@mixxx.org>2015-02-01 10:33:11 -0500
committerOwen Williams <owilliams@mixxx.org>2015-02-01 10:33:11 -0500
commit3619ea3f663453556189f1d845b7951e04e4c1e9 (patch)
tree17aaeeb9ea85f2a9e934fe7a3804607345c6dc3e /src/widget/wsingletoncontainer.h
parent0fb8a59917811b6a533c06204ee571118c0bb169 (diff)
Singleton Widgets: code review notes.
Also avoid an unnecessary reparent if the widget already has the correct parent.
Diffstat (limited to 'src/widget/wsingletoncontainer.h')
-rw-r--r--src/widget/wsingletoncontainer.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widget/wsingletoncontainer.h b/src/widget/wsingletoncontainer.h
index bc0899766b..661c51fdf2 100644
--- a/src/widget/wsingletoncontainer.h
+++ b/src/widget/wsingletoncontainer.h
@@ -70,12 +70,10 @@ class WSingletonContainer : public WWidgetGroup {
class SingletonMap {
public:
- typedef QMap<QString, QWidget*> WidgetMap;
-
// Takes a constructed QWidget and inserts it in the map of available
// singletons. Checks that an object of that name hasn't already been
// defined.
- void defineSingleton(QString objectName, QWidget* widget);
+ void insertSingleton(QString objectName, QWidget* widget);
// We don't want to end up with badly-constructed containers, so only
// provide a factory function. Returns NULL if the objectName is not in
@@ -83,7 +81,7 @@ class SingletonMap {
QWidget* getSingletonWidget(QString objectName) const;
private:
- WidgetMap m_singletons;
+ QMap<QString, QWidget*> m_singletons;
};