Browse Source

Avatar Choosing Dialog

Explicitly filtering out images for the avatar selection dialog.
pull/1134/head
Chloe 11 years ago
parent
commit
b2ba58ed61
  1. 5
      src/widget/widget.cpp

5
src/widget/widget.cpp

@ -344,7 +344,10 @@ QString Widget::getUsername() @@ -344,7 +344,10 @@ QString Widget::getUsername()
void Widget::onAvatarClicked()
{
QString filename = QFileDialog::getOpenFileName(this, tr("Choose a profile picture"), QDir::homePath());
QString filename = QFileDialog::getOpenFileName(this,
tr("Choose a profile picture"),
QDir::homePath(),
tr("Images (*.png *.jpg)"));//TODO: cover all types of images QPixmap can use reliably
if (filename.isEmpty())
return;
QFile file(filename);

Loading…
Cancel
Save