MCPcopy Create free account
hub / github.com/Kitware/CMake / main

Function main

Tests/QtAutogen/RccObjectLibrary/main.cpp:9–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "rcc_obj.h"
8
9int main(int argc, char* argv[])
10{
11 QCoreApplication app(argc, argv);
12
13 // Test that the resource from the OBJECT library is accessible
14 QString resourcePath = RccObj::resourceContent();
15 if (!QFile::exists(resourcePath)) {
16 std::cerr << "Resource not found: " << resourcePath.toStdString()
17 << std::endl;
18 return 1;
19 }
20
21 QFile file(resourcePath);
22 if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
23 std::cerr << "Failed to open resource: " << resourcePath.toStdString()
24 << std::endl;
25 return 1;
26 }
27
28 QString content = file.readAll();
29 if (content.isEmpty()) {
30 std::cerr << "Resource content is empty" << std::endl;
31 return 1;
32 }
33
34 std::cout << "Resource content: " << content.toStdString() << std::endl;
35 std::cout << "Test passed!" << std::endl;
36
37 return 0;
38}

Callers

nothing calls this directly

Calls 1

openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…