Debian Codegraph @

vendored-meson/meson/test cases/frameworks/4 qt/subfolder/main.cpp

raw
1 #include <QImage>
2 #include <QFile>
3 #include <QString>
4
5 int main(int argc, char **argv) {
6 #ifndef UNITY_BUILD
7 Q_INIT_RESOURCE(stuff3);
8 Q_INIT_RESOURCE(stuff4);
9 #endif
10
11 for(auto fname:{":/thing.png", ":/thing4.png"})
12 {
13 QImage img1(fname);
14 if(img1.width() != 640) {
15 return 1;
16 }
17 }
18
19 for(auto fname:{":/txt_resource.txt",":/txt_resource2.txt"})
20 {
21 QFile file(fname);
22 if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
23 return 1;
24 QString line = file.readLine();
25 if(line.compare("Hello World"))
26 return 1;
27 }
28 return 0;
29 }