From da57bdced3d7e061d98d25e6866dd34b9a9db12d Mon Sep 17 00:00:00 2001 From: Rene Brun <Rene.Brun@cern.ch> Date: Thu, 13 Apr 2006 09:09:00 +0000 Subject: [PATCH] Implement copy constructors and assignement operators in the qtgsi classes. This is mandatory when running with the CINT dictionaries. Modify the test/makefile such that the examples can be linked on Linux. git-svn-id: http://root.cern.ch/svn/root/trunk@14682 27541ba8-7e3a-0410-8455-c3a389f83636 --- qtgsi/inc/TQRootApplication.h | 4 +++- qtgsi/inc/TQRootCanvas.h | 5 +++-- qtgsi/inc/TQRootDialog.h | 4 +++- qtgsi/src/TQRootApplication.cxx | 15 ++++++++++++++- qtgsi/src/TQRootCanvas.cxx | 15 ++++++++++++++- qtgsi/src/TQRootDialog.cxx | 15 ++++++++++++++- qtgsi/test/example1/Makefile | 2 +- qtgsi/test/example1/main.cpp | 3 --- 8 files changed, 52 insertions(+), 11 deletions(-) diff --git a/qtgsi/inc/TQRootApplication.h b/qtgsi/inc/TQRootApplication.h index 70e0f35eb1c..8082886fd13 100644 --- a/qtgsi/inc/TQRootApplication.h +++ b/qtgsi/inc/TQRootApplication.h @@ -1,4 +1,4 @@ -// @(#)root/qtgsi:$Name: $:$Id: TQRootApplication.h,v 1.1 2006/04/11 16:33:46 rdm Exp $ +// @(#)root/qtgsi:$Name: $:$Id: TQRootApplication.h,v 1.2 2006/04/12 10:07:21 brun Exp $ // Author: Denis Bertini, M. AL-Turany 01/11/2000 /************************************************************************* @@ -48,6 +48,8 @@ public: TQRootApplication(int argc, char **argv,int poll=0); ~TQRootApplication(); + TQRootApplication(const TQRootApplication &); + TQRootApplication& operator=(const TQRootApplication &); void SetDebugOn(){ fgDebug=kTRUE; } void SetWarningOn(){ fgWarning=kTRUE;} public slots: diff --git a/qtgsi/inc/TQRootCanvas.h b/qtgsi/inc/TQRootCanvas.h index 6230b737b3e..041bf484359 100644 --- a/qtgsi/inc/TQRootCanvas.h +++ b/qtgsi/inc/TQRootCanvas.h @@ -1,4 +1,4 @@ -// @(#)root/qtgsi:$Name: $:$Id: TQRootCanvas.h,v 1.2 2006/04/12 10:07:21 brun Exp $ +// @(#)root/qtgsi:$Name: $:$Id: TQRootCanvas.h,v 1.3 2006/04/12 17:02:55 brun Exp $ // Author: Denis Bertini, M. AL-Turany 01/11/2000 /************************************************************************* @@ -62,7 +62,8 @@ public: TQRootCanvas( QWidget *parent = 0, const char *name = 0 ,TCanvas *c=0); TQRootCanvas( QWidget *parent, QWidget* tabWin , const char *name = 0 ,TCanvas *c=0); virtual ~TQRootCanvas(); - + TQRootCanvas(const TQRootCanvas &); + TQRootCanvas& operator=(const TQRootCanvas &); TCanvas* GetCanvas() { return fCanvas;} Int_t GetRootWid() { return fWid;} Bool_t GetCanvasOwner(){ return fIsCanvasOwned; } diff --git a/qtgsi/inc/TQRootDialog.h b/qtgsi/inc/TQRootDialog.h index 7fac8c94678..d02fd835ee5 100644 --- a/qtgsi/inc/TQRootDialog.h +++ b/qtgsi/inc/TQRootDialog.h @@ -1,4 +1,4 @@ -// @(#)root/qtgsi:$Name: $:$Id: TQRootDialog.h,v 1.1 2006/04/11 16:33:46 rdm Exp $ +// @(#)root/qtgsi:$Name: $:$Id: TQRootDialog.h,v 1.2 2006/04/12 10:07:21 brun Exp $ // Author: Denis Bertini, M. Al-Turany 01/11/2000 /************************************************************************* @@ -51,6 +51,8 @@ class TQRootDialog: public QVBox public: TQRootDialog(QWidget *parent, const char *name, WFlags f=0, TObject *obj=0,TMethod *meth=0); + TQRootDialog(const TQRootDialog &); + TQRootDialog& operator=(const TQRootDialog &); virtual ~TQRootDialog(); void Add(const char* argname, const char* value, const char* type); void Popup(); diff --git a/qtgsi/src/TQRootApplication.cxx b/qtgsi/src/TQRootApplication.cxx index 44257f0757d..7d09d60f1f9 100644 --- a/qtgsi/src/TQRootApplication.cxx +++ b/qtgsi/src/TQRootApplication.cxx @@ -1,4 +1,4 @@ -// @(#)root/qtgsi:$Name: $:$Id: TQRootApplication.cxx,v 1.1 2006/04/11 16:33:46 rdm Exp $ +// @(#)root/qtgsi:$Name: $:$Id: TQRootApplication.cxx,v 1.2 2006/04/12 10:07:21 brun Exp $ // Author: Denis Bertini, M. Al-Turany 01/11/2000 /************************************************************************* @@ -54,6 +54,19 @@ TQRootApplication::TQRootApplication(int argc, char **argv, int poll):QApplicati qInstallMsgHandler( qMessageOutput ); } +//______________________________________________________________________________ +TQRootApplication::TQRootApplication(const TQRootApplication &) + :QApplication(0,0) +{ + // dummy copy constructor +} + +//______________________________________________________________________________ +TQRootApplication& TQRootApplication::operator=(const TQRootApplication &) +{ + return *this; +} + //______________________________________________________________________________ TQRootApplication::~TQRootApplication() { diff --git a/qtgsi/src/TQRootCanvas.cxx b/qtgsi/src/TQRootCanvas.cxx index 80720d32f27..083529c2c8c 100644 --- a/qtgsi/src/TQRootCanvas.cxx +++ b/qtgsi/src/TQRootCanvas.cxx @@ -1,4 +1,4 @@ -// @(#)root/qtgsi:$Name: $:$Id: TQRootCanvas.cxx,v 1.1 2006/04/11 16:33:46 rdm Exp $ +// @(#)root/qtgsi:$Name: $:$Id: TQRootCanvas.cxx,v 1.2 2006/04/12 10:07:21 brun Exp $ // Author: Denis Bertini, M. Al-Turany 01/11/2000 /************************************************************************* @@ -103,6 +103,19 @@ TQRootCanvas::TQRootCanvas( QWidget *parent, QWidget* tabWin, const char *name, setAcceptDrops(TRUE); } +//______________________________________________________________________________ +TQRootCanvas::TQRootCanvas(const TQRootCanvas &) + :QWidget(0,0,0) +{ + // dummy copy constructor +} + +//______________________________________________________________________________ +TQRootCanvas& TQRootCanvas::operator=(const TQRootCanvas &) +{ + return *this; +} + //______________________________________________________________________________ void TQRootCanvas::mouseMoveEvent(QMouseEvent *e) { diff --git a/qtgsi/src/TQRootDialog.cxx b/qtgsi/src/TQRootDialog.cxx index 4f62d4744e7..d6cf8029e1c 100644 --- a/qtgsi/src/TQRootDialog.cxx +++ b/qtgsi/src/TQRootDialog.cxx @@ -1,4 +1,4 @@ -// @(#)root/qtgsi:$Name: $:$Id: TQRootDialog.cxx,v 1.1 2006/04/11 16:33:46 rdm Exp $ +// @(#)root/qtgsi:$Name: $:$Id: TQRootDialog.cxx,v 1.2 2006/04/12 10:07:21 brun Exp $ // Author: Denis Bertini, M. Al-Turany 01/11/2000 /************************************************************************* @@ -46,6 +46,19 @@ TQRootDialog::TQRootDialog(QWidget *parent, const char *name, WFlags f, connect(bOk,SIGNAL( clicked() ), this, SLOT( ExecuteMethod() )); } +//______________________________________________________________________________ +TQRootDialog::TQRootDialog(const TQRootDialog &) + :QVBox(0,0,0) +{ + // dummy copy constructor +} + +//______________________________________________________________________________ +TQRootDialog& TQRootDialog::operator=(const TQRootDialog &) +{ + return *this; +} + //______________________________________________________________________________ void TQRootDialog::ExecuteMethod() { diff --git a/qtgsi/test/example1/Makefile b/qtgsi/test/example1/Makefile index 1bf53a742d7..1a003cac7fc 100644 --- a/qtgsi/test/example1/Makefile +++ b/qtgsi/test/example1/Makefile @@ -29,7 +29,7 @@ SYSCONF_CXXFLAGS_YACC = -Wno-unused -Wno-parentheses -Wno-deprecated # Linking with support libraries # X11 SYSCONF_LFLAGS_X11 = -L/usr/X11R6/lib -SYSCONF_LIBS_X11 = -lXext -lX11 -lm +SYSCONF_LIBS_X11 = -lXft -lXext -lX11 -lm # Qt, Qt+OpenGL SYSCONF_LFLAGS_QT = -L$(QTDIR)/lib SYSCONF_LIBS_QT = $(QTLINKLIB) diff --git a/qtgsi/test/example1/main.cpp b/qtgsi/test/example1/main.cpp index 49f65185b4a..63c01433370 100644 --- a/qtgsi/test/example1/main.cpp +++ b/qtgsi/test/example1/main.cpp @@ -11,9 +11,7 @@ #include "guitest.h" #include "qtroot.h" -#include "TROOT.h" #include "TBrowser.h" -#include "TTimer.h" #include "TQRootApplication.h" #include "TQApplication.h" @@ -32,7 +30,6 @@ int main( int argc, char **argv ) int mode = 0; - TROOT root("uno","dos"); TQApplication app("uno",&argc,argv); // Define a QRootApplication with polling mechanism on. -- GitLab