aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qfileinfo-exists/main.cpp
blob: b1411e578dfbd3c4fb15569cabd3538c31c030c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <QtCore/QFileInfo>

int test1()
{
    if (QFileInfo("foo").exists()) // Warning
        return 0;

    if (QFileInfo::exists("foo")) // OK
        return 0;

    QFileInfo info;
    if (info.exists("foo")) // OK
        return 0;

    if (QFileInfo(QFile("foo")).exists()) // OK
        return 0;

    return 1;
}