summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/components/formeditor
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/formeditor
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/formeditor')
-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
3 files changed, 12 insertions, 12 deletions
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) {