small fixes in Image

This commit is contained in:
fourtf
2019-09-22 10:27:05 +02:00
parent 038fdd5446
commit da4714944d
4 changed files with 38 additions and 34 deletions
+14 -5
View File
@@ -1,16 +1,15 @@
#pragma once
#include "common/Aliases.hpp"
#include "common/Outcome.hpp"
#include "common/ProviderId.hpp"
#include <QString>
#include <QWidget>
#include <boost/optional.hpp>
#include <boost/preprocessor.hpp>
#include <string>
#include "common/Aliases.hpp"
#include "common/Outcome.hpp"
#include "common/ProviderId.hpp"
namespace chatterino {
enum class HighlightState {
@@ -46,4 +45,14 @@ enum class CopyMode {
OnlyTextAndEmotes,
};
struct DeleteLater {
void operator()(QObject *obj)
{
obj->deleteLater();
}
};
template <typename T>
using QObjectPtr = std::unique_ptr<T, DeleteLater>;
} // namespace chatterino