Bug 249552 - constness issue in part/archivemodel.h
Summary: constness issue in part/archivemodel.h
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 23:26 UTC by tropikhajma
Modified: 2010-08-31 02:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.5.2


Attachments
patch (958 bytes, patch)
2010-08-30 23:26 UTC, tropikhajma
Details

Note You need to log in before you can comment on or make changes to this bug.
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