1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#ifndef TESTUTILS_H
#define TESTUTILS_H
#include <QString>
#include <QUrl>
#include <fstream>
QByteArray loadFile(const QString& path);
/**
* Disable all qDebug output while it is alive
*/
class QtDebugSilencer {
public:
QtDebugSilencer();
~QtDebugSilencer();
private:
QtMessageHandler mOldHandler;
};
// Let Catch know how to print some Qt types
std::ostream& operator<<(std::ostream& ostr, const QString& str);
std::ostream& operator<<(std::ostream& ostr, const QUrl& url);
#endif // TESTUTILS_H
|