diff --git a/examples/corelib/serialization/rsslisting/doc/src/rsslisting.qdoc b/examples/corelib/serialization/rsslisting/doc/src/rsslisting.qdoc index b86fab1e1b..260d26811c 100644 --- a/examples/corelib/serialization/rsslisting/doc/src/rsslisting.qdoc +++ b/examples/corelib/serialization/rsslisting/doc/src/rsslisting.qdoc @@ -24,7 +24,7 @@ the parsed content may start in one chunk of data but not be completed until a later chunk, requiring the parser to retain state between calls. - \image rsslisting.cpp + \image rsslisting.png The main program is fairly minimal. It simply instantiates a \l QApplication and the \c RSSListing widget, shows the latter and hands over control to the diff --git a/examples/widgets/mainwindows/mdi/mainwindow.cpp b/examples/widgets/mainwindows/mdi/mainwindow.cpp index 250ee786fb..89998f3160 100644 --- a/examples/widgets/mainwindows/mdi/mainwindow.cpp +++ b/examples/widgets/mainwindows/mdi/mainwindow.cpp @@ -279,6 +279,7 @@ void MainWindow::createActions() fileMenu->addAction(newAct); fileToolBar->addAction(newAct); +//! [qaction setup] const QIcon openIcon = QIcon::fromTheme("document-open", QIcon(":/images/open.png")); QAction *openAct = new QAction(openIcon, tr("&Open..."), this); openAct->setShortcuts(QKeySequence::Open); @@ -286,6 +287,7 @@ void MainWindow::createActions() connect(openAct, &QAction::triggered, this, &MainWindow::open); fileMenu->addAction(openAct); fileToolBar->addAction(openAct); +//! [qaction setup] const QIcon saveIcon = QIcon::fromTheme("document-save", QIcon(":/images/save.png")); saveAct = new QAction(saveIcon, tr("&Save"), this); diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index fd2d4a8a16..51a8f54bd5 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -116,6 +116,7 @@ TextEdit::TextEdit(QWidget *parent) #endif } +//! [closeevent] void TextEdit::closeEvent(QCloseEvent *e) { if (maybeSave()) @@ -123,6 +124,7 @@ void TextEdit::closeEvent(QCloseEvent *e) else e->ignore(); } +//! [closeevent] void TextEdit::setupFileActions() { diff --git a/src/corelib/doc/snippets/resource-system/application.pro b/src/corelib/doc/snippets/resource-system/application.pro index 4b1f1d7635..42c66eba4c 100644 --- a/src/corelib/doc/snippets/resource-system/application.pro +++ b/src/corelib/doc/snippets/resource-system/application.pro @@ -2,9 +2,9 @@ TEMPLATE = app QT += qml widgets -#! [0] +#! [0] #! [qrc] RESOURCES = application.qrc -#! [0] +#! [0] #! [qrc] #! [1] resources.files = \ diff --git a/src/corelib/doc/src/resource-system.qdoc b/src/corelib/doc/src/resource-system.qdoc index 16f76902d4..0ee706ede7 100644 --- a/src/corelib/doc/src/resource-system.qdoc +++ b/src/corelib/doc/src/resource-system.qdoc @@ -52,7 +52,7 @@ Here's an example \c .qrc file: - \quotefile resource-system/mainwindow.qrc + \quotefile resource-system/application.qrc Each \c element in the XML identifies a file in the application's source tree. The path is resolved relative to the directory containing @@ -102,7 +102,7 @@ variable. If you add a \c .qrc file path to the variable, the listed resource files will be embedded into the generated library or executable: - \snippet resource-system/mainwindow.pro qrc + \snippet resource-system/application.pro qrc This creates a resource of several \c{.png} files, that are addressable like this: \c{":/res/titlebarLeft.png"}. diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index b6f4d00c15..db2afb432a 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -2973,7 +2973,7 @@ QByteArray QUrl::toEncoded(FormattingOptions options) const Parses \a input and returns the corresponding QUrl. \a input is assumed to be in encoded form, containing only ASCII characters. - Parses the URL using \a parsingMode. See setUrl() for more information on + Parses the URL using \a mode. See setUrl() for more information on this parameter. QUrl::DecodedMode is not permitted in this context. \sa toEncoded(), setUrl() diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index 0f389789a1..dccdb1ac3e 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -173,7 +173,7 @@ QObject *QActionPrivate::menu() const menu and toolbar, then connected to the slot which will perform the action. For example: - \snippet ../widgets/mainwindows/application/mainwindow.cpp 19 + \snippet ../widgets/mainwindows/mdi/mainwindow.cpp qaction setup Actions are added to widgets using QWidget::addAction() or QGraphicsWidget::addAction(). Note that an action must be added to a diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 1b8e9890b5..6ef8b76672 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -9888,13 +9888,12 @@ void QWidget::actionEvent(QActionEvent *) Main window applications typically use reimplementations of this function to check whether the user's work has been saved and ask for permission before closing. - For example, the \l{Qt Widgets - Application Example} uses a helper function to + For example, the \l{Text Edit} example uses a helper function to determine whether or not to close the window: - \snippet mainwindows/application/mainwindow.cpp 3 - \snippet mainwindows/application/mainwindow.cpp 4 + \snippet richtext/textedit/textedit.cpp closeevent - \sa event(), hide(), close(), QCloseEvent, {Qt Widgets - Application Example} + \sa event(), hide(), close(), QCloseEvent */ void QWidget::closeEvent(QCloseEvent *event)