annotate changeset.cpp @ 112:4bd17f36d059

* Make diff binary a settings property; some tidying
author Chris Cannam
date Fri, 26 Nov 2010 17:02:55 +0000
parents 8ae3b44c0073
children 63c2f3f61c79
rev   line source
Chris@57 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@57 2
Chris@57 3 /*
Chris@57 4 EasyMercurial
Chris@57 5
Chris@57 6 Based on HgExplorer by Jari Korhonen
Chris@57 7 Copyright (c) 2010 Jari Korhonen
Chris@57 8 Copyright (c) 2010 Chris Cannam
Chris@57 9 Copyright (c) 2010 Queen Mary, University of London
Chris@57 10
Chris@57 11 This program is free software; you can redistribute it and/or
Chris@57 12 modify it under the terms of the GNU General Public License as
Chris@57 13 published by the Free Software Foundation; either version 2 of the
Chris@57 14 License, or (at your option) any later version. See the file
Chris@57 15 COPYING included with this distribution for more information.
Chris@57 16 */
Chris@57 17
Chris@43 18 #include "changeset.h"
Chris@106 19
Chris@106 20 #include <QVariant>
Chris@106 21
Chris@106 22 Changeset::Changeset(const LogEntry &e)
Chris@106 23 {
Chris@106 24 foreach (QString key, e.keys()) {
Chris@106 25 if (key == "parents") {
Chris@106 26 QStringList parents = e.value(key).split
Chris@106 27 (" ", QString::SkipEmptyParts);
Chris@106 28 setParents(parents);
Chris@106 29 } else if (key == "timestamp") {
Chris@106 30 setTimestamp(e.value(key).split(" ")[0].toULongLong());
Chris@108 31 } else if (key == "changeset") {
Chris@108 32 setId(e.value(key));
Chris@106 33 } else {
Chris@106 34 setProperty(key.toLocal8Bit().data(), e.value(key));
Chris@106 35 }
Chris@106 36 }
Chris@106 37 }
Chris@106 38