summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2023-06-09 14:04:38 +0000
committerTopi Reinio <topi.reinio@qt.io>2023-06-09 18:24:15 +0000
commit17ddf2a6a52bab5d406bea560591961a7527929b (patch)
tree6dba2586d43e2f83226bb3bfdb486ff38ee05125 /examples/widgets
parentfbc491230fe62f739925e8113d05f4108e2738ef (diff)
Doc: Fix documentation issues
The Qt Widgets Application example was moved to manual tests, and no longer contains the snippet identifiers. Fix \snippet and \quotefile commands to quote similar code snippets from other examples or snippet files. Fix also the following documentation warnings: * No such parameter 'parsingMode' in QUrl::fromEncoded() * Missing image: rsslisting.cpp Pick-to: 6.6 6.5 Change-Id: Ibc989e83abc49837db08628facaf8e5f72b2f123 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/mainwindows/mdi/mainwindow.cpp2
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp2
2 files changed, 4 insertions, 0 deletions
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()
{