diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-03-25 19:27:05 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-03-25 19:27:05 (GMT) |
commit | 986873b239f15df43a3ebbc88a38f8ff8d6d07bf (patch) | |
tree | 946f585f390d3abb835a3280bbdc6bc90724977c /tools | |
parent | b7f48eee301e973fcfae08dfd8997538b6dbe251 (diff) | |
parent | 3671dbf34940e166b747b6f8f3f5758fd486073c (diff) | |
download | Qt-986873b239f15df43a3ebbc88a38f8ff8d6d07bf.zip Qt-986873b239f15df43a3ebbc88a38f8ff8d6d07bf.tar.gz Qt-986873b239f15df43a3ebbc88a38f8ff8d6d07bf.tar.bz2 |
Merge remote branch 'origin/4.7' into 4.7
Conflicts:
tools/qdoc3/generator.cpp
tools/qdoc3/node.cpp
Diffstat (limited to 'tools')
19 files changed, 383 insertions, 172 deletions
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp index b9a1b0e..4bc7027 100644 --- a/tools/assistant/tools/assistant/bookmarkmanager.cpp +++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp @@ -363,8 +363,9 @@ void BookmarkManager::refeshBookmarkMenu() bookmarkMenu->addAction(tr("Manage Bookmarks..."), this, SLOT(manageBookmarks())); - bookmarkMenu->addAction(tr("Add Bookmark..."), this, SLOT(addBookmark()), - QKeySequence(tr("Ctrl+D"))); + bookmarkMenu->addAction(QIcon::fromTheme("bookmark-new"), + tr("Add Bookmark..."), this, SLOT(addBookmark()), + QKeySequence(tr("Ctrl+D"))); bookmarkMenu->addSeparator(); const QModelIndex &root = bookmarkModel->index(0, 0, QModelIndex()); diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp index c403aa7..913e342 100644 --- a/tools/assistant/tools/assistant/mainwindow.cpp +++ b/tools/assistant/tools/assistant/mainwindow.cpp @@ -409,6 +409,11 @@ void MainWindow::setupActions() QMenu *menu = menuBar()->addMenu(tr("&File")); + m_newTabAction = menu->addAction(tr("New &Tab"), m_centralWidget, SLOT(newTab())); + m_newTabAction->setShortcut(QKeySequence::AddTab); + + menu->addSeparator(); + m_pageSetupAction = menu->addAction(tr("Page Set&up..."), m_centralWidget, SLOT(pageSetup())); m_printPreviewAction = menu->addAction(tr("Print Preview..."), m_centralWidget, @@ -421,14 +426,12 @@ void MainWindow::setupActions() menu->addSeparator(); - m_newTabAction = menu->addAction(tr("New &Tab"), m_centralWidget, SLOT(newTab())); - m_newTabAction->setShortcut(QKeySequence::AddTab); - m_closeTabAction = menu->addAction(tr("&Close Tab"), m_centralWidget, SLOT(closeTab())); m_closeTabAction->setShortcuts(QKeySequence::Close); - QAction *tmp = menu->addAction(tr("&Quit"), this, SLOT(close())); + QAction *tmp = menu->addAction(QIcon::fromTheme("application-exit"), + tr("&Quit"), this, SLOT(close())); tmp->setMenuRole(QAction::QuitRole); #ifdef Q_OS_WIN tmp->setShortcut(QKeySequence(tr("CTRL+Q"))); @@ -532,6 +535,8 @@ void MainWindow::setupActions() m_aboutAction->setMenuRole(QAction::AboutRole); #ifdef Q_WS_X11 + m_newTabAction->setIcon(QIcon::fromTheme("tab-new", m_newTabAction->icon())); + m_closeTabAction->setIcon(QIcon::fromTheme("window-close", m_closeTabAction->icon())); m_backAction->setIcon(QIcon::fromTheme("go-previous" , m_backAction->icon())); m_nextAction->setIcon(QIcon::fromTheme("go-next" , m_nextAction->icon())); m_zoomInAction->setIcon(QIcon::fromTheme("zoom-in" , m_zoomInAction->icon())); @@ -541,7 +546,10 @@ void MainWindow::setupActions() m_copyAction->setIcon(QIcon::fromTheme("edit-copy" , m_copyAction->icon())); m_findAction->setIcon(QIcon::fromTheme("edit-find" , m_findAction->icon())); m_homeAction->setIcon(QIcon::fromTheme("go-home" , m_homeAction->icon())); + m_pageSetupAction->setIcon(QIcon::fromTheme("document-page-setup", m_pageSetupAction->icon())); + m_printPreviewAction->setIcon(QIcon::fromTheme("document-print-preview", m_printPreviewAction->icon())); m_printAction->setIcon(QIcon::fromTheme("document-print" , m_printAction->icon())); + m_aboutAction->setIcon(QIcon::fromTheme("help-about", m_aboutAction->icon())); #endif QToolBar *navigationBar = addToolBar(tr("Navigation Toolbar")); diff --git a/tools/designer/src/components/formeditor/formeditor.qrc b/tools/designer/src/components/formeditor/formeditor.qrc index 83cc9c7..6510814 100644 --- a/tools/designer/src/components/formeditor/formeditor.qrc +++ b/tools/designer/src/components/formeditor/formeditor.qrc @@ -63,6 +63,7 @@ <file>images/qtlogo.png</file> <file>images/qt3logo.png</file> <file>images/resetproperty.png</file> + <file>images/cleartext.png</file> <file>images/sort.png</file> <file>images/edit.png</file> <file>images/reload.png</file> diff --git a/tools/designer/src/components/formeditor/formwindowmanager.cpp b/tools/designer/src/components/formeditor/formwindowmanager.cpp index 88b4ac5..ce809ff 100644 --- a/tools/designer/src/components/formeditor/formwindowmanager.cpp +++ b/tools/designer/src/components/formeditor/formwindowmanager.cpp @@ -523,10 +523,11 @@ void FormWindowManager::setupActions() connect(m_actionShowFormWindowSettingsDialog, SIGNAL(triggered()), this, SLOT(slotActionShowFormWindowSettingsDialog())); m_actionShowFormWindowSettingsDialog->setEnabled(false); - +#ifdef Q_WS_X11 m_actionCopy->setIcon(QIcon::fromTheme("edit-copy", m_actionCopy->icon())); m_actionCut->setIcon(QIcon::fromTheme("edit-cut", m_actionCut->icon())); m_actionPaste->setIcon(QIcon::fromTheme("edit-paste", m_actionPaste->icon())); + m_actionDelete->setIcon(QIcon::fromTheme("edit-delete", m_actionDelete->icon())); // These do not currently exist, but will allow theme authors to fill in the gaps m_actionBreakLayout->setIcon(QIcon::fromTheme("designer-break-layout", m_actionBreakLayout->icon())); @@ -536,6 +537,7 @@ void FormWindowManager::setupActions() m_actionSplitHorizontal->setIcon(QIcon::fromTheme("designer-split-horizontal", m_actionSplitHorizontal->icon())); m_actionSplitVertical->setIcon(QIcon::fromTheme("designer-split-vertical", m_actionSplitVertical->icon())); m_actionAdjustSize->setIcon(QIcon::fromTheme("designer-adjust-size", m_actionAdjustSize->icon())); +#endif } void FormWindowManager::slotActionCutActivated() diff --git a/tools/designer/src/components/formeditor/images/cleartext.png b/tools/designer/src/components/formeditor/images/cleartext.png Binary files differnew file mode 100644 index 0000000..74133ba --- /dev/null +++ b/tools/designer/src/components/formeditor/images/cleartext.png diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.cpp b/tools/designer/src/components/propertyeditor/propertyeditor.cpp index 512cc82..86d7bdf 100644 --- a/tools/designer/src/components/propertyeditor/propertyeditor.cpp +++ b/tools/designer/src/components/propertyeditor/propertyeditor.cpp @@ -79,6 +79,7 @@ #include <QtGui/QToolButton> #include <QtGui/QActionGroup> #include <QtGui/QLabel> +#include <QtGui/QPainter> #include <QtCore/QDebug> #include <QtCore/QTextStream> @@ -98,6 +99,53 @@ QT_BEGIN_NAMESPACE // --------------------------------------------------------------------------------- namespace qdesigner_internal { + +// ----------- ElidingLabel +// QLabel does not support text eliding so we need a helper class + +class ElidingLabel : public QWidget +{ +public: + ElidingLabel(const QString &text = QString(), QWidget *parent = 0) + : QWidget(parent), + m_text(text), + m_mode(Qt::ElideRight) { + setContentsMargins(3, 2, 3, 2); + } + QSize sizeHint() const; + void paintEvent(QPaintEvent *e); + void setText(const QString &text) { + m_text = text; + updateGeometry(); + } + void setElidemode(Qt::TextElideMode mode) { + m_mode = mode; + updateGeometry(); + } +private: + QString m_text; + Qt::TextElideMode m_mode; +}; + +QSize ElidingLabel::sizeHint() const +{ + QSize size = fontMetrics().boundingRect(m_text).size(); + size += QSize(contentsMargins().left() + contentsMargins().right(), + contentsMargins().top() + contentsMargins().bottom()); + return size; +} + +void ElidingLabel::paintEvent(QPaintEvent *e) { + QPainter painter(this); + painter.setPen(QColor(0, 0, 0, 60)); + painter.setBrush(QColor(255, 255, 255, 40)); + painter.drawRect(rect().adjusted(0, 0, -1, -1)); + painter.setPen(palette().windowText().color()); + painter.drawText(contentsRect(), Qt::AlignLeft, + fontMetrics().elidedText(m_text, Qt::ElideRight, width(), 0)); +} + + // ----------- PropertyEditor::Strings PropertyEditor::Strings::Strings() : @@ -186,7 +234,7 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare m_coloringAction(new QAction(createIconSet(QLatin1String("color.png")), tr("Color Groups"), this)), m_treeAction(new QAction(tr("Tree View"), this)), m_buttonAction(new QAction(tr("Drop Down Button View"), this)), - m_classLabel(new QLabel), + m_classLabel(new ElidingLabel), m_sorting(false), m_coloring(false), m_brightness(false) @@ -223,11 +271,6 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare actionGroup->addAction(m_buttonAction); connect(actionGroup, SIGNAL(triggered(QAction*)), this, SLOT(slotViewTriggered(QAction*))); - QWidget *classWidget = new QWidget; - QHBoxLayout *l = new QHBoxLayout(classWidget); - l->setContentsMargins(5, 0, 5, 0); - l->addWidget(m_classLabel); - // Add actions QActionGroup *addDynamicActionGroup = new QActionGroup(this); connect(addDynamicActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(slotAddDynamicProperty(QAction*))); @@ -269,7 +312,6 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare #endif // Assemble toolbar QToolBar *toolBar = new QToolBar; - toolBar->addWidget(classWidget); toolBar->addWidget(m_filterWidget); toolBar->addWidget(createDropDownButton(m_addDynamicAction)); toolBar->addAction(m_removeDynamicAction); @@ -292,6 +334,8 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare QVBoxLayout *layout = new QVBoxLayout(this); layout->addWidget(toolBar); + layout->addWidget(m_classLabel); + layout->addSpacerItem(new QSpacerItem(0,1)); layout->addWidget(m_stackedWidget); layout->setMargin(0); layout->setSpacing(0); @@ -778,9 +822,14 @@ void PropertyEditor::updateToolBarLabel() className = realClassName(m_object); } - QString classLabelText = objectName; - classLabelText += QLatin1Char('\n'); + m_classLabel->setVisible(!objectName.isEmpty() || !className.isEmpty()); + m_classLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + + QString classLabelText; + if (!objectName.isEmpty()) + classLabelText += objectName + QLatin1String(" : "); classLabelText += className; + m_classLabel->setText(classLabelText); m_classLabel->setToolTip(tr("Object: %1\nClass: %2").arg(objectName).arg(className)); } diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.h b/tools/designer/src/components/propertyeditor/propertyeditor.h index 5869c94..f0ea94f 100644 --- a/tools/designer/src/components/propertyeditor/propertyeditor.h +++ b/tools/designer/src/components/propertyeditor/propertyeditor.h @@ -62,9 +62,7 @@ class QtTreePropertyBrowser; class QtProperty; class QtVariantProperty; class QtBrowserItem; - class QStackedWidget; -class QLabel; namespace qdesigner_internal { @@ -72,6 +70,7 @@ class StringProperty; class DesignerPropertyManager; class DesignerEditorFactory; class FilterWidget; +class ElidingLabel; class QT_PROPERTYEDITOR_EXPORT PropertyEditor: public QDesignerPropertyEditor { @@ -186,7 +185,7 @@ private: QAction *m_coloringAction; QAction *m_treeAction; QAction *m_buttonAction; - QLabel *m_classLabel; + ElidingLabel *m_classLabel; bool m_sorting; bool m_coloring; diff --git a/tools/designer/src/components/widgetbox/widgetbox.cpp b/tools/designer/src/components/widgetbox/widgetbox.cpp index 512d6ba..091135a 100644 --- a/tools/designer/src/components/widgetbox/widgetbox.cpp +++ b/tools/designer/src/components/widgetbox/widgetbox.cpp @@ -74,7 +74,10 @@ WidgetBox::WidgetBox(QDesignerFormEditorInterface *core, QWidget *parent, Qt::Wi FilterWidget *filterWidget = new FilterWidget(0, FilterWidget::LayoutAlignNone); filterWidget->setRefuseFocus(true); connect(filterWidget, SIGNAL(filterChanged(QString)), m_view, SLOT(filter(QString))); - l->addWidget(filterWidget); + + QToolBar *toolBar = new QToolBar(this); + toolBar->addWidget(filterWidget); + l->addWidget(toolBar); // View connect(m_view, SIGNAL(pressed(QString,QString,QPoint)), diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp index 887ba98..6776351 100644 --- a/tools/designer/src/designer/qdesigner_actions.cpp +++ b/tools/designer/src/designer/qdesigner_actions.cpp @@ -200,9 +200,15 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench) #endif m_previewManager(0) { +#ifdef Q_WS_X11 m_newFormAction->setIcon(QIcon::fromTheme("document-new", m_newFormAction->icon())); m_openFormAction->setIcon(QIcon::fromTheme("document-open", m_openFormAction->icon())); m_saveFormAction->setIcon(QIcon::fromTheme("document-save", m_saveFormAction->icon())); + m_saveFormAsAction->setIcon(QIcon::fromTheme("document-save-as", m_saveFormAsAction->icon())); + m_printPreviewAction->setIcon(QIcon::fromTheme("document-print", m_printPreviewAction->icon())); + m_closeFormAction->setIcon(QIcon::fromTheme("window-close", m_closeFormAction->icon())); + m_quitAction->setIcon(QIcon::fromTheme("application-exit", m_quitAction->icon())); +#endif Q_ASSERT(m_core != 0); qdesigner_internal::QDesignerFormWindowManager *ifwm = qobject_cast<qdesigner_internal::QDesignerFormWindowManager *>(m_core->formWindowManager()); @@ -490,13 +496,13 @@ QAction *QDesignerActions::createRecentFilesMenu() } updateRecentFileActions(); menu->addSeparator(); - act = new QAction(tr("Clear &Menu"), this); + act = new QAction(QIcon::fromTheme("edit-clear"), tr("Clear &Menu"), this); act->setObjectName(QLatin1String("__qt_action_clear_menu_")); connect(act, SIGNAL(triggered()), this, SLOT(clearRecentFiles())); m_recentFilesActions->addAction(act); menu->addAction(act); - act = new QAction(tr("&Recent Forms"), this); + act = new QAction(QIcon::fromTheme("document-open-recent"), tr("&Recent Forms"), this); act->setMenu(menu); return act; } diff --git a/tools/designer/src/lib/shared/filterwidget.cpp b/tools/designer/src/lib/shared/filterwidget.cpp index 6c73a08..f485346 100644 --- a/tools/designer/src/lib/shared/filterwidget.cpp +++ b/tools/designer/src/lib/shared/filterwidget.cpp @@ -44,13 +44,17 @@ #include <QtGui/QVBoxLayout> #include <QtGui/QHBoxLayout> -#include <QtGui/QPushButton> #include <QtGui/QLineEdit> #include <QtGui/QFocusEvent> #include <QtGui/QPalette> #include <QtGui/QCursor> +#include <QtGui/QToolButton> +#include <QtGui/QPainter> +#include <QtGui/QStyle> +#include <QtGui/QStyleOption> #include <QtCore/QDebug> +#include <QtCore/QPropertyAnimation> enum { debugFilter = 0 }; @@ -61,12 +65,44 @@ namespace qdesigner_internal { HintLineEdit::HintLineEdit(QWidget *parent) : QLineEdit(parent), m_defaultFocusPolicy(focusPolicy()), - m_hintColor(QColor(0xbbbbbb)), - m_refuseFocus(false), - m_showingHintText(false) + m_refuseFocus(false) { } +IconButton::IconButton(QWidget *parent) + : QToolButton(parent) +{ + setCursor(Qt::ArrowCursor); +} + +void IconButton::paintEvent(QPaintEvent *) +{ + QPainter painter(this); + // Note isDown should really use the active state but in most styles + // this has no proper feedback + QPixmap iconpixmap = icon().pixmap(ICONBUTTON_SIZE, ICONBUTTON_SIZE, isDown() ? + QIcon::Selected : QIcon::Normal); + QRect pixmapRect = QRect(0, 0, iconpixmap.width(), iconpixmap.height()); + pixmapRect.moveCenter(rect().center()); + painter.setOpacity(m_fader); + painter.drawPixmap(pixmapRect, iconpixmap); +} + +void IconButton::animateShow(bool visible) +{ + if (visible) { + QPropertyAnimation *animation = new QPropertyAnimation(this, "fader"); + animation->setDuration(160); + animation->setEndValue(1.0); + animation->start(QAbstractAnimation::DeleteWhenStopped); + } else { + QPropertyAnimation *animation = new QPropertyAnimation(this, "fader"); + animation->setDuration(160); + animation->setEndValue(0.0); + animation->start(QAbstractAnimation::DeleteWhenStopped); + } +} + bool HintLineEdit::refuseFocus() const { return m_refuseFocus; @@ -111,92 +147,53 @@ void HintLineEdit::focusInEvent(QFocusEvent *e) } } - hideHintText(); QLineEdit::focusInEvent(e); } -void HintLineEdit::focusOutEvent(QFocusEvent *e) -{ - if (debugFilter) - qDebug() << Q_FUNC_INFO; - // Focus out: Switch to displaying the hint text unless there is user input - showHintText(); - QLineEdit::focusOutEvent(e); -} - -QString HintLineEdit::hintText() const +// ------------------- FilterWidget +FilterWidget::FilterWidget(QWidget *parent, LayoutMode lm) : + QWidget(parent), + m_editor(new HintLineEdit(this)), + m_button(new IconButton(m_editor)), + m_buttonwidth(0) { - return m_hintText; -} + m_editor->setPlaceholderText(tr("Filter")); -void HintLineEdit::setHintText(const QString &ht) -{ - if (ht == m_hintText) - return; - hideHintText(); - m_hintText = ht; - if (!hasFocus() && !ht.isEmpty()) - showHintText(); -} + // Let the style determine minimum height for our widget + QSize size(ICONBUTTON_SIZE + 2, ICONBUTTON_SIZE + 2); -void HintLineEdit::showHintText(bool force) -{ - if (m_showingHintText || m_hintText.isEmpty()) - return; - if (force || text().isEmpty()) { - m_showingHintText = true; - setText(m_hintText); - setTextColor(m_hintColor, &m_textColor); - } -} -void HintLineEdit::hideHintText() -{ - if (m_showingHintText && !m_hintText.isEmpty()) { - m_showingHintText = false; - setText(QString()); - setTextColor(m_textColor); + // Note KDE does not reserve space for the highlight color + if (style()->inherits("OxygenStyle")) { + size = size.expandedTo(QSize(24, 0)); } -} -bool HintLineEdit::isShowingHintText() const -{ - return m_showingHintText; -} - -QString HintLineEdit::typedText() const -{ - return m_showingHintText ? QString() : text(); -} + // Make room for clear icon + QMargins margins = m_editor->textMargins(); + if (layoutDirection() == Qt::LeftToRight) + margins.setRight(size.width()); + else + margins.setLeft(size.width()); -void HintLineEdit::setTextColor(const QColor &newColor, QColor *oldColor) -{ - QPalette pal = palette(); - if (oldColor) - *oldColor = pal.color(QPalette::Text); - pal.setColor(QPalette::Text, newColor); - setPalette(pal);} + m_editor->setTextMargins(margins); -// ------------------- FilterWidget -FilterWidget::FilterWidget(QWidget *parent, LayoutMode lm) : - QWidget(parent), - m_button(new QPushButton), - m_editor(new HintLineEdit) -{ - m_editor->setHintText(tr("<Filter>")); QHBoxLayout *l = new QHBoxLayout(this); l->setMargin(0); l->setSpacing(0); - if (lm == LayoutAlignRight) l->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum)); l->addWidget(m_editor); - m_button->setIcon(createIconSet(QLatin1String("resetproperty.png"))); - m_button->setIconSize(QSize(8, 8)); - m_button->setFlat(true); - l->addWidget(m_button); + // KDE has custom icons for this. Notice that icon namings are counter intuitive + // If these icons are not avaiable we use the freedesktop standard name before + // falling back to a bundled resource + QIcon icon = QIcon::fromTheme(layoutDirection() == Qt::LeftToRight ? + QLatin1String("edit-clear-locationbar-rtl") : + QLatin1String("edit-clear-locationbar-ltr"), + QIcon::fromTheme("edit-clear", createIconSet(QLatin1String("cleartext.png")))); + m_button->setIcon(icon); + m_button->setToolTip(tr("Clear text")); connect(m_button, SIGNAL(clicked()), this, SLOT(reset())); connect(m_editor, SIGNAL(textChanged(QString)), this, SLOT(checkButton(QString))); connect(m_editor, SIGNAL(textEdited(QString)), this, SIGNAL(filterChanged(QString))); @@ -204,25 +201,38 @@ FilterWidget::FilterWidget(QWidget *parent, LayoutMode lm) : QString FilterWidget::text() const { - return m_editor->typedText(); + return m_editor->text(); } void FilterWidget::checkButton(const QString &) { - m_button->setEnabled(!text().isEmpty()); + m_button->animateShow(!m_editor->text().isEmpty()); } void FilterWidget::reset() { if (debugFilter) qDebug() << Q_FUNC_INFO; - if (!text().isEmpty()) { + + if (!m_editor->text().isEmpty()) { // Editor has lost focus once this is pressed - m_editor->showHintText(true); + m_editor->clear(); emit filterChanged(QString()); } } +void FilterWidget::resizeEvent(QResizeEvent *) +{ + QRect contentRect = m_editor->rect(); + if (layoutDirection() == Qt::LeftToRight) { + const int iconoffset = m_editor->textMargins().right() + 4; + m_button->setGeometry(contentRect.adjusted(m_editor->width() - iconoffset, 0, 0, 0)); + } else { + const int iconoffset = m_editor->textMargins().left() + 4; + m_button->setGeometry(contentRect.adjusted(0, 0, -m_editor->width() + iconoffset, 0)); + } +} + bool FilterWidget::refuseFocus() const { return m_editor->refuseFocus(); diff --git a/tools/designer/src/lib/shared/filterwidget_p.h b/tools/designer/src/lib/shared/filterwidget_p.h index 025d708..423b30e 100644 --- a/tools/designer/src/lib/shared/filterwidget_p.h +++ b/tools/designer/src/lib/shared/filterwidget_p.h @@ -58,58 +58,55 @@ #include <QtGui/QWidget> #include <QtGui/QLineEdit> #include <QtGui/QColor> +#include <QtGui/QToolButton> QT_BEGIN_NAMESPACE -class QPushButton; +class QToolButton; namespace qdesigner_internal { -/* A line edit that displays a grayed hintText (like "Type Here to Filter") - * when not focused and empty. When connecting to the changed signals and - * querying text, one has to be aware that the text is set to that hint - * text if isShowingHintText() returns true (that is, does not contain - * valid user input). This widget should never have initial focus +/* This widget should never have initial focus * (ie, be the first widget of a dialog, else, the hint cannot be displayed. * For situations, where it is the only focusable control (widget box), * there is a special "refuseFocus()" mode, in which it clears the focus * policy and focusses explicitly on click (note that setting Qt::ClickFocus * is not sufficient for that as an ActivationFocus will occur). */ +#define ICONBUTTON_SIZE 16 + class QDESIGNER_SHARED_EXPORT HintLineEdit : public QLineEdit { Q_OBJECT public: explicit HintLineEdit(QWidget *parent = 0); - QString hintText() const; - - bool isShowingHintText() const; - - // Convenience for accessing the text that returns "" in case of isShowingHintText(). - QString typedText() const; - bool refuseFocus() const; void setRefuseFocus(bool v); -public slots: - void setHintText(const QString &ht); - void showHintText(bool force = false); - void hideHintText(); - protected: virtual void mousePressEvent(QMouseEvent *event); virtual void focusInEvent(QFocusEvent *e); - virtual void focusOutEvent(QFocusEvent *e); private: - void setTextColor(const QColor &newColor, QColor *oldColor = 0); - const Qt::FocusPolicy m_defaultFocusPolicy; - const QColor m_hintColor; - QColor m_textColor; bool m_refuseFocus; - QString m_hintText; - bool m_showingHintText; +}; + +// IconButton: This is a simple helper class that represents clickable icons + +class IconButton: public QToolButton +{ + Q_OBJECT + Q_PROPERTY(float fader READ fader WRITE setFader) +public: + IconButton(QWidget *parent); + void paintEvent(QPaintEvent *event); + float fader() { return m_fader; } + void setFader(float value) { m_fader = value; update(); } + void animateShow(bool visible); + +private: + float m_fader; }; // FilterWidget: For filtering item views, with reset button Uses HintLineEdit. @@ -128,7 +125,7 @@ public: explicit FilterWidget(QWidget *parent = 0, LayoutMode lm = LayoutAlignRight); QString text() const; - + void resizeEvent(QResizeEvent *); bool refuseFocus() const; // see HintLineEdit void setRefuseFocus(bool v); @@ -142,8 +139,9 @@ private slots: void checkButton(const QString &text); private: - QPushButton *m_button; HintLineEdit *m_editor; + IconButton *m_button; + int m_buttonwidth; }; } // namespace qdesigner_internal diff --git a/tools/designer/src/lib/shared/qtresourceview.cpp b/tools/designer/src/lib/shared/qtresourceview.cpp index 859f239..3c7010c 100644 --- a/tools/designer/src/lib/shared/qtresourceview.cpp +++ b/tools/designer/src/lib/shared/qtresourceview.cpp @@ -377,7 +377,8 @@ void QtResourceViewPrivate::createPaths() if (!m_resourceModel) return; - const QString root(QLatin1Char(':')); + // Resource root up until 4.6 was ':', changed to ":/" as of 4.7 + const QString root(QLatin1String(":/")); QMap<QString, QString> contents = m_resourceModel->contents(); QMapIterator<QString, QString> itContents(contents); diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 321fe8c..7d73596 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -1810,28 +1810,50 @@ QString MainWindow::friendlyString(const QString& str) return f.simplified(); } +static inline void setThemeIcon(QAction *action, const char *name, const char *fallback) +{ + const QIcon fallbackIcon(MainWindow::resourcePrefix() + QLatin1String(fallback)); +#ifdef Q_WS_X11 + action->setIcon(QIcon::fromTheme(QLatin1String(name), fallbackIcon)); +#else + Q_UNUSED(name) + action->setIcon(fallbackIcon); +#endif +} + void MainWindow::setupMenuBar() { + // There are no fallback icons for these +#ifdef Q_WS_X11 + m_ui.menuRecentlyOpenedFiles->setIcon(QIcon::fromTheme(QLatin1String("document-open-recent"))); + m_ui.actionCloseAll->setIcon(QIcon::fromTheme(QLatin1String("window-close"))); + m_ui.actionExit->setIcon(QIcon::fromTheme(QLatin1String("application-exit"))); + m_ui.actionSelectAll->setIcon(QIcon::fromTheme(QLatin1String("edit-select-all"))); +#endif + + // Prefer theme icons when available for these actions + setThemeIcon(m_ui.actionOpen, "document-open", "/fileopen.png"); + setThemeIcon(m_ui.actionOpenAux, "document-open", "/fileopen.png"); + setThemeIcon(m_ui.actionSave, "document-save", "/filesave.png"); + setThemeIcon(m_ui.actionSaveAll, "document-save", "/filesave.png"); + setThemeIcon(m_ui.actionPrint, "document-print", "/print.png"); + setThemeIcon(m_ui.actionRedo, "edit-redo", "/redo.png"); + setThemeIcon(m_ui.actionUndo, "edit-undo", "/undo.png"); + setThemeIcon(m_ui.actionCut, "edit-cut", "/editcut.png"); + setThemeIcon(m_ui.actionCopy, "edit-copy", "/editcopy.png"); + setThemeIcon(m_ui.actionPaste, "edit-paste", "/editpaste.png"); + setThemeIcon(m_ui.actionFind, "edit-find", "/searchfind.png"); + + // No well defined theme icons for these actions m_ui.actionAccelerators->setIcon(QIcon(resourcePrefix() + QLatin1String("/accelerator.png"))); m_ui.actionOpenPhraseBook->setIcon(QIcon(resourcePrefix() + QLatin1String("/book.png"))); m_ui.actionDoneAndNext->setIcon(QIcon(resourcePrefix() + QLatin1String("/doneandnext.png"))); - m_ui.actionCopy->setIcon(QIcon(resourcePrefix() + QLatin1String("/editcopy.png"))); - m_ui.actionCut->setIcon(QIcon(resourcePrefix() + QLatin1String("/editcut.png"))); - m_ui.actionPaste->setIcon(QIcon(resourcePrefix() + QLatin1String("/editpaste.png"))); - m_ui.actionOpen->setIcon(QIcon(resourcePrefix() + QLatin1String("/fileopen.png"))); - m_ui.actionOpenAux->setIcon(QIcon(resourcePrefix() + QLatin1String("/fileopen.png"))); - m_ui.actionSaveAll->setIcon(QIcon(resourcePrefix() + QLatin1String("/filesave.png"))); - m_ui.actionSave->setIcon(QIcon(resourcePrefix() + QLatin1String("/filesave.png"))); m_ui.actionNext->setIcon(QIcon(resourcePrefix() + QLatin1String("/next.png"))); m_ui.actionNextUnfinished->setIcon(QIcon(resourcePrefix() + QLatin1String("/nextunfinished.png"))); m_ui.actionPhraseMatches->setIcon(QIcon(resourcePrefix() + QLatin1String("/phrase.png"))); m_ui.actionEndingPunctuation->setIcon(QIcon(resourcePrefix() + QLatin1String("/punctuation.png"))); m_ui.actionPrev->setIcon(QIcon(resourcePrefix() + QLatin1String("/prev.png"))); m_ui.actionPrevUnfinished->setIcon(QIcon(resourcePrefix() + QLatin1String("/prevunfinished.png"))); - m_ui.actionPrint->setIcon(QIcon(resourcePrefix() + QLatin1String("/print.png"))); - m_ui.actionRedo->setIcon(QIcon(resourcePrefix() + QLatin1String("/redo.png"))); - m_ui.actionFind->setIcon(QIcon(resourcePrefix() + QLatin1String("/searchfind.png"))); - m_ui.actionUndo->setIcon(QIcon(resourcePrefix() + QLatin1String("/undo.png"))); m_ui.actionPlaceMarkerMatches->setIcon(QIcon(resourcePrefix() + QLatin1String("/validateplacemarkers.png"))); m_ui.actionWhatsThis->setIcon(QIcon(resourcePrefix() + QLatin1String("/whatsthis.png"))); diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 0e90615..c5b150c 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -1194,14 +1194,22 @@ void Generator::appendSortedQmlNames(Text& text, QMap<QString,Text> classMap; int index = 0; +<<<<<<< HEAD #ifdef DEBUG_MULTIPLE +======= +#ifdef DEBUG_MULTIPLE_QDOCCONF_FILES +>>>>>>> origin/4.7 qDebug() << "Generator::appendSortedQmlNames():" << base->name() << "is inherited by..."; -#endif +#endif for (int i = 0; i < subs.size(); ++i) { Text t; +<<<<<<< HEAD #ifdef DEBUG_MULTIPLE +======= +#ifdef DEBUG_MULTIPLE_QDOCCONF_FILES +>>>>>>> origin/4.7 qDebug() << " " << subs[i]->name(); -#endif +#endif appendFullName(t, subs[i], base, marker); classMap[t.toString().toLower()] = t; } diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 71810e4..edba097 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -41,6 +41,7 @@ #include <QHash> #include <QMap> +#include <qdebug.h> #include "atom.h" #include "helpprojectwriter.h" @@ -116,6 +117,11 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList typeHash["property"] = Node::Property; typeHash["variable"] = Node::Variable; typeHash["target"] = Node::Target; +#ifdef QDOC_QML + typeHash["qmlproperty"] = Node::QmlProperty; + typeHash["qmlsignal"] = Node::QmlSignal; + typeHash["qmlmethod"] = Node::QmlMethod; +#endif QHash<QString, Node::SubType> subTypeHash; subTypeHash["example"] = Node::Example; @@ -127,6 +133,8 @@ void HelpProjectWriter::readSelectors(SubProject &subproject, const QStringList subTypeHash["externalpage"] = Node::ExternalPage; #ifdef QDOC_QML subTypeHash["qmlclass"] = Node::QmlClass; + subTypeHash["qmlpropertygroup"] = Node::QmlPropertyGroup; + subTypeHash["qmlbasictype"] = Node::QmlBasicType; #endif QSet<Node::SubType> allSubTypes = QSet<Node::SubType>::fromList(subTypeHash.values()); @@ -176,7 +184,13 @@ QStringList HelpProjectWriter::keywordDetails(const Node *node) const { QStringList details; - if (node->parent() && !node->parent()->name().isEmpty()) { + if (node->type() == Node::QmlProperty) { + // "name" + details << node->name(); + // "id" + details << node->parent()->parent()->name()+"::"+node->name(); + } + else if (node->parent() && !node->parent()->name().isEmpty()) { // "name" if (node->type() == Node::Enum || node->type() == Node::Typedef) details << node->parent()->name()+"::"+node->name(); @@ -184,29 +198,29 @@ QStringList HelpProjectWriter::keywordDetails(const Node *node) const details << node->name(); // "id" details << node->parent()->name()+"::"+node->name(); - } else if (node->type() == Node::Fake) { + } + else if (node->type() == Node::Fake) { const FakeNode *fake = static_cast<const FakeNode *>(node); -#ifdef QDOC_QML if (fake->subType() == Node::QmlClass) { details << (QmlClassNode::qmlOnly ? fake->name() : fake->fullTitle()); details << "QML." + fake->name(); - } else -#endif - { + } + else { details << fake->fullTitle(); details << fake->fullTitle(); } - } else { + } + else { details << node->name(); details << node->name(); } details << tree->fullDocumentLocation(node); - return details; } bool HelpProjectWriter::generateSection(HelpProject &project, - QXmlStreamWriter & /* writer */, const Node *node) + QXmlStreamWriter & /* writer */, + const Node *node) { if (!node->url().isEmpty()) return false; @@ -225,9 +239,10 @@ bool HelpProjectWriter::generateSection(HelpProject &project, if (node->type() == Node::Fake) { const FakeNode *fake = static_cast<const FakeNode *>(node); objName = fake->fullTitle(); - } else + } + else objName = tree->fullDocumentName(node); - + // Only add nodes to the set for each subproject if they match a selector. // Those that match will be listed in the table of contents. @@ -289,6 +304,9 @@ bool HelpProjectWriter::generateSection(HelpProject &project, break; case Node::Property: + case Node::QmlProperty: + case Node::QmlSignal: + case Node::QmlMethod: project.keywords.append(keywordDetails(node)); break; @@ -399,7 +417,7 @@ void HelpProjectWriter::generateSections(HelpProject &project, { if (!generateSection(project, writer, node)) return; - + if (node->isInnerNode()) { const InnerNode *inner = static_cast<const InnerNode *>(node); @@ -408,8 +426,23 @@ void HelpProjectWriter::generateSections(HelpProject &project, foreach (const Node *node, inner->childNodes()) { if (node->access() == Node::Private) continue; - if (node->type() == Node::Fake) - childMap[static_cast<const FakeNode *>(node)->fullTitle()] = node; + if (node->type() == Node::Fake) { + /* + Don't visit QML property group nodes, + but visit their children, which are all + QML property nodes. + */ + if (node->subType() == Node::QmlPropertyGroup) { + const InnerNode* inner = static_cast<const InnerNode*>(node); + foreach (const Node* n, inner->childNodes()) { + if (n->access() == Node::Private) + continue; + childMap[tree->fullDocumentName(n)] = n; + } + } + else + childMap[static_cast<const FakeNode *>(node)->fullTitle()] = node; + } else { if (node->type() == Node::Function) { const FunctionNode *funcNode = static_cast<const FunctionNode *>(node); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index c1e3678..cd3da3e 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -405,7 +405,9 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) generateIndex(fileBase, projectUrl, projectDescription); generatePageIndex(outputDir() + "/" + fileBase + ".pageindex", marker); + //qDebug() << "start helpProjectWriter->generate(myTree)"; helpProjectWriter->generate(myTree); + //qDebug() << "end helpProjectWriter->generate(myTree)"; } void HtmlGenerator::startText(const Node * /* relative */, diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 0d27937..37d6b31 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -415,7 +415,7 @@ void InnerNode::normalizeOverloads() /*! */ -void InnerNode::removeFromRelated() +void InnerNode::removeFromRelated() { while (!related.isEmpty()) { Node *p = static_cast<Node *>(related.takeFirst()); @@ -456,7 +456,7 @@ const Node *InnerNode::findNode(const QString& name, Type type) const } /*! - Find the function node in this node that has the given \a name. + Find the function node in this node that has the given \a name. */ const FunctionNode *InnerNode::findFunctionNode(const QString& name) const { @@ -973,7 +973,7 @@ Parameter::Parameter(const Parameter& p) /*! Assigning Parameter \a p to this Parameter copies the - strings across. + strings across. */ Parameter& Parameter::operator=(const Parameter& p) { @@ -1297,9 +1297,9 @@ QmlClassNode::QmlClassNode(InnerNode *parent, */ QmlClassNode::~QmlClassNode() { -#ifdef DEBUG_MULTIPLE +#ifdef DEBUG_MULTIPLE_QDOCCONF_FILES qDebug() << "Deleting QmlClassNode:" << name(); -#endif +#endif } /*! @@ -1319,7 +1319,7 @@ void QmlClassNode::clear() */ QString QmlClassNode::fileBase() const { -#if 0 +#if 0 if (Node::fileBase() == "item") qDebug() << "FILEBASE: qmlitem" << name(); return "qml_" + Node::fileBase(); @@ -1334,9 +1334,9 @@ QString QmlClassNode::fileBase() const void QmlClassNode::addInheritedBy(const QString& base, Node* sub) { inheritedBy.insert(base,sub); -#ifdef DEBUG_MULTIPLE +#ifdef DEBUG_MULTIPLE-QDOCCONF_FILES qDebug() << "QmlClassNode::addInheritedBy(): insert" << base << sub->name() << inheritedBy.size(); -#endif +#endif } /*! @@ -1347,10 +1347,10 @@ void QmlClassNode::subclasses(const QString& base, NodeList& subs) subs.clear(); if (inheritedBy.count(base) > 0) { subs = inheritedBy.values(base); -#ifdef DEBUG_MULTIPLE +#ifdef DEBUG_MULTIPLE_QDOCCONF_FILES qDebug() << "QmlClassNode::subclasses():" << inheritedBy.count(base) << base << "subs:" << subs.size() << "total size:" << inheritedBy.size(); -#endif +#endif } } @@ -1368,7 +1368,7 @@ QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent, /*! Constructor for the Qml property group node. \a parent is - always a QmlClassNode. + always a QmlClassNode. */ QmlPropGroupNode::QmlPropGroupNode(QmlClassNode* parent, const QString& name, diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 1017813..215a7ae 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -163,6 +163,7 @@ class Node virtual bool isInnerNode() const = 0; virtual bool isReimp() const { return false; } virtual bool isFunction() const { return false; } + virtual bool isQmlNode() const { return false; } Type type() const { return typ; } virtual SubType subType() const { return NoSubType; } InnerNode *parent() const { return par; } @@ -380,6 +381,7 @@ class QmlClassNode : public FakeNode const QString& name, const ClassNode* cn); virtual ~QmlClassNode(); + virtual bool isQmlNode() const { return true; } const ClassNode* classNode() const { return cnode; } virtual QString fileBase() const; @@ -401,6 +403,7 @@ class QmlBasicTypeNode : public FakeNode QmlBasicTypeNode(InnerNode *parent, const QString& name); virtual ~QmlBasicTypeNode() { } + virtual bool isQmlNode() const { return true; } }; class QmlPropGroupNode : public FakeNode @@ -410,6 +413,7 @@ class QmlPropGroupNode : public FakeNode const QString& name, bool attached); virtual ~QmlPropGroupNode() { } + virtual bool isQmlNode() const { return true; } const QString& element() const { return parent()->name(); } void setDefault() { isdefault = true; } @@ -441,6 +445,7 @@ class QmlPropertyNode : public LeafNode bool isDesignable() const { return fromTrool(des,false); } bool isWritable() const { return fromTrool(wri,true); } bool isAttached() const { return att; } + virtual bool isQmlNode() const { return true; } const QString& element() const { return static_cast<QmlPropGroupNode*>(parent())->element(); } @@ -609,6 +614,9 @@ class FunctionNode : public LeafNode QString signature(bool values = false) const; const QString& element() const { return parent()->name(); } bool isAttached() const { return att; } + virtual bool isQmlNode() const { + return ((type() == QmlSignal) || (type() == QmlMethod)); + } void debug() const; diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 7dcc8c3..31bbf54 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -1121,6 +1121,15 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, case Node::Target: nodeName = "target"; break; + case Node::QmlProperty: + nodeName = "qmlproperty"; + break; + case Node::QmlSignal: + nodeName = "qmlsignal"; + break; + case Node::QmlMethod: + nodeName = "qmlmethod"; + break; default: return false; } @@ -1210,7 +1219,7 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, if (fullName != objName) writer.writeAttribute("fullname", fullName); writer.writeAttribute("href", fullDocumentLocation(node)); - if (node->type() != Node::Fake) + if ((node->type() != Node::Fake) && (!node->isQmlNode())) writer.writeAttribute("location", node->location().fileName()); switch (node->type()) { @@ -1265,6 +1274,12 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, case Node::ExternalPage: writer.writeAttribute("subtype", "externalpage"); break; + case Node::QmlClass: + writer.writeAttribute("subtype", "qmlclass"); + break; + case Node::QmlBasicType: + writer.writeAttribute("subtype", "qmlbasictype"); + break; default: break; } @@ -1337,6 +1352,12 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, } break; + case Node::QmlProperty: + { + const QmlPropertyNode *qpn = static_cast<const QmlPropertyNode*>(node); + writer.writeAttribute("type", qpn->dataType()); + } + break; case Node::Property: { const PropertyNode *propertyNode = static_cast<const PropertyNode*>(node); @@ -1524,9 +1545,22 @@ void Tree::generateIndexSections(QXmlStreamWriter &writer, if (node->isInnerNode()) { const InnerNode *inner = static_cast<const InnerNode *>(node); - // Recurse to write an element for this child node and all its children. - foreach (const Node *child, inner->childNodes()) - generateIndexSections(writer, child, generateInternalNodes); + foreach (const Node *child, inner->childNodes()) { + /* + Don't generate anything for a QML property group node. + It is just a place holder for a collection of QML property + nodes. Recurse to its children, which are the QML property + nodes. + */ + if (child->subType() == Node::QmlPropertyGroup) { + const InnerNode *pgn = static_cast<const InnerNode*>(child); + foreach (const Node *c, pgn->childNodes()) { + generateIndexSections(writer, c, generateInternalNodes); + } + } + else + generateIndexSections(writer, child, generateInternalNodes); + } /* foreach (const Node *child, inner->relatedNodes()) { @@ -1931,9 +1965,23 @@ QString Tree::fullDocumentLocation(const Node *node) const if ((parentNode = node->relates())) parentName = fullDocumentLocation(node->relates()); - else if ((parentNode = node->parent())) - parentName = fullDocumentLocation(node->parent()); - + else if ((parentNode = node->parent())) { + if (parentNode->subType() == Node::QmlPropertyGroup) { + parentNode = parentNode->parent(); + parentName = "qml-" + parentNode->fileBase() + ".html"; + } + else + parentName = fullDocumentLocation(node->parent()); + } +#if 0 + if (node->type() == Node::QmlProperty) { + qDebug() << "Node::QmlProperty:" << node->name() + << "parentName:" << parentName; + if (parentNode) + qDebug() << "PARENT NODE" << parentNode->type() + << parentNode->subType() << parentNode->name(); + } +#endif switch (node->type()) { case Node::Class: case Node::Namespace: @@ -1980,6 +2028,15 @@ QString Tree::fullDocumentLocation(const Node *node) const case Node::Property: anchorRef = "#" + node->name() + "-prop"; break; + case Node::QmlProperty: + anchorRef = "#" + node->name() + "-prop"; + break; + case Node::QmlSignal: + anchorRef = "#" + node->name() + "-signal"; + break; + case Node::QmlMethod: + anchorRef = "#" + node->name() + "-method"; + break; case Node::Variable: anchorRef = "#" + node->name() + "-var"; break; @@ -2019,6 +2076,8 @@ QString Tree::fullDocumentLocation(const Node *node) const } /*! + Construct the full document name for \a node and return the + name. */ QString Tree::fullDocumentName(const Node *node) const { @@ -2029,10 +2088,11 @@ QString Tree::fullDocumentName(const Node *node) const const Node *n = node; do { - if (!n->name().isEmpty()) + if (!n->name().isEmpty() && + ((n->type() != Node::Fake) || (n->subType() != Node::QmlPropertyGroup))) pieces.insert(0, n->name()); - if (n->type() == Node::Fake) + if ((n->type() == Node::Fake) && (n->subType() != Node::QmlPropertyGroup)) break; // Examine the parent node if one exists. |