2014-11-13 01:04:59 +02:00
|
|
|
#include "AppendCharacterAndVerifyJob.h"
|
|
|
|
|
|
|
|
AppendCharacterAndVerifyJob::AppendCharacterAndVerifyJob()
|
|
|
|
: AppendCharacterJob()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void AppendCharacterAndVerifyJob::setValues(QChar c, QString *stringref, const QString &expected)
|
|
|
|
{
|
|
|
|
AppendCharacterJob::setValues(c, stringref);
|
|
|
|
m_expected = expected;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AppendCharacterAndVerifyJob::run()
|
|
|
|
{
|
|
|
|
using namespace ThreadWeaver;
|
|
|
|
QMutexLocker locker ( &s_GlobalMutex );
|
|
|
|
stringRef()->append( c() );
|
|
|
|
if (m_expected.mid(0, stringRef()->length()) != *stringRef()) {
|
2016-05-03 01:13:15 +00:00
|
|
|
kDebug() << "It broke!";
|
2014-11-13 01:04:59 +02:00
|
|
|
}
|
2016-05-03 01:13:15 +00:00
|
|
|
kDebug() << c().toLatin1() << "appended, result is" << qPrintable( *stringRef() );
|
2014-11-13 01:04:59 +02:00
|
|
|
}
|