[Facebook] Resize the profile before sending it

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2017-09-29 14:15:24 +02:00 committed by Dirk Hohndel
parent 2db4f626ed
commit 9b1a949a39

View file

@ -10,7 +10,6 @@
#include <QNetworkCookieJar>
#include <QUrlQuery>
#include <QEventLoop>
#include <QHttpMultiPart>
#include <QFile>
#include <QBuffer>
@ -194,9 +193,14 @@ void FacebookManager::sendDive()
requestAlbumId();
ProfileWidget2 *profile = MainWindow::instance()->graphics();
auto currSize = profile->size();
profile->resize(1024,768);
profile->setToolTipVisibile(false);
QPixmap pix = profile->grab();
profile->setToolTipVisibile(true);
profile->resize(currSize);
QByteArray bytes;
QBuffer buffer(&bytes);
buffer.open(QIODevice::WriteOnly);