UIKit0 / freemedforms

Automatically exported from code.google.com/p/freemedforms
Other
0 stars 0 forks source link

jpeg file format not recognized during patient picture file selection in 0.9.0 (QT 4.8.4) #341

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set or change a patient's picture
2. Look for picture.jpeg file you just downloaded
3. Find nothing

What is the expected output? What do you see instead?

We see only jpg & png.
At least on Ubuntu 13.04, it is impossible to switch from IMAGE to "all files" 
to bypass the problem in the file selector window.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by contact@medecinelibre.com on 16 Nov 2013 at 6:46

GoogleCodeExporter commented 9 years ago

Original comment by contact@medecinelibre.com on 16 Nov 2013 at 6:49

GoogleCodeExporter commented 9 years ago
Good report !
As you can see the filter is not complete (only filtering .jpg not .jpEg). If 
you want to correct this yourself, you can edit the 

    plugins/patientbaseplugin/filephotoprovider.cpp

Find the lines

void FilePhotoProvider::startReceivingPhoto()
{
    QString fileName = QFileDialog::getOpenFileName(QApplication::activeWindow(), tr("Choose a photo"),
                                                    QDir::homePath(),
                                                    "Image (*.png *.jpg *.gif *.tiff)");
    if (!fileName.isEmpty()) {
        QPixmap photo;
        photo.load(fileName);
        Q_EMIT photoReady(photo);
    }
}

And try to guess where the problem is ;)

"Une piste"

    http://qt-project.org/doc/qt-5.0/qtwidgets/qfiledialog.html

Original comment by eric.mae...@gmail.com on 16 Nov 2013 at 7:44

GoogleCodeExporter commented 9 years ago
Fixed, closed.

Original comment by contact@medecinelibre.com on 28 Mar 2014 at 11:14