QDataStream & operator>>(QDataStream & dataStream, FtpAccount & ftpAccount)
{
QString hostname;
dataStream >> hostname;
ftpAccount.setHostname(hostname);
quint16 port;
dataStream >> (quint16&)port;
ftpAccount.setPort(port);
QString username;
dataStream >> username;
ftpAccount.setUsername(username);
QString password;
dataStream >> password;
ftpAccount.setPassword(password);
return dataStream;
}
FtpAccount.cpp:61: ошибка: ambiguous overload for 'operator>>' (operand types are 'QDataStream' and 'quint16 {aka short unsigned int}')
dataStream >> (quint16&)port;
^
Но как?