[PATCH] Fix compilation error in DiveComputerList destructor on MacOSX

subsurface at henrik.synth.no subsurface at henrik.synth.no
Tue Jun 18 05:29:35 PDT 2013


From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>

The compiler on MacOSX seems stricter than others:

qthelper.cpp: In destructor ‘DiveComputerList::~DiveComputerList()’:
qthelper.cpp:10: error: expected class-name before ‘(’ token

Fixed with help from http://stackoverflow.com/a/14777627/13365

Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---


We don't need that destructor according to Tomaz and
http://stackoverflow.com/a/14777627/13365.  If we still want to
keep it, the MacOSX compiler would have been happy with

	dcMap.~QMap<QString, DiveComputerNode>();

instead.

Anyway, this is yet another occurance of the MacOSX compiler being
more strict than others.  Is there a way to figure out why this is
so?  Then we could either introduce this strictness to other
platforms, or calm down MacOSX.

Henrik



 qthelper.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qthelper.cpp b/qthelper.cpp
index 9c74a74..2384a31 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -1,4 +1,5 @@
 #include "qthelper.h"
+#include <QMap>
 
 DiveComputerList::DiveComputerList()
 {
@@ -7,7 +8,7 @@ DiveComputerList::DiveComputerList()
 
 DiveComputerList::~DiveComputerList()
 {
-	dcMap.~QMap();
+
 }
 
 bool DiveComputerNode::operator == (const DiveComputerNode &a) const {
-- 
1.8.2.2



More information about the subsurface mailing list