Bug 249552

Summary: constness issue in part/archivemodel.h
Product: [Applications] ark Reporter: tropikhajma <tropikhajma>
Component: generalAssignee: Harald Hvaal <metellius>
Status: RESOLVED FIXED    
Severity: normal CC: rakuco
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In: 4.5.2
Attachments: patch

Description tropikhajma 2010-08-30 23:26:23 UTC
Created attachment 51121 [details]
patch

Version:           unspecified (using KDE 4.5.0) 
OS:                Solaris

Hi,
while the header file uses
Kerfuffle::ExtractJob* extractFile(const QVariant& fileName, const QString & destinationDir, Kerfuffle::ExtractionOptions options = Kerfuffle::ExtractionOptions()) const;
the cpp file uses
Kerfuffle::ExtractJob* extractFile(const QVariant& fileName, const QString & destinationDir, const Kerfuffle::ExtractionOptions options = Kerfuffle::ExtractionOptions()) const;

this causes a problem with the Sun Studio compiler which distinguishes between a const and nonconst function/variable (arkpart.so is generated with an undefined symbol)

the attached patch fixes the issue for me

Reproducible: Always
Comment 1 Raphael Kubo da Costa 2010-08-31 01:59:08 UTC
SVN commit 1170166 by rkcosta:

Fix constness of extractFile() parameters in the header file.

'options' is a const parameter in archivemodel.cpp, and should be so in
the header declaration as well.

This should fix compilation with Sun Studio.

Patch by tropikhajma AT gmail.com, thanks!

BUG: 249552
FIXED-IN: 4.5.2

 M  +1 -1      archivemodel.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170166
Comment 2 Raphael Kubo da Costa 2010-08-31 02:00:19 UTC
SVN commit 1170167 by rkcosta:

Fix constness of extractFile() parameters in the header file.

'options' is a const parameter in archivemodel.cpp, and should be so in
the header declaration as well.

This should fix compilation with Sun Studio.

Patch by tropikhajma AT gmail.com, thanks!

Forward-port of r1170166.

CCBUG: 249552

 M  +1 -1      archivemodel.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170167