summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/components
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/components
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/components')
-rw-r--r--tools/designer/src/components/buddyeditor/buddyeditor.cpp12
-rw-r--r--tools/designer/src/components/formeditor/formwindow.cpp16
-rw-r--r--tools/designer/src/components/formeditor/qdesigner_resource.cpp6
-rw-r--r--tools/designer/src/components/formeditor/qmainwindow_container.cpp2
-rw-r--r--tools/designer/src/components/signalsloteditor/signalslot_utils.cpp2
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditor.cpp2
-rw-r--r--tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp8
-rw-r--r--tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp2
8 files changed, 25 insertions, 25 deletions
diff --git a/tools/designer/src/components/buddyeditor/buddyeditor.cpp b/tools/designer/src/components/buddyeditor/buddyeditor.cpp
index e367f9a..4127d7c 100644
--- a/tools/designer/src/components/buddyeditor/buddyeditor.cpp
+++ b/tools/designer/src/components/buddyeditor/buddyeditor.cpp
@@ -153,13 +153,13 @@ void BuddyEditor::updateBackground()
m_updating = true;
QList<Connection *> newList;
- const LabelList label_list = qFindChildren<QLabel*>(background());
+ const LabelList label_list = background()->findChildren<QLabel*>();
foreach (QLabel *label, label_list) {
const QString buddy_name = buddy(label, m_formWindow->core());
if (buddy_name.isEmpty())
continue;
- const QList<QWidget *> targets = qFindChildren<QWidget*>(background(), buddy_name);
+ const QList<QWidget *> targets = background()->findChildren<QWidget*>(buddy_name);
if (targets.isEmpty())
continue;
@@ -238,12 +238,12 @@ void BuddyEditor::setBackground(QWidget *background)
clear();
ConnectionEdit::setBackground(background);
- const LabelList label_list = qFindChildren<QLabel*>(background);
+ const LabelList label_list = background->findChildren<QLabel*>();
foreach (QLabel *label, label_list) {
const QString buddy_name = buddy(label, m_formWindow->core());
if (buddy_name.isEmpty())
continue;
- QWidget *target = qFindChild<QWidget*>(background, buddy_name);
+ QWidget *target = background->findChild<QWidget*>(buddy_name);
if (target == 0)
continue;
@@ -297,7 +297,7 @@ void BuddyEditor::endConnection(QWidget *target, const QPoint &pos)
void BuddyEditor::widgetRemoved(QWidget *widget)
{
- QList<QWidget*> child_list = qFindChildren<QWidget*>(widget);
+ QList<QWidget*> child_list = widget->findChildren<QWidget*>();
child_list.prepend(widget);
ConnectionSet remove_set;
@@ -354,7 +354,7 @@ void BuddyEditor::deleteSelected()
void BuddyEditor::autoBuddy()
{
// Any labels?
- LabelList labelList = qFindChildren<QLabel*>(background());
+ LabelList labelList = background()->findChildren<QLabel*>();
if (labelList.empty())
return;
// Find already used buddies
diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp
index 15775f6..eeb63e5 100644
--- a/tools/designer/src/components/formeditor/formwindow.cpp
+++ b/tools/designer/src/components/formeditor/formwindow.cpp
@@ -387,7 +387,7 @@ void FormWindow::setCursorToAll(const QCursor &c, QWidget *start)
{
#ifndef QT_NO_CURSOR
start->setCursor(c);
- const QWidgetList widgets = qFindChildren<QWidget*>(start);
+ const QWidgetList widgets = start->findChildren<QWidget*>();
foreach (QWidget *widget, widgets) {
if (!qobject_cast<WidgetHandle*>(widget)) {
widget->setCursor(c);
@@ -945,7 +945,7 @@ bool FormWindow::isMainContainer(const QWidget *w) const
void FormWindow::updateChildSelections(QWidget *w)
{
- const QWidgetList l = qFindChildren<QWidget*>(w);
+ const QWidgetList l = w->findChildren<QWidget*>();
if (!l.empty()) {
const QWidgetList::const_iterator lcend = l.constEnd();
for (QWidgetList::const_iterator it = l.constBegin(); it != lcend; ++it) {
@@ -1155,19 +1155,19 @@ bool FormWindow::unify(QObject *w, QString &s, bool changeIt)
existingNames.insert(main->objectName());
const QDesignerMetaDataBaseInterface *metaDataBase = core()->metaDataBase();
- const QWidgetList widgetChildren = qFindChildren<QWidget*>(main);
+ const QWidgetList widgetChildren = main->findChildren<QWidget*>();
if (!widgetChildren.empty())
insertNames(metaDataBase, widgetChildren.constBegin(), widgetChildren.constEnd(), w, existingNames);
- const QList<QLayout *> layoutChildren = qFindChildren<QLayout*>(main);
+ const QList<QLayout *> layoutChildren = main->findChildren<QLayout*>();
if (!layoutChildren.empty())
insertNames(metaDataBase, layoutChildren.constBegin(), layoutChildren.constEnd(), w, existingNames);
- const QList<QAction *> actionChildren = qFindChildren<QAction*>(main);
+ const QList<QAction *> actionChildren = main->findChildren<QAction*>();
if (!actionChildren.empty())
insertNames(metaDataBase, actionChildren.constBegin(), actionChildren.constEnd(), w, existingNames);
- const QList<QButtonGroup *> buttonGroupChildren = qFindChildren<QButtonGroup*>(main);
+ const QList<QButtonGroup *> buttonGroupChildren = main->findChildren<QButtonGroup*>();
if (!buttonGroupChildren.empty())
insertNames(metaDataBase, buttonGroupChildren.constBegin(), buttonGroupChildren.constEnd(), w, existingNames);
@@ -1283,7 +1283,7 @@ void FormWindow::resizeWidget(QWidget *widget, const QRect &geometry)
void FormWindow::raiseChildSelections(QWidget *w)
{
- const QWidgetList l = qFindChildren<QWidget*>(w);
+ const QWidgetList l = w->findChildren<QWidget*>();
if (l.isEmpty())
return;
m_selection->raiseList(l);
@@ -1344,7 +1344,7 @@ QWidgetList FormWindow::selectedWidgets() const
void FormWindow::selectWidgets()
{
bool selectionChanged = false;
- const QWidgetList l = qFindChildren<QWidget*>(mainContainer());
+ const QWidgetList l = mainContainer()->findChildren<QWidget*>();
QListIterator <QWidget*> it(l);
const QRect selRect(mapToGlobal(m_currRect.topLeft()), m_currRect.size());
while (it.hasNext()) {
diff --git a/tools/designer/src/components/formeditor/qdesigner_resource.cpp b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
index 1d78695..135e23b 100644
--- a/tools/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/tools/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -946,7 +946,7 @@ QWidget *QDesignerResource::create(DomWidget *ui_widget, QWidget *parentWidget)
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());
}
@@ -1320,7 +1320,7 @@ DomLayout *QDesignerResource::createDom(QLayout *layout, DomLayout *ui_parentLay
QDesignerMetaDataBaseItemInterface *item = core()->metaDataBase()->item(layout);
if (item == 0) {
- layout = qFindChild<QLayout*>(layout);
+ layout = layout->findChild<QLayout*>();
// refresh the meta database item
item = core()->metaDataBase()->item(layout);
}
@@ -1440,7 +1440,7 @@ void QDesignerResource::applyTabStops(QWidget *widget, DomTabStops *tabStops)
QList<QWidget*> tabOrder;
foreach (const QString &widgetName, tabStops->elementTabStop()) {
- if (QWidget *w = qFindChild<QWidget*>(widget, widgetName)) {
+ if (QWidget *w = widget->findChild<QWidget*>(widgetName)) {
tabOrder.append(w);
}
}
diff --git a/tools/designer/src/components/formeditor/qmainwindow_container.cpp b/tools/designer/src/components/formeditor/qmainwindow_container.cpp
index 9b5326a..ef4ce85 100644
--- a/tools/designer/src/components/formeditor/qmainwindow_container.cpp
+++ b/tools/designer/src/components/formeditor/qmainwindow_container.cpp
@@ -104,7 +104,7 @@ Qt::DockWidgetArea dockWidgetArea(QDockWidget *me)
QList<QLayout*> candidates;
if (mw->layout()) {
candidates.append(mw->layout());
- candidates += qFindChildren<QLayout*>(mw->layout());
+ candidates += mw->layout()->findChildren<QLayout*>();
}
foreach (QLayout *l, candidates) {
if (l->indexOf(me) != -1) {
diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
index 8674ac1..09c2233 100644
--- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
@@ -245,7 +245,7 @@ namespace qdesigner_internal {
ClassesMemberFunctions reverseClassesMemberFunctions(const QString &obj_name, MemberType member_type,
const QString &peer, QDesignerFormWindowInterface *form)
{
- QObject *object = qFindChild<QObject*>(form, obj_name);
+ QObject *object = form->findChild<QObject*>(obj_name);
if (!object)
return ClassesMemberFunctions();
diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp
index b801c5e..1d45ef5 100644
--- a/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalsloteditor.cpp
@@ -372,7 +372,7 @@ QObject *SignalSlotEditor::objectByName(QWidget *topLevel, const QString &name)
if (topLevel->objectName() == name)
object = topLevel;
else
- object = qFindChild<QObject*>(topLevel, name);
+ object = topLevel->findChild<QObject*>(name);
const QDesignerMetaDataBaseInterface *mdb = formWindow()->core()->metaDataBase();
if (mdb->item(object))
return object;
diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index 5547761..530f176 100644
--- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -117,7 +117,7 @@ static QStringList objectNameList(QDesignerFormWindowInterface *form)
const QDesignerMetaDataBaseInterface *mdb = form->core()->metaDataBase();
// Add managed actions and actions with managed menus
- const ActionList actions = qFindChildren<QAction*>(mainContainer);
+ const ActionList actions = mainContainer->findChildren<QAction*>();
if (!actions.empty()) {
const ActionList::const_iterator cend = actions.constEnd();
for (ActionList::const_iterator it = actions.constBegin(); it != cend; ++it) {
@@ -135,7 +135,7 @@ static QStringList objectNameList(QDesignerFormWindowInterface *form)
}
// Add managed buttons groups
- const ButtonGroupList buttonGroups = qFindChildren<QButtonGroup *>(mainContainer);
+ const ButtonGroupList buttonGroups = mainContainer->findChildren<QButtonGroup *>();
if (!buttonGroups.empty()) {
const ButtonGroupList::const_iterator cend = buttonGroups.constEnd();
for (ButtonGroupList::const_iterator it = buttonGroups.constBegin(); it != cend; ++it)
@@ -658,7 +658,7 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent,
const qdesigner_internal::ClassesMemberFunctions class_list = qdesigner_internal::reverseClassesMemberFunctions(obj_name, type, peer, m_form);
- QObject *object = qFindChild<QObject*>(m_form, obj_name);
+ QObject *object = m_form->findChild<QObject*>(obj_name);
inline_editor->addText(type == qdesigner_internal::SignalMember ? tr("<signal>") : tr("<slot>"));
foreach (const qdesigner_internal::ClassMemberFunctions &class_info, class_list) {
@@ -767,7 +767,7 @@ void SignalSlotEditorWindow::setActiveFormWindow(QDesignerFormWindowInterface *f
}
}
- m_editor = qFindChild<SignalSlotEditor*>(form);
+ m_editor = form->findChild<SignalSlotEditor*>();
m_model->setEditor(m_editor);
if (!m_editor.isNull()) {
ConnectionDelegate *delegate
diff --git a/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp b/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp
index 25798d3..ac32795 100644
--- a/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp
+++ b/tools/designer/src/components/widgetbox/widgetbox_dnditem.cpp
@@ -185,7 +185,7 @@ static QWidget *decorationFromDomWidget(DomUI *dom_ui, QDesignerFormEditorInterf
fakeTopLevel->setParent(0, Qt::ToolTip); // Container
// Actual widget
const DomWidget *domW = dom_ui->elementWidget()->elementWidget().front();
- QWidget *w = qFindChildren<QWidget*>(fakeTopLevel).front();
+ QWidget *w = fakeTopLevel->findChildren<QWidget*>().front();
Q_ASSERT(w);
// hack begin;
// We set _q_dockDrag dynamic property which will be detected in drag enter event of form window.