diff -r 2b40d63a9c3d -r 90517678cc4f qtmobility/src/versit/qversitwriter_p.cpp --- a/qtmobility/src/versit/qversitwriter_p.cpp Fri Apr 16 15:51:22 2010 +0300 +++ b/qtmobility/src/versit/qversitwriter_p.cpp Mon May 03 13:18:40 2010 +0300 @@ -50,6 +50,7 @@ #include #include #include +#include QTM_USE_NAMESPACE @@ -68,13 +69,21 @@ { } +/*! Links the signals from this to the signals of \a writer. */ +void QVersitWriterPrivate::init(QVersitWriter* writer) +{ + qRegisterMetaType("QVersitWriter::State"); + connect(this, SIGNAL(stateChanged(QVersitWriter::State)), + writer, SIGNAL(stateChanged(QVersitWriter::State)), Qt::DirectConnection); +} + /*! * Do the actual writing and set the error and state appropriately. */ void QVersitWriterPrivate::write() { bool canceled = false; - foreach (QVersitDocument document, mInput) { + foreach (const QVersitDocument& document, mInput) { if (isCanceling()) { canceled = true; break;