[scribus-dev] [FreeBSD, clang] runscriptdialog.cpp:13:43: error: addition of default argument on redeclaration

Boris Samorodov bsam at passap.ru
Tue May 7 11:49:19 UTC 2013

Hello All,

I try to build scribus-1.4.2 at FreeBSD-10-amd64 with clang-3.3 (the
default system compiler):
% uname -a
FreeBSD bsam.int.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #17 r250269:
Sun May  5 23:07:37 SAMT 2013
bsam at bsam.int.wart.ru:/usr/obj/usr/src/sys/BB64X  amd64

% clang --version
FreeBSD clang version 3.3 (trunk 178860) 20130405
Target: x86_64-unknown-freebsd10.0
Thread model: posix

...and get an error:
[ 89%] Building CXX object
error: addition of default argument on redeclaration makes this
constructor a default
RunScriptDialog::RunScriptDialog(QWidget* parent = 0, bool extEnable =
false) :
                                          ^        ~
note: previous declaration is here
                RunScriptDialog(QWidget* parent, bool extEnable);
1 error generated.
Error code 1

The attached patch helps to finish the build. But I'm not sure if
it DTRT.

Is it a clang bug? If yes can someone create a tiny testcase which
I'll submit upstream? Or should scribus use another way to
initialize the variable "parent"?

I'm not an expert here so please give me an advice how to proceed.

Thank you.
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
-------------- next part --------------
--- scribus/plugins/scriptplugin/runscriptdialog.cpp.orig	2013-05-07 14:15:30.514012699 +0400
+++ scribus/plugins/scriptplugin/runscriptdialog.cpp	2013-05-07 14:15:50.141206868 +0400
@@ -10,7 +10,7 @@ for which a new license (GPL+exception) 
 QString RunScriptDialog::m_lastScriptDir;
-RunScriptDialog::RunScriptDialog(QWidget* parent = 0, bool extEnable = false) :
+RunScriptDialog::RunScriptDialog(QWidget* parent, bool extEnable = false) :

More information about the scribus-dev mailing list