Thanks for sharing your post! I've gone over a little of it to try and give you the feedback you asked for. Let me know if you want me to expand on anything..
The first thing that stands out the most is that there is potential memory leak and design flaw in your CustomProxyModel.
You have a public vector of "filters", which gets allocated on the heap by your proxy, but your proxy class does not have a destructor and is not set up to manage that memory. So the class on its own leaks memory. But then if we look at the implementation of Multi_Array_Table class, we see that it contains logic for "stealing" the widgets from the vector of the proxy and taking ownership of them. On subsequent calls to that setup function it will delete the previous widgets and clear the vector. So this combination has a number of implications:
* The proxy model has a public setupFilters() method which will always create and push more widgets into a vector each time it is called.
* The proxy model has no idea when some or all of the memory will be deleted. If the Multi_Array_Table gets deleted and the proxy model is still around, being used by another model, it will have dangling pointers in its vector.
* The Multi_Array_Table class is relying on "stealing" ownership of widgets created by another class while that other class still maintains a public vector of the memory.
I don't feel a proxy model should be creating widgets. And it usually isn't appropriate in C++ to have public access to fields like that, since any caller can now have full access to modifying that vector. At the very least you should probably add destructors to your classes, and maybe make use of QPointer or QSharedPointer for tracking ownership in a more realiable way. It would probably be even a better step to not have your proxy rely on widgets, rather just pure data. If the view has the QLineEdits and can update the proxy with the new text data when they change, then your proxy can test QStrings instead of QLineEdits.
Other notes:
I don't often see the pattern of passing &Class::someSignal and &Class:someSlot when calling connect().
Is this something you have seen in other examples? The usual documented way involved SIGNAL("someSignal()")
and SLOT("someSlot()").
In your CustomProxyModel::filterAcceptsRow, you have it iterating and building bitwise values. Would it not be simpler
to just return false when the string does not contain the regex, and then return true at the end?
In CustomProxyModel::setFilter, you are identifying the target filter by objectName, which seems a bit fragile. Wouldn't
just comparing the sender to the filterEdit work, since comparing the pointers would tell you that they are the same?
Boost seems like a huge hammer to introduce as a dependency here, just for using the recursive directory support in boost::filesystem.
Could you use
QDirIterator for the same purpose and ditch boost?
There sure are a lot of "util" files in the project. Some of which do really trivial things, such as just returning the string::c_str()
from a string. Others do some pretty inefficient work, like converting to one kind of vector, then iterating that vector to convert
to another kind of vector. They seem to obscure the top level calls and hide the costs. An example is convertToQStringList(), which
really only needs to do something like:
QStringList slist;
slist.reserve(vec.size()); // optional
foreach (const std::string &s, vec) {
slist << QString::fromStdString(s);
}