aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/options/optw_identity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/options/optw_identity.cpp')
-rw-r--r--src/modules/options/optw_identity.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/modules/options/optw_identity.cpp b/src/modules/options/optw_identity.cpp
index 65ff00b63..97106285e 100644
--- a/src/modules/options/optw_identity.cpp
+++ b/src/modules/options/optw_identity.cpp
@@ -591,7 +591,7 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
{
// downloaded!
// try to load it
- if(!m_pLocalAvatar->load(dlg.localFileName().utf8().data()))
+ if(!m_pLocalAvatar->load(dlg.localFileName()))
{
// unloadable
szCurrent = "";
@@ -616,7 +616,7 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
}
} else {
// this is a local path
- if(m_pLocalAvatar->load(szCurrent.utf8().data()))
+ if(m_pLocalAvatar->load(szCurrent))
{
// local path, loaded
QString tmp = szCurrent;
@@ -642,14 +642,17 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
}
}
- if((m_pLocalAvatar->pixmap()->width() > 1024) || (m_pLocalAvatar->pixmap()->height() > 768))
+ if(m_pLocalAvatar->pixmap())
{
- QMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"),
- __tr2qs_ctx("The avatar you have choosen is bigger than 1024x768 pixels.<br>" \
- "Such a big image will not be seen on all the user monitors<br>" \
- "and will probably be scaled by the remote clients with poor quality<br>" \
- "algorithms to improve performance. You *should* scale it manually<br>" \
- "to a sane size (like 800x600) or choose a different image.","options"));
+ if((m_pLocalAvatar->pixmap()->width() > 1024) || (m_pLocalAvatar->pixmap()->height() > 768))
+ {
+ QMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"),
+ __tr2qs_ctx("The avatar you have choosen is bigger than 1024x768 pixels.<br>" \
+ "Such a big image will not be seen on all the user monitors<br>" \
+ "and will probably be scaled by the remote clients with poor quality<br>" \
+ "algorithms to improve performance. You *should* scale it manually<br>" \
+ "to a sane size (like 800x600) or choose a different image.","options"));
+ }
}
m_pAvatarNameEdit->setText(szCurrent);