mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do not create a backup for Q_FOREACH container
Q_FOREACH will expand and already creates a copy of the contained container, so this is just a waste of cpu cycles and also increases a tiny bit the memory consumption. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eaacac3217
commit
d993684fec
6 changed files with 7 additions and 12 deletions
|
@ -80,8 +80,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
ui.timeEdit->installEventFilter(this);
|
||||
ui.tagWidget->installEventFilter(this);
|
||||
|
||||
QList<QObject *> statisticsTabWidgets = ui.statisticsTab->children();
|
||||
Q_FOREACH (QObject *obj, statisticsTabWidgets) {
|
||||
Q_FOREACH (QObject *obj, ui.statisticsTab->children()) {
|
||||
QLabel *label = qobject_cast<QLabel *>(obj);
|
||||
if (label)
|
||||
label->setAlignment(Qt::AlignHCenter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue