#include "qt_helpers.h"
#include "support/debug.h"
-#include "support/foreach.h"
#include "support/lassert.h"
#include <QAbstractButton>
QFontMetrics fm(list_->font());
// calculate the real size the current item needs in the listview
- int itemsize = fm.width(name) + 10 + list_->indentation() * depth;
+ int itemsize = fm.width(qt_(name)) + 10 + list_->indentation() * depth;
// adjust the listview width to the max. itemsize
if (itemsize > list_->minimumWidth())
list_->setMinimumWidth(itemsize);
// If the search string is empty we enable all the items
// otherwise we disable everything and then selectively
// re-enable matching items
- foreach (QTreeWidgetItem * tree_item, panel_map_) {
+ for (QTreeWidgetItem * tree_item : panel_map_) {
setTreeItemStatus(tree_item, enable_all);
}
- foreach (QTreeWidgetItem * tree_item, panel_map_) {
+ for (QTreeWidgetItem * tree_item : panel_map_) {
// Current widget
QWidget * pane_widget = widget_map_[tree_item];
if (pane_widget) {
// Loops on the list of children widgets (recursive)
QWidgetList children = pane_widget->findChildren<QWidget *>();
- foreach (QWidget * child_widget, children) {
+ for (QWidget * child_widget : children) {
bool widget_matches = false;
// Try to cast to the most common widgets and looks in it's content