surfacepatterns / synthclone

Other
42 stars 10 forks source link

Compile error #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
synthclone-0.1.0 doesn't compile for me on Ubuntu 10.04.

g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DSYNTHCLONE_PLATFORM_UNIX 
-DSYNTHCLONE_MAJOR_VERSION=0 -DSYNTHCLONE_MINOR_VERSION=1 
-DSYNTHCLONE_REVISION=0 -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB 
-DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I/usr/include/qt4/QtUiTools 
-I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml 
-I/usr/include/qt4 -I../include -I../../make/synthclone -o 
../../make/synthclone/sessionloadview.o sessionloadview.cpp
sessionloadview.cpp: In constructor 
‘SessionLoadView::SessionLoadView(QObject*)’:
sessionloadview.cpp:29: error: no matching function for call to 
‘QDoubleValidator::QDoubleValidator()’
/usr/include/qt4/QtGui/qvalidator.h:172: note: candidates are: 
QDoubleValidator::QDoubleValidator(const QDoubleValidator&)
/usr/include/qt4/QtGui/qvalidator.h:143: note:                 
QDoubleValidator::QDoubleValidator(double, double, int, QObject*)
/usr/include/qt4/QtGui/qvalidator.h:142: note:                 
QDoubleValidator::QDoubleValidator(QObject*)
make[2]: *** [../../make/synthclone/sessionloadview.o] Error 1
make[2]: Leaving directory 
`/home/colinf/src/jack-apps/synthclone-0.1.0/src/synthclone'
make[1]: *** [sub-synthclone-make_default-ordered] Error 2
make[1]: Leaving directory `/home/colinf/src/jack-apps/synthclone-0.1.0/src'
make: *** [sub-src-make_default] Error 2

The following fixes compilation for me:

--- sessionloadview.cpp.orig    2011-10-10 12:53:34.151343604 +0100
+++ sessionloadview.cpp 2011-10-10 12:50:58.727286672 +0100
@@ -26,7 +26,8 @@
 #include "sessionloadview.h"

 SessionLoadView::SessionLoadView(QObject *parent):
-    DialogView(":/synthclone/sessionloadview.ui", parent)
+    DialogView(":/synthclone/sessionloadview.ui", parent),
+    sampleRateValidator(parent)
 {
     openButton = synthclone::getChild<QPushButton>(dialog, "openButton");
     openButton->setEnabled(false);

Original issue reported on code.google.com by colin.m....@googlemail.com on 10 Oct 2011 at 12:08

GoogleCodeExporter commented 8 years ago
Ah.  Qt < 4.7 didn't have the parameterless QDoubleValidator constructor.

I can't commit this patch because the validator's parent will try to free the 
validator memory when the parent is destroyed, which may cause a crash because 
the validator isn't dynamically allocated.  I will commit something very 
similar in a short while.  I'll leave a comment when it's committed.

Thank you for your bug report!

Original comment by surfacep...@gmail.com on 10 Oct 2011 at 5:19

GoogleCodeExporter commented 8 years ago
The change has been committed to GIT.  I'll bump the revision and create a new 
tarball in a little bit.  I'll let you know when it's ready.

Original comment by surfacep...@gmail.com on 10 Oct 2011 at 5:40

GoogleCodeExporter commented 8 years ago
Brilliant, thank you very much. The patch was very much a stab in the dark; I'm 
eager to learn what the proper fix is.

Original comment by colin.m....@googlemail.com on 10 Oct 2011 at 6:22

GoogleCodeExporter commented 8 years ago
I've created a new archive, and it is now available for download:

    http://code.google.com/p/synthclone/downloads/detail?name=synthclone-0.1.2.tar.gz

If the code works for you, please mark this issue as 'Closed'. :)

Thanks again!

Original comment by surfacep...@gmail.com on 10 Oct 2011 at 6:26

GoogleCodeExporter commented 8 years ago
I seem not to be able to change the status of this issue for some reason, but 
0.1.2 compiles perfectly for me now, and starts and runs without undue 
incidents. Thank you!

Original comment by colin.m....@googlemail.com on 10 Oct 2011 at 7:01

GoogleCodeExporter commented 8 years ago
Sorry.  In the two years I've had this repository, I've received all of four 
bug reports, so I haven't had much of a chance to learn the ins and outs of the 
issue tracker system.  I *assumed* (wrongly) that the user that reported the 
bug could mark it closed, but that isn't the case. :(

Also, while I thought there was a 'Closed' status, it turns out that this also 
isn't the case.

Learning more all the time ...

Original comment by surfacep...@gmail.com on 10 Oct 2011 at 7:17