mirror of https://github.com/djcb/mu.git
message: some fixes for github ci build
This commit is contained in:
parent
c63755f749
commit
5a28cdfba4
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace Mu {
|
||||
|
||||
struct MimeObject; // forward declaration
|
||||
class MimeObject; // forward declaration
|
||||
|
||||
class MessagePart {
|
||||
public:
|
||||
|
|
|
@ -81,7 +81,7 @@ Message::Message(const std::string& path, const std::string& mdir):
|
|||
g_strerror(errno));
|
||||
|
||||
if (!S_ISREG(statbuf.st_mode))
|
||||
throw Error(Error::Code::File, "not a regular file: %s", path);
|
||||
throw Error(Error::Code::File, "not a regular file: %s", path.c_str());
|
||||
|
||||
init_gmime();
|
||||
if (auto msg{MimeMessage::make_from_file(path)}; !msg)
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
*
|
||||
* @param obj a gobject. A ref is added.
|
||||
*/
|
||||
Object(GObject* &&obj): self_{g_object_ref(obj)} {
|
||||
Object(GObject* &&obj): self_{G_OBJECT(g_object_ref(obj))} {
|
||||
if (!G_IS_OBJECT(obj))
|
||||
throw std::runtime_error("not a g-object");
|
||||
}
|
||||
|
@ -80,7 +80,8 @@ public:
|
|||
|
||||
if (this != &other) {
|
||||
auto oldself = self_;
|
||||
self_ = other.self_ ? g_object_ref(other.self_) : nullptr;
|
||||
self_ = other.self_ ?
|
||||
G_OBJECT(g_object_ref(other.self_)) : nullptr;
|
||||
if (oldself)
|
||||
g_object_unref(oldself);
|
||||
}
|
||||
|
@ -137,7 +138,11 @@ private:
|
|||
mutable GObject *self_{};
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Thin wrapper around a GMimeOContentType
|
||||
*
|
||||
*/
|
||||
struct MimeContentType: public Object {
|
||||
|
||||
MimeContentType(GMimeContentType *ctype) : Object{G_OBJECT(ctype)} {
|
||||
|
|
Loading…
Reference in New Issue