src/basics.h

changeset 237
10a6298f636f
parent 235
7ef03c2b46ab
child 259
c27612f0eac0
equal deleted inserted replaced
236:1fa0e1de9f0a 237:10a6298f636f
298 using Graph = std::deque<GraphEdge<T>>; 298 using Graph = std::deque<GraphEdge<T>>;
299 299
300 struct Message 300 struct Message
301 { 301 {
302 QDateTime time; 302 QDateTime time;
303 enum { Info, Warning, Error } type; 303 enum Type { Info, Warning, Error } type;
304 QString text; 304 QString text;
305 }; 305 };
306 306
307 Q_DECLARE_METATYPE(Message)
308
307 inline Message logInfo(const QString text) 309 inline Message logInfo(const QString text)
308 { 310 {
309 return Message{.time = QDateTime::currentDateTime(), .type = Message::Info, .text = text}; 311 return Message{.time = QDateTime::currentDateTime(), .type = Message::Info, .text = text};
310 } 312 }
311 313

mercurial