compile error in kdeartwork from 3.5 branch
Frank Osterfeld
frank.osterfeld at gmx.de
Tue Jan 24 00:21:55 GMT 2006
Trying to compile kdeartwork from 3.5 branch, I get compile errors in
kdeartwork/kscreensaver/kxsconfig/kxscontrol.cpp, using
gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
from Kubuntu breezy.
All errors look like this:
---------------------------------------------------------------------
kxscontrol.cpp: In constructor ‘KXSRangeControl::KXSRangeControl(QWidget*,
const QString&, const QXmlAttributes&)’:
kxscontrol.cpp:54: error: no matching function for call to ‘i18n(QString&)’
/opt2/kde-3.5/include/klocale.h:78: note: candidates are: QString i18n(const
char*)
/opt2/kde-3.5/include/klocale.h:87: note: QString i18n(const
char*, const char*)
/opt2/kde-3.5/include/klocale.h:100: note: QString i18n(const
char*, const char*, long unsigned int)
---------------------------------------------------------------------
The problem are calls like i18n(mLabel), where mLabel is a QString:
new QLabel(i18n(mLabel), this);
To make it compile, I tried two ways, both attached as patch.
1) removing i18n:
new QLabel(mLabel, this);
2) adding .utf8():
new QLabel(i18n(mLabel.toUtf8()), this);
Both fix compilation.
1) makes most sense to me. It seems the label values are read from XML, so I
don't know how i18n() should work here at all. However, I leave that to the
people knowing also the most esoteric uses of i18n, maybe I am missing
something here.
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeartwork-compile-fix-2.diff
Type: text/x-diff
Size: 4281 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060124/c91d69bc/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdeartwork-compile-fix-1.diff
Type: text/x-diff
Size: 4063 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060124/c91d69bc/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060124/c91d69bc/attachment.sig>
More information about the kde-core-devel
mailing list