summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-04 16:29:09 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-06 09:06:16 (GMT)
commit13833beb641289c45faed337848d37280195aadc (patch)
tree640401d51871f1eb4e948cf1884b810b5be4a198 /tools/designer/src/lib
parent99160bb9f851bf02fe5345b5f52217b6c77a57c4 (diff)
downloadQt-13833beb641289c45faed337848d37280195aadc.zip
Qt-13833beb641289c45faed337848d37280195aadc.tar.gz
Qt-13833beb641289c45faed337848d37280195aadc.tar.bz2
Remove the use of deprecated qFindChild(ren)
Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(this,* */f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(&\([^\(),]*\),* */\\2.f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*()\),* */\\2->f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\):\([^\(),]*\),* */(\\2:\\3)->f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\),* */\\2->f\\1(/'" qFindChild Rev-by: dev mailing list
Diffstat (limited to 'tools/designer/src/lib')
-rw-r--r--tools/designer/src/lib/shared/actioneditor.cpp4
-rw-r--r--tools/designer/src/lib/shared/connectionedit.cpp6
-rw-r--r--tools/designer/src/lib/shared/layoutinfo.cpp4
-rw-r--r--tools/designer/src/lib/shared/morphmenu.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command.cpp4
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu.cpp6
-rw-r--r--tools/designer/src/lib/shared/qdesigner_tabwidget.cpp2
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp2
-rw-r--r--tools/designer/src/lib/shared/zoomwidget.cpp2
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp10
-rw-r--r--tools/designer/src/lib/uilib/formbuilder.cpp4
-rw-r--r--tools/designer/src/lib/uilib/formbuilderextra.cpp2
13 files changed, 25 insertions, 25 deletions
diff --git a/tools/designer/src/lib/shared/actioneditor.cpp b/tools/designer/src/lib/shared/actioneditor.cpp
index 26ac8a8..664921e 100644
--- a/tools/designer/src/lib/shared/actioneditor.cpp
+++ b/tools/designer/src/lib/shared/actioneditor.cpp
@@ -288,7 +288,7 @@ void ActionEditor::setFormWindow(QDesignerFormWindowInterface *formWindow)
return;
if (m_formWindow != 0) {
- const ActionList actionList = qFindChildren<QAction*>(m_formWindow->mainContainer());
+ const ActionList actionList = m_formWindow->mainContainer()->findChildren<QAction*>();
foreach (QAction *action, actionList)
disconnect(action, SIGNAL(changed()), this, SLOT(slotActionChanged()));
}
@@ -311,7 +311,7 @@ void ActionEditor::setFormWindow(QDesignerFormWindowInterface *formWindow)
m_actionNew->setEnabled(true);
m_filterWidget->setEnabled(true);
- const ActionList actionList = qFindChildren<QAction*>(formWindow->mainContainer());
+ const ActionList actionList = formWindow->mainContainer()->findChildren<QAction*>();
foreach (QAction *action, actionList)
if (!action->isSeparator() && core()->metaDataBase()->item(action) != 0) {
// Show unless it has a menu. However, listen for change on menu actions also as it might be removed
diff --git a/tools/designer/src/lib/shared/connectionedit.cpp b/tools/designer/src/lib/shared/connectionedit.cpp
index 0bebe47..fb6cf60 100644
--- a/tools/designer/src/lib/shared/connectionedit.cpp
+++ b/tools/designer/src/lib/shared/connectionedit.cpp
@@ -1395,7 +1395,7 @@ void ConnectionEdit::widgetRemoved(QWidget *widget)
if (m_con_list.empty())
return;
- QWidgetList child_list = qFindChildren<QWidget*>(widget);
+ QWidgetList child_list = widget->findChildren<QWidget*>();
child_list.prepend(widget);
const ConnectionSet remove_set = findConnectionsOf(m_con_list, child_list.constBegin(), child_list.constEnd());
@@ -1545,7 +1545,7 @@ void ConnectionEdit::setSource(Connection *con, const QString &obj_name)
{
QObject *object = 0;
if (!obj_name.isEmpty()) {
- object = qFindChild<QObject*>(m_bg_widget, obj_name);
+ object = m_bg_widget->findChild<QObject*>(obj_name);
if (object == 0 && m_bg_widget->objectName() == obj_name)
object = m_bg_widget;
@@ -1559,7 +1559,7 @@ void ConnectionEdit::setTarget(Connection *con, const QString &obj_name)
{
QObject *object = 0;
if (!obj_name.isEmpty()) {
- object = qFindChild<QObject*>(m_bg_widget, obj_name);
+ object = m_bg_widget->findChild<QObject*>(obj_name);
if (object == 0 && m_bg_widget->objectName() == obj_name)
object = m_bg_widget;
diff --git a/tools/designer/src/lib/shared/layoutinfo.cpp b/tools/designer/src/lib/shared/layoutinfo.cpp
index ad2dda4..309aa37 100644
--- a/tools/designer/src/lib/shared/layoutinfo.cpp
+++ b/tools/designer/src/lib/shared/layoutinfo.cpp
@@ -190,7 +190,7 @@ LayoutInfo::Type LayoutInfo::laidoutWidgetType(const QDesignerFormEditorInterfac
}
// 3) Some child layout (see below comment about Q3GroupBox)
- const QList<QLayout*> childLayouts = qFindChildren<QLayout*>(parentLayout);
+ const QList<QLayout*> childLayouts = parentLayout->findChildren<QLayout*>();
if (childLayouts.empty())
return NoLayout;
const QList<QLayout*>::const_iterator lcend = childLayouts.constEnd();
@@ -244,7 +244,7 @@ QLayout *LayoutInfo::managedLayout(const QDesignerFormEditorInterface *core, QLa
* widget->layout() returns an internal VBoxLayout. */
const QDesignerMetaDataBaseItemInterface *item = metaDataBase->item(layout);
if (item == 0) {
- layout = qFindChild<QLayout*>(layout);
+ layout = layout->findChild<QLayout*>();
item = metaDataBase->item(layout);
}
if (!item)
diff --git a/tools/designer/src/lib/shared/morphmenu.cpp b/tools/designer/src/lib/shared/morphmenu.cpp
index de85d37..6dfac47 100644
--- a/tools/designer/src/lib/shared/morphmenu.cpp
+++ b/tools/designer/src/lib/shared/morphmenu.cpp
@@ -240,7 +240,7 @@ static QString suggestObjectName(const QString &oldClassName, const QString &new
QLabel *buddyLabelOf(QDesignerFormWindowInterface *fw, QWidget *w)
{
typedef QList<QLabel*> LabelList;
- const LabelList labelList = qFindChildren<QLabel*>(fw);
+ const LabelList labelList = fw->findChildren<QLabel*>();
if (labelList.empty())
return 0;
const LabelList::const_iterator cend = labelList.constEnd();
diff --git a/tools/designer/src/lib/shared/qdesigner_command.cpp b/tools/designer/src/lib/shared/qdesigner_command.cpp
index 69206df..9fe0e89 100644
--- a/tools/designer/src/lib/shared/qdesigner_command.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_command.cpp
@@ -247,7 +247,7 @@ void InsertWidgetCommand::refreshBuddyLabels()
{
typedef QList<QLabel*> LabelList;
- const LabelList label_list = qFindChildren<QLabel*>(formWindow());
+ const LabelList label_list = formWindow()->findChildren<QLabel*>();
if (label_list.empty())
return;
@@ -365,7 +365,7 @@ void ManageWidgetCommandHelper::init(const QDesignerFormWindowInterface *fw, QWi
m_widget = widget;
m_managedChildren.clear();
- const QWidgetList children = qFindChildren<QWidget *>(m_widget);
+ const QWidgetList children = m_widget->findChildren<QWidget *>();
if (children.empty())
return;
diff --git a/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp b/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
index 490373e..675752e 100644
--- a/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_formwindowcommand.cpp
@@ -115,7 +115,7 @@ void QDesignerFormWindowCommand::updateBuddies(QDesignerFormWindowInterface *for
typedef QList<QLabel*> LabelList;
- const LabelList label_list = qFindChildren<QLabel*>(form);
+ const LabelList label_list = form->findChildren<QLabel*>();
if (label_list.empty())
return;
diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp
index 31a226a..bbab032 100644
--- a/tools/designer/src/lib/shared/qdesigner_menu.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp
@@ -630,7 +630,7 @@ QDesignerMenu *QDesignerMenu::findActivatedMenu() const
{
QList<QDesignerMenu*> candidates;
candidates.append(const_cast<QDesignerMenu*>(this));
- candidates += qFindChildren<QDesignerMenu*>(this);
+ candidates += findChildren<QDesignerMenu*>();
foreach (QDesignerMenu *m, candidates) {
if (m == qApp->activeWindow())
@@ -867,7 +867,7 @@ void QDesignerMenu::closeMenuChain()
w = w->parentWidget();
if (w) {
- foreach (QMenu *subMenu, qFindChildren<QMenu*>(w)) {
+ foreach (QMenu *subMenu, w->findChildren<QMenu*>()) {
subMenu->hide();
}
}
@@ -1323,7 +1323,7 @@ QAction *QDesignerMenu::safeActionAt(int index) const
void QDesignerMenu::hideSubMenu()
{
m_lastSubMenuIndex = -1;
- foreach (QMenu *subMenu, qFindChildren<QMenu*>(this)) {
+ foreach (QMenu *subMenu, findChildren<QMenu*>()) {
subMenu->hide();
}
}
diff --git a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
index ecd97fa..78c6bd9 100644
--- a/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_tabwidget.cpp
@@ -134,7 +134,7 @@ QTabBar *QTabWidgetEventFilter::tabBar() const
{
// QTabWidget::tabBar() accessor is protected, grmbl...
if (!m_cachedTabBar) {
- const QList<QTabBar *> tabBars = qFindChildren<QTabBar *>(m_tabWidget);
+ const QList<QTabBar *> tabBars = m_tabWidget->findChildren<QTabBar *>();
Q_ASSERT(tabBars.size() == 1);
m_cachedTabBar = tabBars.front();
}
diff --git a/tools/designer/src/lib/shared/widgetfactory.cpp b/tools/designer/src/lib/shared/widgetfactory.cpp
index c7b13a1..d686052 100644
--- a/tools/designer/src/lib/shared/widgetfactory.cpp
+++ b/tools/designer/src/lib/shared/widgetfactory.cpp
@@ -782,7 +782,7 @@ void WidgetFactory::applyStyleToTopLevel(QStyle *style, QWidget *widget)
widget->setStyle(style);
widget->setPalette(standardPalette);
- const QWidgetList lst = qFindChildren<QWidget*>(widget);
+ const QWidgetList lst = widget->findChildren<QWidget*>();
const QWidgetList::const_iterator cend = lst.constEnd();
for (QWidgetList::const_iterator it = lst.constBegin(); it != cend; ++it)
(*it)->setStyle(style);
diff --git a/tools/designer/src/lib/shared/zoomwidget.cpp b/tools/designer/src/lib/shared/zoomwidget.cpp
index f5d7434..5cf4ea2 100644
--- a/tools/designer/src/lib/shared/zoomwidget.cpp
+++ b/tools/designer/src/lib/shared/zoomwidget.cpp
@@ -328,7 +328,7 @@ void ZoomWidget::setWidget(QWidget *w, Qt::WindowFlags wFlags)
scene().removeItem(m_proxy);
if (QWidget *w = m_proxy->widget()) {
// remove the event filter
- if (QObject *evf = qFindChild<QObject*>(w, QLatin1String(zoomedEventFilterRedirectorNameC)))
+ if (QObject *evf = w->findChild<QObject*>(QLatin1String(zoomedEventFilterRedirectorNameC)))
w->removeEventFilter(evf);
}
m_proxy->deleteLater();
diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
index 6f009e3..a280876 100644
--- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -341,7 +341,7 @@ QWidget *QAbstractFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidge
w->addAction(a);
} else if (QActionGroup *g = m_actionGroups.value(name)) {
w->addActions(g->actions());
- } else if (QMenu *menu = qFindChild<QMenu*>(w, name)) {
+ } else if (QMenu *menu = w->findChild<QMenu*>(name)) {
w->addAction(menu->menuAction());
addMenuAction(menu->menuAction());
}
@@ -365,7 +365,7 @@ QWidget *QAbstractFormBuilder::create(DomWidget *ui_widget, QWidget *parentWidge
if (!zOrderNames.isEmpty()) {
QList<QWidget *> zOrder = qVariantValue<QWidgetList>(w->property("_q_zOrder"));
foreach (const QString &widgetName, zOrderNames) {
- if (QWidget *child = qFindChild<QWidget*>(w, widgetName)) {
+ if (QWidget *child = w->findChild<QWidget*>(widgetName)) {
if (child->parentWidget() == w) {
zOrder.removeAll(child);
zOrder.append(child);
@@ -1603,14 +1603,14 @@ void QAbstractFormBuilder::applyTabStops(QWidget *widget, DomTabStops *tabStops)
for (int i=0; i<l.size(); ++i) {
const QString name = l.at(i);
- QWidget *child = qFindChild<QWidget*>(widget, name);
+ QWidget *child = widget->findChild<QWidget*>(name);
if (!child) {
uiLibWarning(QCoreApplication::translate("QAbstractFormBuilder", "While applying tab stops: The widget '%1' could not be found.").arg(name));
continue;
}
if (i == 0) {
- lastWidget = qFindChild<QWidget*>(widget, name);
+ lastWidget = widget->findChild<QWidget*>(name);
continue;
} else if (!child || !lastWidget) {
continue;
@@ -1618,7 +1618,7 @@ void QAbstractFormBuilder::applyTabStops(QWidget *widget, DomTabStops *tabStops)
QWidget::setTabOrder(lastWidget, child);
- lastWidget = qFindChild<QWidget*>(widget, name);
+ lastWidget = widget->findChild<QWidget*>(name);
}
}
diff --git a/tools/designer/src/lib/uilib/formbuilder.cpp b/tools/designer/src/lib/uilib/formbuilder.cpp
index c97daac..c7d4e90 100644
--- a/tools/designer/src/lib/uilib/formbuilder.cpp
+++ b/tools/designer/src/lib/uilib/formbuilder.cpp
@@ -319,7 +319,7 @@ QWidget *QFormBuilder::widgetByName(QWidget *topLevel, const QString &name)
if (topLevel->objectName() == name)
return topLevel;
- return qFindChild<QWidget*>(topLevel, name);
+ return topLevel->findChild<QWidget*>(name);
}
static QObject *objectByName(QWidget *topLevel, const QString &name)
@@ -328,7 +328,7 @@ static QObject *objectByName(QWidget *topLevel, const QString &name)
if (topLevel->objectName() == name)
return topLevel;
- return qFindChild<QObject*>(topLevel, name);
+ return topLevel->findChild<QObject*>(name);
}
/*!
diff --git a/tools/designer/src/lib/uilib/formbuilderextra.cpp b/tools/designer/src/lib/uilib/formbuilderextra.cpp
index 6c3357f..0747974 100644
--- a/tools/designer/src/lib/uilib/formbuilderextra.cpp
+++ b/tools/designer/src/lib/uilib/formbuilderextra.cpp
@@ -136,7 +136,7 @@ bool QFormBuilderExtra::applyBuddy(const QString &buddyName, BuddyMode applyMode
return false;
}
- const QWidgetList widgets = qFindChildren<QWidget*>(label->topLevelWidget(), buddyName);
+ const QWidgetList widgets = label->topLevelWidget()->findChildren<QWidget*>(buddyName);
if (widgets.empty()) {
label->setBuddy(0);
return false;