+ // Registration with picture. Send picture to server
+ if(myMainw->settingsDialog->registerDialog->getPicture() != "" )//&& error == false)
+ {
+ qDebug() << "__Registration with picture";
+ QFile pictureFile( myMainw->settingsDialog->registerDialog->getPicture() );
+ if (!pictureFile.open(QIODevice::ReadOnly))
+ {
+ qDebug() << "__picture read fail";
+ return;
+ }
+ //currentDownload = netManager->post(request, pictureFile.readAll());
+ currentDownload = netManager->post(request, ("xml=" + regbuffer->data(), "avatar=" + pictureFile.readAll()));
+ //connect(currentDownload, SIGNAL(finished()), this, SLOT(ackOfSendingPicture()));
+ pictureFile.close();
+ }
+ // Registration Without picture
+ else
+ {
+ qDebug() << "____Registration without picture";
+ currentDownload = netManager->post(request, ("xml=" + regbuffer->data()));
+ }
+