# # # delete "guitone/src/model/AutomateCommand.cpp" # # patch "guitone/guitone.pro" # from [3ce9bc2f593c8a7fd005a1a38c1dea7765f4de23] # to [b7b502078101e207adb5434e6daeb406832822c7] # # patch "guitone/src/model/Attributes.cpp" # from [2736d85091cfa55c9bde2115dbdfac13407b2782] # to [0da408824632f47c768141b0f7e5db248841497f] # # patch "guitone/src/model/Attributes.h" # from [23c850e0e6567d7db363511c3fd913bb7fb02f08] # to [a4d4844a547daa12380f96da44609c627e859b25] # # patch "guitone/src/model/AutomateCommand.h" # from [d33aaaaf3880b05033fd0c1dd38fe2544f905d9f] # to [98bf0e83adf775c4980b514898bef9b06af63854] # # patch "guitone/src/model/Branches.cpp" # from [59d40723e170be0427586f61924a3252a34d55bd] # to [d01c1d28d8f4aa2b0b509170703816b26bf06bba] # # patch "guitone/src/model/Branches.h" # from [d366aeaf18e525b6f370f6cd3a5d93991c319201] # to [5711def8a548031f7086e7ca7fb37bac8d4b40d7] # # patch "guitone/src/model/Certs.cpp" # from [74b6fcd2dad170e58a04025813911b6a5b15400c] # to [782481459f320468c583c3cb0c2d94844035790c] # # patch "guitone/src/model/Certs.h" # from [abc55b8f873021da1055e0bbe94120451b2324b7] # to [b198dabe787ab4c0389557b74cfe8b6123a6e35b] # # patch "guitone/src/model/ContentDiff.cpp" # from [1fe15a69c22cc20443651b87bd7f0a1d3142421c] # to [f74110c0210d6d398c7348944731019fc3347285] # # patch "guitone/src/model/ContentDiff.h" # from [67cc6a716be264f9428833707112b91e90fe22a5] # to [95458a3020f98bf47a19f83eb7a3038ad78021df] # # patch "guitone/src/model/GetFile.cpp" # from [1eaeed5e90e1fc01bc560e080ff67073c5697794] # to [c9ebb1036f63cf60870a2479d4aa968ce2e2db34] # # patch "guitone/src/model/GetFile.h" # from [0cbe01fb9d0371b992a051c4442ffbf95e83d270] # to [2542dad0537061ec09b64b453ac07a972788b1c6] # # patch "guitone/src/model/Inventory.cpp" # from [e0bb4dac9fc8507d76b8cb89e04c6448d5a07599] # to [27456152285ea14d09b7fe5efb57882a12d33e31] # # patch "guitone/src/model/Inventory.h" # from [63af6ccdd44203710c9c4bff07a1e0226ea885ab] # to [1338e141daf45f9d78054e9e259be83969e76106] # # patch "guitone/src/model/Keys.cpp" # from [f5ec005c6c196fe4c0d50df303f620821fc3b229] # to [241a769a48a54ea197b510c6daddd6018ea0c2a9] # # patch "guitone/src/model/Keys.h" # from [9af37da85afd85f60c6fc473a304d660c9d495dd] # to [567079b9a6945b988e79b7a98c2826e075fd0246] # # patch "guitone/src/model/Select.cpp" # from [28678b749000fbeb9caa38468d233edb02273c57] # to [167da2be5f3a07ef973f2e3b9592fb4f6aa01c93] # # patch "guitone/src/model/Select.h" # from [b1bff47d082be6b1b7efd7cfed910748394661fb] # to [a0102a15bb222d70d94da1c3dcc2947ce8c83be4] # # patch "guitone/src/model/Tags.cpp" # from [9a2312ba26213b51a6eb5970ba9aa075698a45de] # to [c724e650d4089c17216ce616704f2b44a931c72a] # # patch "guitone/src/model/Tags.h" # from [3ef5cd0e3bf86c4bb667ab8c74060e9be47a0279] # to [b8fc6606f1949cb5fa1a13f81d09b5f5e02b1616] # # patch "guitone/src/model/Toposort.cpp" # from [752a8d6e51b39ca0318307f8a99c872fcf9ab21a] # to [e543b413709dec4578f95bf61b3a15784586613b] # # patch "guitone/src/model/Toposort.h" # from [28b9bf52762df0765db10a744e4ba77ede531caf] # to [0293c8830b9190570f4efc069a915c68c90bdd22] # # patch "guitone/src/util/TreeBuilder.cpp" # from [78ffc09b0c2f09a9f6235f5ce9d8cfe5f6af53f0] # to [c4d4da986645b777ab83d135c3673dc042993d58] # # patch "guitone/src/util/TreeBuilder.h" # from [2a8dc775fd704078f4ab756e99cd3ea1a2ddf850] # to [1996056b8130b1e46a5ad587ae50e83e956b7cc4] # # patch "guitone/src/view/dialogs/DatabaseView.cpp" # from [98a73615831a655c2c02aa22a2a13c94ccccb0cb] # to [f5e1451aa9681ddc5eee99328a3a423075a39dde] # # patch "guitone/src/view/dialogs/DatabaseView.h" # from [1261cf82416de9fe1efc31c3350d35afcbb442a7] # to [579eb239f3e9451074285b71a28e7f61d169dea8] # ============================================================ --- guitone/guitone.pro 3ce9bc2f593c8a7fd005a1a38c1dea7765f4de23 +++ guitone/guitone.pro b7b502078101e207adb5434e6daeb406832822c7 @@ -28,7 +28,7 @@ HEADERS += src/view/MainWindow.h \ src/view/dialogs/About.h \ src/view/dialogs/DatabaseView.h \ src/monotone/Monotone.h \ - src/model/AutomateCommand.h \ + src/model/MonotoneDelegate.h \ src/model/Inventory.h \ src/model/InventoryItem.h \ src/model/InventoryProxyModel.h \ @@ -67,7 +67,7 @@ SOURCES += src/view/MainWindow.cpp \ src/view/dialogs/About.cpp \ src/view/dialogs/DatabaseView.cpp \ src/monotone/Monotone.cpp \ - src/model/AutomateCommand.cpp \ + src/model/MonotoneDelegate.cpp \ src/model/Inventory.cpp \ src/model/InventoryItem.cpp \ src/model/InventoryProxyModel.cpp \ ============================================================ --- guitone/src/model/Attributes.cpp 2736d85091cfa55c9bde2115dbdfac13407b2782 +++ guitone/src/model/Attributes.cpp 0da408824632f47c768141b0f7e5db248841497f @@ -26,15 +26,17 @@ Attributes::Attributes(QObject *parent) #include Attributes::Attributes(QObject *parent) - : AutomateCommand(parent) + : QAbstractItemModel(parent) { attributes = new AttributeList(); + mtnDelegate = new MonotoneDelegate(this); } Attributes::~Attributes() { attributes->clear(); delete attributes; + delete mtnDelegate; } bool Attributes::readAttributes(const QModelIndex & index) @@ -65,7 +67,7 @@ bool Attributes::readAttributes(const QM cmd.append("attributes"); cmd.append(item->getPath()); - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } void Attributes::parseOutput() ============================================================ --- guitone/src/model/Attributes.h 23c850e0e6567d7db363511c3fd913bb7fb02f08 +++ guitone/src/model/Attributes.h a4d4844a547daa12380f96da44609c627e859b25 @@ -24,7 +24,10 @@ #define ATTRIBUTES_H #include "AutomateCommand.h" +#include "MonotoneDelegate.h" +#include + typedef struct { enum AttributeState { Added, Dropped, Changed, Unchanged } state; QString key; @@ -32,7 +35,7 @@ typedef QList AttributeList; } Attribute; typedef QList AttributeList; -class Attributes : public AutomateCommand +class Attributes : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -56,7 +59,8 @@ private: private: void parseOutput(); - AttributeList *attributes; + AttributeList * attributes; + MonotoneDelegate * mtnDelegate; }; #endif ============================================================ --- guitone/src/model/AutomateCommand.h d33aaaaf3880b05033fd0c1dd38fe2544f905d9f +++ guitone/src/model/AutomateCommand.h 98bf0e83adf775c4980b514898bef9b06af63854 @@ -21,36 +21,27 @@ #ifndef AUTOMATE_COMMAND_H #define AUTOMATE_COMMAND_H -#include "Monotone.h" -#include +#include -/* - * Unfortunately Qt4's signal/slot handling does not allow multiple - * inheritance, thus we need to derive from the abstract model here - * which may not be sufficient if there is some derived model in the future - * which needs a different base model - */ -class AutomateCommand : public QAbstractItemModel +class AutomateCommand { - Q_OBJECT - public: - virtual void clearData(); - const QString getAutomateData() const; + virtual ~AutomateCommand() {} + inline void setAutomateData(const QString & d) { data = d; } + inline QString getAutomateData() const { return data; } + friend class MonotoneDelegate; + protected: - // its not allowed to create objects of this type directly - AutomateCommand(QObject*); - virtual ~AutomateCommand(); - bool triggerCommand(const QStringList &); - bool triggerCommand(const QStringList &, const QStringList &); - virtual bool handleError(int); - QString data; - - -protected slots: - void commandFinished(int); + inline virtual bool handleError(int retCode) { + // Error handling has to happen in the derived classes + // where each command may decide whether it makes sense + // to continue program execution (i.e. the error is recoverable) + // or not + return false; + } virtual void parseOutput() = 0; + QString data; }; #endif ============================================================ --- guitone/src/model/Branches.cpp 59d40723e170be0427586f61924a3252a34d55bd +++ guitone/src/model/Branches.cpp d01c1d28d8f4aa2b0b509170703816b26bf06bba @@ -21,17 +21,18 @@ #include "Branches.h" #include "Monotone.h" -Branches::Branches(bool tree, QObject *parent) - : AutomateCommand(parent) +Branches::Branches(bool tree, QObject *parent) : QAbstractItemModel(parent) { builder = 0; Branches::tree = tree; + mtnDelegate = new MonotoneDelegate(this); } Branches::~Branches() { if(builder) delete builder; + delete mtnDelegate; } bool Branches::readBranches() @@ -42,7 +43,7 @@ bool Branches::readBranches() QStringList cmd; cmd << "branches"; - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } void Branches::parseOutput() ============================================================ --- guitone/src/model/Branches.h d366aeaf18e525b6f370f6cd3a5d93991c319201 +++ guitone/src/model/Branches.h 5711def8a548031f7086e7ca7fb37bac8d4b40d7 @@ -22,10 +22,13 @@ #define BRANCHES_H #include "AutomateCommand.h" +#include "TreeBuilder.h" +#include "MonotoneDelegate.h" + #include -#include "../../util/TreeBuilder.h" - -class Branches : public AutomateCommand +#include + +class Branches : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -54,6 +57,7 @@ private: QStandardItemModel branches; void * getBranchItem(int row, int column, const QModelIndex& index) const; QStandardItem * branchFromIndex(const QModelIndex& index) const; + MonotoneDelegate * mtnDelegate; }; #endif ============================================================ --- guitone/src/model/Certs.cpp 74b6fcd2dad170e58a04025813911b6a5b15400c +++ guitone/src/model/Certs.cpp 782481459f320468c583c3cb0c2d94844035790c @@ -22,16 +22,17 @@ #include "Monotone.h" #include "StanzaParser.h" -Certs::Certs(QObject *parent) - : AutomateCommand(parent) +Certs::Certs(QObject *parent) : QAbstractItemModel(parent) { certs = new CertList(); + mtnDelegate = new MonotoneDelegate(this); } Certs::~Certs() { certs->clear(); delete certs; + delete mtnDelegate; } bool Certs::readCerts(const QModelIndex & index) @@ -50,7 +51,7 @@ bool Certs::readCerts(const QModelIndex cmd.append("certs"); cmd.append(rev); - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } void Certs::parseOutput() @@ -233,6 +234,6 @@ void Certs::clearData() void Certs::clearData() { certs->clear(); - AutomateCommand::clearData(); + reset(); } ============================================================ --- guitone/src/model/Certs.h abc55b8f873021da1055e0bbe94120451b2324b7 +++ guitone/src/model/Certs.h b198dabe787ab4c0389557b74cfe8b6123a6e35b @@ -24,7 +24,10 @@ #define CERTS_H #include "AutomateCommand.h" +#include "MonotoneDelegate.h" +#include + typedef struct { enum Trust { Trusted, Untrusted } trust; enum Signature { Ok, Bad, Unknown } signature; @@ -34,7 +37,7 @@ typedef QList CertList; } Cert; typedef QList CertList; -class Certs : public AutomateCommand +class Certs : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -60,6 +63,7 @@ private: private: void parseOutput(); CertList *certs; + MonotoneDelegate * mtnDelegate; }; #endif ============================================================ --- guitone/src/model/ContentDiff.cpp 1fe15a69c22cc20443651b87bd7f0a1d3142421c +++ guitone/src/model/ContentDiff.cpp f74110c0210d6d398c7348944731019fc3347285 @@ -25,13 +25,16 @@ ContentDiff::ContentDiff(QObject *parent #include ContentDiff::ContentDiff(QObject *parent) - : AutomateCommand(parent) + : QAbstractItemModel(parent) { + diffParser = 0; + mtnDelegate = new MonotoneDelegate(this); } ContentDiff::~ContentDiff() { if (diffParser) delete diffParser; + delete mtnDelegate; } bool ContentDiff::readDiff(QString fileName) @@ -80,7 +83,7 @@ bool ContentDiff::readDiff( opts << "r" << rightRevision; } - return AutomateCommand::triggerCommand(cmd, opts); + return mtnDelegate->triggerCommand(cmd, opts); } void ContentDiff::parseOutput() ============================================================ --- guitone/src/model/ContentDiff.h 67cc6a716be264f9428833707112b91e90fe22a5 +++ guitone/src/model/ContentDiff.h 95458a3020f98bf47a19f83eb7a3038ad78021df @@ -25,8 +25,10 @@ #include "AutomateCommand.h" #include "DiffParser.h" +#include "MonotoneDelegate.h" #include +#include struct ListLine { @@ -48,7 +50,7 @@ typedef QList ListLines; typedef QList ListLines; -class ContentDiff : public AutomateCommand +class ContentDiff : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -79,6 +81,7 @@ private: void parseOutput(); DiffParser * diffParser; ListLines lines; + MonotoneDelegate * mtnDelegate; }; #endif ============================================================ --- guitone/src/model/GetFile.cpp 1eaeed5e90e1fc01bc560e080ff67073c5697794 +++ guitone/src/model/GetFile.cpp c9ebb1036f63cf60870a2479d4aa968ce2e2db34 @@ -23,12 +23,15 @@ #include #include -GetFile::GetFile(QObject *parent) - : AutomateCommand(parent) +GetFile::GetFile(QObject *parent) : QAbstractItemModel(parent) { + mtnDelegate = new MonotoneDelegate(this); } -GetFile::~GetFile() {} +GetFile::~GetFile() +{ + delete mtnDelegate; +} bool GetFile::readFileByName(QString fileName) { @@ -74,7 +77,7 @@ bool GetFile::readFile(QStringList cmd, // reset attached views reset(); - return AutomateCommand::triggerCommand(cmd, opts); + return mtnDelegate->triggerCommand(cmd, opts); } void GetFile::parseOutput() ============================================================ --- guitone/src/model/GetFile.h 0cbe01fb9d0371b992a051c4442ffbf95e83d270 +++ guitone/src/model/GetFile.h 2542dad0537061ec09b64b453ac07a972788b1c6 @@ -25,7 +25,10 @@ #include "AutomateCommand.h" #include "DiffParser.h" +#include "MonotoneDelegate.h" +#include + struct ContentLine { QString content; enum Marker {Unchanged, Added, Removed} marker; @@ -35,7 +38,7 @@ typedef QVector Content; typedef QVector Content; -class GetFile : public AutomateCommand +class GetFile : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -64,6 +67,7 @@ private: bool readFile(QStringList, QStringList); void parseOutput(); Content fileContents; + MonotoneDelegate * mtnDelegate; }; #endif ============================================================ --- guitone/src/model/Inventory.cpp e0bb4dac9fc8507d76b8cb89e04c6448d5a07599 +++ guitone/src/model/Inventory.cpp 27456152285ea14d09b7fe5efb57882a12d33e31 @@ -25,8 +25,7 @@ #include -Inventory::Inventory(QObject *parent) : AutomateCommand(parent), -modelPresent(false) +Inventory::Inventory(QObject *parent) : QAbstractItemModel(parent) { // create a dummy item since the view needs at least one item // in the model, otherwise the app crashes @@ -34,8 +33,11 @@ modelPresent(false) iconProvider = new IconProvider(); regex = new QRegExp("^(R|D|[ ])(R|A|[ ])(M|P|U|I|[ ])\\s(\\d+)\\s(\\d+)\\s(.+)$"); - - regex->setMinimal(true); + regex->setMinimal(true); + + mtnDelegate = new MonotoneDelegate(this); + + modelPresent = false; } Inventory::~Inventory() @@ -43,6 +45,7 @@ Inventory::~Inventory() delete rootItem; delete iconProvider; delete regex; + delete mtnDelegate; } bool Inventory::readInventory() @@ -55,7 +58,7 @@ bool Inventory::readInventory() QStringList cmd; cmd << "inventory"; - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } void Inventory::parseOutput() ============================================================ --- guitone/src/model/Inventory.h 63af6ccdd44203710c9c4bff07a1e0226ea885ab +++ guitone/src/model/Inventory.h 1338e141daf45f9d78054e9e259be83969e76106 @@ -22,14 +22,15 @@ #define INVENTORY_H #include "AutomateCommand.h" -#include +#include "MonotoneDelegate.h" + #include +#include class InventoryItem; -class Monotone; class IconProvider; -class Inventory : public AutomateCommand +class Inventory : public QAbstractItemModel, public AutomateCommand { Q_OBJECT @@ -53,13 +54,15 @@ class Inventory : public AutomateCommand QList buildTreeRecursive(QList &, InventoryItem*); void deleteModel(void); - InventoryItem *rootItem; - IconProvider *iconProvider; - QRegExp *regex; - bool modelPresent; + InventoryItem * rootItem; + IconProvider * iconProvider; + QRegExp * regex; + MonotoneDelegate * mtnDelegate; + bool modelPresent; signals: void modelCreated(); }; #endif + ============================================================ --- guitone/src/model/Keys.cpp f5ec005c6c196fe4c0d50df303f620821fc3b229 +++ guitone/src/model/Keys.cpp 241a769a48a54ea197b510c6daddd6018ea0c2a9 @@ -25,14 +25,14 @@ const int Key::Keystore = 2; const int Key::Database = 1; const int Key::Keystore = 2; -Keys::Keys(QObject *parent) - : AutomateCommand(parent) +Keys::Keys(QObject *parent) : QAbstractItemModel(parent) { + mtnDelegate = new MonotoneDelegate(this); } Keys::~Keys() { - keys.clear(); + delete mtnDelegate; } bool Keys::readKeys() @@ -43,7 +43,7 @@ bool Keys::readKeys() QStringList cmd; cmd << "keys"; - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } void Keys::parseOutput() ============================================================ --- guitone/src/model/Keys.h 9af37da85afd85f60c6fc473a304d660c9d495dd +++ guitone/src/model/Keys.h 567079b9a6945b988e79b7a98c2826e075fd0246 @@ -22,7 +22,10 @@ #define KEYS_H #include "AutomateCommand.h" - +#include "MonotoneDelegate.h" + +#include + struct Key { static const int Database; static const int Keystore; @@ -35,7 +38,7 @@ typedef QList KeyList; }; typedef QList KeyList; -class Keys : public AutomateCommand +class Keys : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -61,6 +64,7 @@ private: void parseOutput(); QString getLocationString(int) const; KeyList keys; + MonotoneDelegate * mtnDelegate; }; #endif ============================================================ --- guitone/src/model/Select.cpp 28678b749000fbeb9caa38468d233edb02273c57 +++ guitone/src/model/Select.cpp 167da2be5f3a07ef973f2e3b9592fb4f6aa01c93 @@ -25,22 +25,24 @@ Select::Select(QObject *parent) #include Select::Select(QObject *parent) - : AutomateCommand(parent) + : QAbstractItemModel(parent) { selRevisions = new RevisionList(); sorted = false; toposort = 0; + mtnDelegate = new MonotoneDelegate(this); } Select::~Select() { - - if(selRevisions) + if (selRevisions) { selRevisions->clear(); delete selRevisions; } - if(toposort) delete toposort; + + if (toposort) delete toposort; + delete mtnDelegate; } bool Select::readSelection(const QString & selector, bool sorted) @@ -55,7 +57,7 @@ bool Select::readSelection(const QString cmd.append("select"); cmd.append(selector); - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } bool Select::handleError(int errCode) ============================================================ --- guitone/src/model/Select.h b1bff47d082be6b1b7efd7cfed910748394661fb +++ guitone/src/model/Select.h a0102a15bb222d70d94da1c3dcc2947ce8c83be4 @@ -22,11 +22,14 @@ #define SELECT_H #include "AutomateCommand.h" +#include "MonotoneDelegate.h" +#include + typedef QStringList RevisionList; class Toposort; -class Select : public AutomateCommand +class Select : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -55,6 +58,7 @@ private: RevisionList *selRevisions; bool sorted; Toposort * toposort; + MonotoneDelegate * mtnDelegate; private slots: void dataReady(); ============================================================ --- guitone/src/model/Tags.cpp 9a2312ba26213b51a6eb5970ba9aa075698a45de +++ guitone/src/model/Tags.cpp c724e650d4089c17216ce616704f2b44a931c72a @@ -22,16 +22,17 @@ #include "Monotone.h" #include "StanzaParser.h" -Tags::Tags(QObject *parent) - : AutomateCommand(parent) +Tags::Tags(QObject *parent) : QAbstractItemModel(parent) { tags = new TagList(); + mtnDelegate = new MonotoneDelegate(this); } Tags::~Tags() { tags->clear(); delete tags; + delete mtnDelegate; } bool Tags::readTags(const QString & branch) @@ -43,7 +44,7 @@ bool Tags::readTags(const QString & bran cmd << branch; } - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } void Tags::parseOutput() ============================================================ --- guitone/src/model/Tags.h 3ef5cd0e3bf86c4bb667ab8c74060e9be47a0279 +++ guitone/src/model/Tags.h b8fc6606f1949cb5fa1a13f81d09b5f5e02b1616 @@ -22,7 +22,10 @@ #define TAGS_H #include "AutomateCommand.h" +#include "MonotoneDelegate.h" + #include +#include typedef struct { QString name; @@ -32,7 +35,7 @@ typedef QList TagList; } Tag; typedef QList TagList; -class Tags : public AutomateCommand +class Tags : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -57,6 +60,7 @@ private: private: void parseOutput(); TagList * tags; + MonotoneDelegate * mtnDelegate; }; #endif ============================================================ --- guitone/src/model/Toposort.cpp 752a8d6e51b39ca0318307f8a99c872fcf9ab21a +++ guitone/src/model/Toposort.cpp e543b413709dec4578f95bf61b3a15784586613b @@ -23,19 +23,20 @@ #include -Toposort::Toposort(QObject *parent) - : AutomateCommand(parent) +Toposort::Toposort(QObject *parent) : QAbstractItemModel(parent) { selRevisions = new RevisionList(); + mtnDelegate = new MonotoneDelegate(this); } Toposort::~Toposort() { - if(selRevisions) + if (selRevisions) { selRevisions->clear(); delete selRevisions; } + delete mtnDelegate; } bool Toposort::sortSelection(const QStringList &selection) @@ -50,7 +51,7 @@ bool Toposort::sortSelection(const QStri //QStringList args; cmd << selection; - return AutomateCommand::triggerCommand(cmd); + return mtnDelegate->triggerCommand(cmd); } bool Toposort::handleError(int errCode) ============================================================ --- guitone/src/model/Toposort.h 28b9bf52762df0765db10a744e4ba77ede531caf +++ guitone/src/model/Toposort.h 0293c8830b9190570f4efc069a915c68c90bdd22 @@ -22,11 +22,14 @@ #define TOPOSOT_H #include "AutomateCommand.h" +#include "MonotoneDelegate.h" + #include +#include typedef QStringList RevisionList; -class Toposort : public AutomateCommand +class Toposort : public QAbstractItemModel, public AutomateCommand { Q_OBJECT public: @@ -52,7 +55,9 @@ private: private: void parseOutput(); bool handleError(int); - RevisionList *selRevisions; + RevisionList * selRevisions; + MonotoneDelegate * mtnDelegate; }; #endif //TOPOSOT_H + ============================================================ --- guitone/src/util/TreeBuilder.cpp 78ffc09b0c2f09a9f6235f5ce9d8cfe5f6af53f0 +++ guitone/src/util/TreeBuilder.cpp c4d4da986645b777ab83d135c3673dc042993d58 ============================================================ --- guitone/src/util/TreeBuilder.h 2a8dc775fd704078f4ab756e99cd3ea1a2ddf850 +++ guitone/src/util/TreeBuilder.h 1996056b8130b1e46a5ad587ae50e83e956b7cc4 ============================================================ --- guitone/src/view/dialogs/DatabaseView.cpp 98a73615831a655c2c02aa22a2a13c94ccccb0cb +++ guitone/src/view/dialogs/DatabaseView.cpp f5e1451aa9681ddc5eee99328a3a423075a39dde ============================================================ --- guitone/src/view/dialogs/DatabaseView.h 1261cf82416de9fe1efc31c3350d35afcbb442a7 +++ guitone/src/view/dialogs/DatabaseView.h 579eb239f3e9451074285b71a28e7f61d169dea8