From owner-freebsd-ports@freebsd.org Fri Apr 15 17:27:52 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E138AEC4E1 for ; Fri, 15 Apr 2016 17:27:52 +0000 (UTC) (envelope-from freebsd-ports@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62EDE1F7D for ; Fri, 15 Apr 2016 17:27:51 +0000 (UTC) (envelope-from freebsd-ports@m.gmane.org) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ar7X1-0006TB-D5 for freebsd-ports@freebsd.org; Fri, 15 Apr 2016 19:27:47 +0200 Received: from dhcp-077-248-147-050.chello.nl ([77.248.147.50]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Apr 2016 19:27:47 +0200 Received: from rakuco by dhcp-077-248-147-050.chello.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Apr 2016 19:27:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-ports@freebsd.org From: Raphael Kubo da Costa Subject: Re: Need some help with c++/qt5 code Date: Fri, 15 Apr 2016 19:27:35 +0200 Lines: 17 Message-ID: <8637qmbx4o.fsf@FreeBSD.org> References: <570F85E3.6060000@ShaneWare.Biz> <86inzjdq4w.fsf@FreeBSD.org> <571118B0.3020806@ShaneWare.Biz> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dhcp-077-248-147-050.chello.nl User-Agent: Gnus/5.130016 (Ma Gnus v0.16) Emacs/24.5 (berkeley-unix) Cancel-Lock: sha1:CJ9UFATVcXB6t/QQWVkte1g6AFY= X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 17:27:52 -0000 Shane Ambler writes: >> I agree. Maybe using Q_GLOBAL_STATIC helps? >> >> - Remove m_table from TPanelFactory. >> - In pane.cpp, you do something like this: >> >> typedef QMap PanelMapType; >> Q_GLOBAL_STATIC(PanelMapType, s_panelMap); >> >> you then need to replace uses of m_table with s_panelMap and use >> s_panelMap->operation() instead of m_table.operation(). > > Thanks that does the trick. I'm glad it worked :-) It's a good candidate for upstreaming if you're working with them.