Summary: | Qalculate backend fails to build | ||
---|---|---|---|
Product: | [Applications] cantor | Reporter: | Antonio Rojas <arojas> |
Component: | qualculate-backend | Assignee: | Alexander Rieder <alexanderrieder> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aacid, demm, filipe, heiko.becker, lucashnegri |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/cantor/ceadbd453cfb4263755931635cb9b02d7aa29efa | Version Fixed In: | |
Attachments: |
build log
Build log cantor 15.08rc build log with suggested fix |
Description
Antonio Rojas
2015-07-29 06:38:07 UTC
Created attachment 93786 [details]
build log
Filipe? Lucas? Created attachment 93921 [details]
Build log cantor 15.08rc
Same fail with 15.08rc
Hi Antonio, looks like this problem is related with gcc or Qt version. I can not to reproduce this bug using gcc 4.9.2 and Qt 5.4.2 here. The problem is related with == operator comparing a C++ string and a QLatin1String. Please, use the follow codes in respective lines in src/backends/qalculate/qalculateexpression.cpp file: Line 776: QLatin1String(plotParameters.filename.substr(p-4,4)) == QLatin1String(".eps")) || Line 778: QLatin1String(plotParameters.filename.substr(p-3,3)) == QLatin1String(".ps"))) Let me know if it fixes the problems. I'm on vacation and won't be able to test before 15.08 tagging, it would be great if someone else using gcc5/qt5.5 could do it. > Let me know if it fixes the problems.
Unfortunately it doesn't, see attached log. Isn't QLatin1String intended to be used with string literals?
Created attachment 93946 [details]
build log with suggested fix
compiles fine for me in ubuntu wily (gcc5.1 and qt 5.4) and archlinux gcc5.2 and qt 5.5). A std::string can be compared to a char array, i.e. substr() == ".eps". No need to convert both to a QString. Git commit ceadbd453cfb4263755931635cb9b02d7aa29efa by Heiko Becker. Committed on 23/08/2015 at 13:49. Pushed by heikobecker into branch 'Applications/15.08'. Fix building the qalculate backend Thanks to Christoph Feck who suggested the fix. REVIEW: 124829 M +3 -3 src/backends/qalculate/qalculateexpression.cpp http://commits.kde.org/cantor/ceadbd453cfb4263755931635cb9b02d7aa29efa |