Commit 3b03db53 authored by Jan Möbius's avatar Jan Möbius

Support Builds with VS2010 and Qt 4.8

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13286 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6681d133
This diff is collapsed.
......@@ -975,9 +975,6 @@ public:
private:
void writeImageQPixmap(QPixmap* _pixmap, const QString _name) const;
void writeImageQImage(QImage* _image, const QString _name) const;
// Store pointers to QFuture and QFutureWatcher
std::map<QFutureWatcher<void>*,QFuture<void>*> watcher_garbage_;
......
......@@ -770,10 +770,16 @@ void CoreWidget::applicationSnapshotName(QString _name) {
snapshotCounter_ = 0;
}
void writeImageQPixmap(QPixmap* _pixmap, const QString _name) {
_pixmap->save(_name);
delete _pixmap;
}
void CoreWidget::writeImageAsynchronously(QPixmap* _pixmap, const QString _name) {
QFuture<void>* future = new QFuture<void>();
*future = QtConcurrent::run(this, &CoreWidget::writeImageQPixmap, _pixmap, _name);
*future = QtConcurrent::run(writeImageQPixmap, _pixmap, _name);
QFutureWatcher<void>* watcher = new QFutureWatcher<void>();
watcher->setFuture(*future);
......@@ -782,16 +788,18 @@ void CoreWidget::writeImageAsynchronously(QPixmap* _pixmap, const QString _name)
connect(watcher, SIGNAL(finished()), this, SLOT(delete_garbage()));
}
void CoreWidget::writeImageQPixmap(QPixmap* _pixmap, const QString _name) const {
_pixmap->save(_name);
delete _pixmap;
void writeImageQImage(QImage* _image, const QString _name) {
_image->save(_name);
delete _image;
}
void CoreWidget::writeImageAsynchronously(QImage* _image, const QString _name) {
QFuture<void>* future = new QFuture<void>();
*future = QtConcurrent::run(this, &CoreWidget::writeImageQImage, _image, _name);
*future = QtConcurrent::run(writeImageQImage, _image, _name);
QFutureWatcher<void>* watcher = new QFutureWatcher<void>();
watcher->setFuture(*future);
......@@ -800,11 +808,7 @@ void CoreWidget::writeImageAsynchronously(QImage* _image, const QString _name) {
connect(watcher, SIGNAL(finished()), this, SLOT(delete_garbage()));
}
void CoreWidget::writeImageQImage(QImage* _image, const QString _name) const {
_image->save(_name);
delete _image;
}
void CoreWidget::delete_garbage() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment