2
* Copyright (C) 2010-2011 David Edmundson.
3
* Author: David Edmundson <kde@davidedmundson.co.uk>
5
* This program is free software: you can redistribute it and/or modify it under
6
* the terms of the GNU General Public License as published by the Free Software
7
* Foundation, either version 3 of the License, or (at your option) any later
8
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
12
#include <QtGui/QApplication>
19
//temp code to redirect qDebug to a file which can be handy for real debugging.
20
void messageHandler(QtMsgType type, const char *msg)
25
txt = QString("Debug: %1").arg(msg);
28
txt = QString("Warning: %1").arg(msg);
31
txt = QString("Critical: %1").arg(msg);
34
txt = QString("Fatal: %1").arg(msg);
38
QFile outFile("/home/david/temp/log");
39
outFile.open(QIODevice::WriteOnly | QIODevice::Append);
40
QTextStream ts(&outFile);
44
int main(int argc, char *argv[])
46
QApplication app(argc, argv);
47
// qInstallMsgHandler(messageHandler);