PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : KDElibs 3.5.1 - Kompilierungsproblem auf Tru64



HEMIcuda
01-02-2006, 19:06
Was macht man nicht alles aus Langeweile, z.B. eben auch KDE auf einer Alpha unter Tru64 kompilieren wollen.
Nach einigen Workarounds und Fixes haenge ich im Moment bei den Unit-Tests der kdelibs. Der entsprechende Code, bei dem er rausfliegt, lautet

template<class T>
operator T() {
T t;
dcopTypeInit(t);
if ( typeCheck( dcopTypeName(t), true ) ) {
QDataStream reply( data, IO_ReadOnly );
reply >> t;
}
return t;
}
die Fehlermeldung

cxx: Error: ../dcop/dcopref.h, line 59: no operator ">>" matches these
operands
operand types are: QDataStream >> const QStringList
detected during instantiation of
"DCOPReply::operator T() [with T=const QStringList]" at
line 2305 of "kactionclasses.cpp"
reply >> t;
------------------^
cxx: Info: 1 error detected in the compilation of "kactionclasses.cpp".

Der verwendete Compiler ist der Compaq CXX.
Ich haeng da jetzt etwas in der Luft, zumal hier ja ganz offenbar versucht wird, einen Stream in eine const Liste zu schreiben.

Fuer sachdienliche Hinweise waere ich ziemlich dankbar.

Danke,

'cuda

peschmae
01-02-2006, 19:53
Hast du auch mal noch das Stück Code mit der const QStringlist?

MfG Peschmä

HEMIcuda
01-02-2006, 20:16
Jup.


void KPasteTextAction::menuAboutToShow()
{
m_popup->clear();
QStringList list;
DCOPClient *client = kapp->dcopClient();
if (client->isAttached() && client->isApplicationRegistered("klipper")) {
DCOPRef klipper("klipper","klipper");
DCOPReply reply = klipper.call("getClipboardHistoryMenu");
if (reply.isValid())
-> list = reply;
}
QString clipboardText = qApp->clipboard()->text(QClipboard::Clipboard);
if (list.isEmpty())
list << clipboardText;
bool found = false;
for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
{
QString text = KStringHandler::cEmSqueeze((*it).simplifyWhiteSpac e(), m_popup->fontMetrics(), 20);
text.replace("&", "&&");
int id = m_popup->insertItem(text);
if (!found && *it == clipboardText)
{
m_popup->setItemChecked(id, true);
found = true;
}
}
}

Beim -> steigt er aus.

'cuda