| 149 | } |
| 150 | |
| 151 | QByteArray Common::readAllFileByteContents(const QString &filename) |
| 152 | { |
| 153 | QFile file(filename); |
| 154 | |
| 155 | if (!filename.isEmpty() && file.open(QFile::ReadOnly)) { |
| 156 | const QByteArray a = file.readAll(); |
| 157 | file.close(); |
| 158 | return a; |
| 159 | } |
| 160 | |
| 161 | return QByteArray(); |
| 162 | } |
| 163 | |
| 164 | void Common::sleep(int ms) |
| 165 | { |