44 @type str |
44 @type str |
45 @return contents of the file |
45 @return contents of the file |
46 @rtype str |
46 @rtype str |
47 """ |
47 """ |
48 dataFile = QFile(filename) |
48 dataFile = QFile(filename) |
49 if filename and dataFile.open(QFile.ReadOnly): |
49 if filename and dataFile.open(QIODevice.OpenModeFlag.ReadOnly): |
50 contents = dataFile.readAll() |
50 contents = dataFile.readAll() |
51 dataFile.close() |
51 dataFile.close() |
52 return contents |
52 return contents |
53 |
53 |
54 return QByteArray() |
54 return QByteArray() |