I've just compiled Kink 0.2.1 in KDE 3.4.1 in SuSE
linux 9.2,
Great program, but there's an error in "kink.cpp" at
line 159:
The line is written as:
cmbDevices->insertItem(QString::fromAscii((const char
*)model, strlen(model)) + " on " + (type==PARPORT ?
"/dev/lp" : "/dev/usb/lp") + QString::number(port));
An error arraise with the message:
kink.cpp: In member function `void
KInk::add_device_to_list(int, int, unsigned char*)':
kink.cpp:159: error: invalid conversion from `unsigned
char*' to `const char*'
And the problem is that an extra cast is necessary to
make strlen from QString works as this:
strlen((const char *)model)
The correct line would look like this;
cmbDevices->insertItem(QString::fromAscii((const char
*)model, strlen((const char *)model)) + " on " +
(type==PARPORT ? "/dev/lp" : "/dev/usb/lp") +
QString::number(port));
and finally it would compile correctly, thanks =)
gatuus
Nobody/Anonymous
None
None
Public
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use