#include "support/lassert.h"
#include "support/Timeout.h"
-#include "support/bind.h"
-
+#include <list>
#include <queue>
#include <memory>
#include <set>
/// We modify a local copy of the image once it is loaded.
ImagePtr image_;
/// This signal is emitted when the image loading status changes.
- signals2::signal<void()> signal_;
+ signal<void()> signal_;
/// The connection of the signal statusChanged
- signals2::scoped_connection connection_;
+ scoped_connection connection_;
double displayPixelRatio() const
{
void Loader::startLoading() const
{
- if (pimpl_->status_ != WaitingToLoad || !pimpl_->cached_item_)
+ if (pimpl_->status_ != WaitingToLoad || !pimpl_->cached_item_
+ || pimpl_->cached_item_->status() == Converting)
return;
pimpl_->startLoading();
}
}
-signals2::connection Loader::connect(slot const & slot) const
+connection Loader::connect(slot const & slot) const
{
return pimpl_->signal_.connect(slot);
}
// new file.
bool continue_monitoring = false;
- if (!old_file.empty()) {
+ if (cached_item_ && !old_file.empty()) {
continue_monitoring = cached_item_->monitoring();
// cached_item_ is going to be reset, so the connected
// signal needs to be disconnected.