From 2542eb02648294256a01ae4ecb6ac81bc8ab5094 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 16 Nov 2014 23:46:08 +0100 Subject: Make sure QRegister::view is properly initialized and cleaned up * it must be initialized after the UI (Interface::main), so I added a View::initialize() function * the old initialize() method was renamed to setup() * use a global instance of QRegister::view so it is guaranteed to be destroyed only after any QRegisters that could still need it * Document API adapted to work with ViewCurrent references --- src/ring.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ring.h') diff --git a/src/ring.h b/src/ring.h index 35424dc..3b60833 100644 --- a/src/ring.h +++ b/src/ring.h @@ -76,6 +76,8 @@ public: Buffer() : ViewCurrent(), filename(NULL), savepoint_id(0), dirty(false) { + initialize(); + /* only have to do this once: */ set_representations(); } -- cgit v1.2.3