Make it easy to set a kit matcher.

Using a function to set a kit matcher is much easier that crating a new
class. It also enables an easy way to reuse classes that are using it.
E.g.
DeviceProcessesDialog processDialog;
processDialog.kitChooser()->setKitMatcher([](const Kit* kit) {
   return kit->isValid() && other_checks_with(kit);
});

Change-Id: I4e2fc7c52038902412cec5331504230bb8160ceb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
BogDan Vatra
2015-07-20 12:40:28 +03:00
parent f51a403518
commit cf4ee59cf0
10 changed files with 39 additions and 147 deletions

View File

@@ -69,7 +69,6 @@ public:
explicit DebuggerKitChooser(Mode mode = AnyDebugging, QWidget *parent = 0);
protected:
bool kitMatches(const ProjectExplorer::Kit *k) const;
QString kitToolTip(ProjectExplorer::Kit *k) const;
private: