added if defined for Windows use emoticons from extern

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@948 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-01-25 18:25:36 +00:00
parent 2682400bbe
commit 30b6e6c423
2 changed files with 19 additions and 2 deletions

View File

@ -992,7 +992,11 @@ void PeersDialog::displayInfoChatMenu(const QPoint& pos)
void PeersDialog::loadEmoticonsgroupchat()
{
QString sm_codes;
QFile sm_file(QString(":/emoticons/emotes.acs"));
#if defined(Q_OS_WIN32)
QFile sm_file(QApplication::applicationDirPath() + "/emoticons/emotes.acs");
#else
QFile sm_file(QString(":/emoticons/emotes.acs"));
#endif
if(!sm_file.open(QIODevice::ReadOnly))
{
std::cerr << "Could not open resouce file :/emoticons/emotes.acs" << endl ;
@ -1039,7 +1043,11 @@ void PeersDialog::loadEmoticonsgroupchat()
}
i++;
if(!smcode.isEmpty() && !smfile.isEmpty())
smileys.insert(smcode, ":/"+smfile);
#if defined(Q_OS_WIN32)
smileys.insert(smcode, smfile);
#else
smileys.insert(smcode, ":/"+smfile);
#endif
}
}

View File

@ -389,7 +389,11 @@ void PopupChatDialog::loadEmoticons2()
void PopupChatDialog::loadEmoticons()
{
QString sm_codes;
#if defined(Q_OS_WIN32)
QFile sm_file(QApplication::applicationDirPath() + "/emoticons/emotes.acs");
#else
QFile sm_file(QString(":/emoticons/emotes.acs"));
#endif
if(!sm_file.open(QIODevice::ReadOnly))
{
std::cout << "error opening ressource file" << std::endl ;
@ -436,7 +440,12 @@ void PopupChatDialog::loadEmoticons()
}
i++;
if(!smcode.isEmpty() && !smfile.isEmpty())
#if defined(Q_OS_WIN32)
smileys.insert(smcode, smfile);
#else
smileys.insert(smcode, ":/"+smfile);
#endif
}
}