Changeset 0f3928f in subsurface


Ignore:
Timestamp:
Dec 11, 2013, 6:37:24 PM (4 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.0-branch, v4.0.3-branch, v4.2-branch, v4.4-branch, v4.5-branch
Children:
c230837
Parents:
841bdf3
git-author:
Thiago Macieira <thiago@…> (12/11/13 17:56:35)
git-committer:
Dirk Hohndel <dirk@…> (12/11/13 18:37:24)
Message:

Don't check if a file exists right before trying to open it

The open call will tell us what we need to know. Obviously we can't open
a file that doesn't exist. This saves us one stat() or Windows
equivalent.

Signed-off-by: Thiago Macieira <thiago@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-ui/subsurfacewebservices.cpp

    r841bdf3 r0f3928f  
    560560        if (filename) {
    561561                QFile f(filename);
    562                 if (f.exists()) {
    563                         f.open(QIODevice::ReadOnly);
     562                if (f.open(QIODevice::ReadOnly)) {
    564563                        uploadDives((QIODevice *)&f);
    565564                        f.close();
Note: See TracChangeset for help on using the changeset viewer.