fixed msvc crash

This commit is contained in:
Patrick von Reth 2014-03-23 17:14:27 +01:00
parent 9928a6040a
commit 012904645e
2 changed files with 1 additions and 19 deletions

View File

@ -30,7 +30,6 @@ class Loger
{
public:
static int s_debugLevel;
static QTextStream s_textStream;
@ -74,15 +73,10 @@ static inline QTextStream &logFile()
return *s_out;
}
static inline QTextStream &outStream()
{
return s_textStream;
}
};
int Loger::s_debugLevel = -1;
QTextStream Loger::s_textStream(stdout);
SnoreLog::SnoreLog(SnoreDebugLevels lvl):
QDebug(&m_msg),
@ -99,8 +93,7 @@ SnoreLog::~SnoreLog()
}
if(Loger::debugLvl() >= m_lvl)
{
Loger::outStream() << m_msg << "\n";
Loger::outStream().flush();
std::cout << m_msg.toLatin1().constData() << std::endl;
}
}
@ -108,8 +101,3 @@ void SnoreLog::setDebugLvl(int i)
{
Loger::s_debugLevel = i;
}
void SnoreLog::setOutputDevice(QIODevice *device)
{
Loger::s_textStream.setDevice(device);
}

View File

@ -90,12 +90,6 @@ public:
*/
static void setDebugLvl(int lvl);
/**
* Sets the output device, the default is stdout
* @param device the output device
*/
static void setOutputDevice(QIODevice *device);
private:
SnoreDebugLevels m_lvl;
QString m_msg;