[opensuse-packaging] A gcc45 problem
Hi, I have a gcc45 error in home:plater plasmoid-yawp which I can't understand :- /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp: In member function 'CityWeather DlgAddCity::getSelectedCity() const': /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: cannot call constructor 'DStreamLogger::DStreamLogger' directly /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: for a function-style cast, remove the redundant '::DStreamLogger' / in the code snippet where line 72 is dStartFunct(); CityWeather DlgAddCity::getSelectedCity() const { dStartFunct(); const QListWidgetItem * item = cityList->currentItem(); CityWeather cityInfo; if( item ) { cityInfo.setCity( QUrl::fromPercentEncoding(item->data(CityRole).toString().toUtf8()) ); cityInfo.setCountry( QUrl::fromPercentEncoding(item->data(CountryRole).toString().toUtf8()) ); cityInfo.setCountryCode( QUrl::fromPercentEncoding(item->data(CountryCodeRole).toString().toUtf8()) ); cityInfo.setExtraData( QUrl::fromPercentEncoding(item->data(ExtraDataRole).toString().toUtf8()) ); cityInfo.setProvider( QUrl::fromPercentEncoding(item->data(ProviderRole).toString().toUtf8()) ); } dDebug() << cityInfo.city() << cityInfo.country() << cityInfo.countryCode() << cityInfo.extraData() << cityInfo.provider(); dEndFunct(); return cityInfo; } I've found DStreamLogger::DStreamLogger in streamlogger.cpp but if I remove ::DStreamLogger it has no effect on the error but brings up a gcc44 error. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 05/04/2010 10:21 AM, Dave Plater wrote:
Hi, I have a gcc45 error in home:plater plasmoid-yawp which I can't understand :- /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp: In member function 'CityWeather DlgAddCity::getSelectedCity() const': /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: cannot call constructor 'DStreamLogger::DStreamLogger' directly /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: for a function-style cast, remove the redundant '::DStreamLogger' / in the code snippet where line 72 is dStartFunct();
What does dStartFunct look like?
CityWeather DlgAddCity::getSelectedCity() const { dStartFunct(); const QListWidgetItem * item = cityList->currentItem(); CityWeather cityInfo; if( item ) { cityInfo.setCity( QUrl::fromPercentEncoding(item->data(CityRole).toString().toUtf8()) ); cityInfo.setCountry( QUrl::fromPercentEncoding(item->data(CountryRole).toString().toUtf8()) ); cityInfo.setCountryCode( QUrl::fromPercentEncoding(item->data(CountryCodeRole).toString().toUtf8()) ); cityInfo.setExtraData( QUrl::fromPercentEncoding(item->data(ExtraDataRole).toString().toUtf8()) ); cityInfo.setProvider( QUrl::fromPercentEncoding(item->data(ProviderRole).toString().toUtf8()) ); } dDebug() << cityInfo.city() << cityInfo.country() << cityInfo.countryCode() << cityInfo.extraData() << cityInfo.provider(); dEndFunct(); return cityInfo; }
I've found DStreamLogger::DStreamLogger in streamlogger.cpp but if I remove ::DStreamLogger it has no effect on the error but brings up a gcc44 error.
Thanks Dave P
-- Robert Schweikert MAY THE SOURCE BE WITH YOU Software Engineer Consultant LINUX rschweikert@novell.com 781-464-8147 Novell Making IT Work As One -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 05/04/2010 04:25 PM, Robert Schweikert wrote:
On 05/04/2010 10:21 AM, Dave Plater wrote:
Hi, I have a gcc45 error in home:plater plasmoid-yawp which I can't understand :- /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp: In member function 'CityWeather DlgAddCity::getSelectedCity() const': /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: cannot call constructor 'DStreamLogger::DStreamLogger' directly /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: for a function-style cast, remove the redundant '::DStreamLogger' / in the code snippet where line 72 is dStartFunct();
What does dStartFunct look like?
Would this be what I was looking for, in streamlogger.h : #define dStartFunct() DStreamLogger::DStreamLogger(DStreamLogger::Tracing, LOGOUTPUT, __FILE__, __LINE__, Q_FUNC_INFO, 1) << "[function starts]" I've removed "::DStreamLogger" and it passes that error, there's another 8. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 05/04/2010 05:13 PM, Dave Plater wrote:
On 05/04/2010 04:25 PM, Robert Schweikert wrote:
On 05/04/2010 10:21 AM, Dave Plater wrote:
Hi, I have a gcc45 error in home:plater plasmoid-yawp which I can't understand :- /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp: In member function 'CityWeather DlgAddCity::getSelectedCity() const': /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: cannot call constructor 'DStreamLogger::DStreamLogger' directly /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: for a function-style cast, remove the redundant '::DStreamLogger' / in the code snippet where line 72 is dStartFunct();
What does dStartFunct look like?
Would this be what I was looking for, in streamlogger.h : #define dStartFunct() DStreamLogger::DStreamLogger(DStreamLogger::Tracing, LOGOUTPUT, __FILE__, __LINE__, Q_FUNC_INFO, 1) << "[function starts]"
I've removed "::DStreamLogger" and it passes that error, there's another 8. Thanks Dave P
When I originally searched for dStartFunct() I missed that for some reason, thanks for helping, I've fixed all nine and the package builds for factory. Thanks again Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 05/04/2010 11:13 AM, Dave Plater wrote:
On 05/04/2010 04:25 PM, Robert Schweikert wrote:
On 05/04/2010 10:21 AM, Dave Plater wrote:
Hi, I have a gcc45 error in home:plater plasmoid-yawp which I can't understand :- /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp: In member function 'CityWeather DlgAddCity::getSelectedCity() const': /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: cannot call constructor 'DStreamLogger::DStreamLogger' directly /usr/src/packages/BUILD/yawp-0.3.372/applet/configdialog/dlgaddcity.cpp:72:2: error: for a function-style cast, remove the redundant '::DStreamLogger' / in the code snippet where line 72 is dStartFunct();
What does dStartFunct look like?
Would this be what I was looking for, in streamlogger.h :
Yes.
#define dStartFunct() DStreamLogger::DStreamLogger(DStreamLogger::Tracing, LOGOUTPUT, __FILE__, __LINE__, Q_FUNC_INFO, 1) << "[function starts]"
I've removed "::DStreamLogger" and it passes that error, there's another 8.
Yes, that would be what the compiler complained about. Assuming there is no DStreamLogger namespace than the call to the constructor should just look like a function call, i.e. DStreamLogger(......). I am a bit surprised that this ever complied.
Thanks Dave P
-- Robert Schweikert MAY THE SOURCE BE WITH YOU Software Engineer Consultant LINUX rschweikert@novell.com 781-464-8147 Novell Making IT Work As One -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 05/04/2010 05:25 PM, Robert Schweikert wrote:
Yes, that would be what the compiler complained about. Assuming there is no DStreamLogger namespace than the call to the constructor should just look like a function call, i.e. DStreamLogger(......). I am a bit surprised that this ever complied.
The package came from svn which means it was still wip but it fixed a bug in my favourite weather plasmoid :-) It compiled and worked fine for 11.2 kde factory desktop. I've submitted the patch to the author. and the fixed package to kde4 community. Thanks Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
Dave Plater
-
Robert Schweikert