mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 15:51:29 -04:00
Fixed utf8 issues (Patch from Asamk #3393353)
SearchDialog: enable search for strings containing utf8 characters, I assume that filenames are always stored as utf8 on all platforms ConnectFriendWizard: adding friends with gpg key or from file, now sets location name correctly notifyqt: setting status message in chatwindow works correctly now, when a friend changes his message while the chat window is open git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4635 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e3798dafe9
commit
7e3a342a9a
3 changed files with 20 additions and 20 deletions
|
@ -271,7 +271,7 @@ void MessageWidget::getcurrentrecommended()
|
|||
|
||||
switch (it->column()) {
|
||||
case COLUMN_FILE_NAME:
|
||||
fi.fname = it->data().toString().toStdString() ;
|
||||
fi.fname = it->data().toString().toUtf8().constData();
|
||||
break ;
|
||||
case COLUMN_FILE_SIZE:
|
||||
fi.size = it->data().toULongLong() ;
|
||||
|
@ -287,7 +287,7 @@ void MessageWidget::getcurrentrecommended()
|
|||
std::cout << "Requesting file " << fi.fname << ", size=" << fi.size << ", hash=" << fi.hash << std::endl ;
|
||||
|
||||
if (rsFiles->FileRequest(fi.fname, fi.hash, fi.size, "", RS_FILE_HINTS_NETWORK_WIDE, srcIds) == false) {
|
||||
QMessageBox mb(QObject::tr("File Request canceled"), QObject::tr("The following has not been added to your download list, because you already have it:\n ") + QString::fromStdString(fi.fname), QMessageBox::Critical, QMessageBox::Ok, 0, 0);
|
||||
QMessageBox mb(QObject::tr("File Request canceled"), QObject::tr("The following has not been added to your download list, because you already have it:\n ") + QString::fromUtf8(fi.fname.c_str()), QMessageBox::Critical, QMessageBox::Ok, 0, 0);
|
||||
mb.setWindowIcon(QIcon(QString::fromUtf8(":/images/rstray3.png")));
|
||||
mb.exec();
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ void MessageWidget::fill(const std::string &msgId)
|
|||
QList<QTreeWidgetItem*> items;
|
||||
for (it = recList.begin(); it != recList.end(); it++) {
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem;
|
||||
item->setText(COLUMN_FILE_NAME, QString::fromStdString(it->fname));
|
||||
item->setText(COLUMN_FILE_NAME, QString::fromUtf8(it->fname.c_str()));
|
||||
item->setText(COLUMN_FILE_SIZE, QString::number(it->size));
|
||||
item->setText(COLUMN_FILE_HASH, QString::fromStdString(it->hash));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue