Change RetroShareLink creation methodes as static

And remove this warning:
This commit is contained in:
Phenom 2017-07-16 13:11:47 +02:00
parent 2d5e1d637f
commit 82addce867
28 changed files with 273 additions and 234 deletions

View file

@ -1464,8 +1464,8 @@ void TransfersDialog::copyLink ()
continue;
}
RetroShareLink link;
if (link.createFile(QString::fromUtf8(info.fname.c_str()), info.size, QString::fromStdString(info.hash.toStdString()))) {
RetroShareLink link = RetroShareLink::createFile(QString::fromUtf8(info.fname.c_str()), info.size, QString::fromStdString(info.hash.toStdString()));
if (link.valid()) {
links.push_back(link) ;
}
}
@ -1487,8 +1487,8 @@ void TransfersDialog::ulCopyLink ()
continue;
}
RetroShareLink link;
if (link.createFile(QString::fromUtf8(info.fname.c_str()), info.size, QString::fromStdString(info.hash.toStdString()))) {
RetroShareLink link = RetroShareLink::createFile(QString::fromUtf8(info.fname.c_str()), info.size, QString::fromStdString(info.hash.toStdString()));
if (link.valid()) {
links.push_back(link) ;
}
}