Doc: move snippet for implicit translation context
The 'sdi' example is a candidate for removal, so point at the spreadsheet example instead, which is not. Pick-to: 6.5 Change-Id: I4405f2421db8be79898a38ca4f3fa1ea5fe0280b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
e27766c5e2
commit
721b4a4b5a
@ -106,9 +106,11 @@ void SpreadSheet::createActions()
|
||||
secondSeparator->setSeparator(true);
|
||||
}
|
||||
|
||||
//! [implicit tr context]
|
||||
void SpreadSheet::setupMenuBar()
|
||||
{
|
||||
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
|
||||
//! [implicit tr context]
|
||||
fileMenu->addAction(printAction);
|
||||
fileMenu->addAction(exitAction);
|
||||
|
||||
|
@ -124,11 +124,9 @@ void MainWindow::tile(const QMainWindow *previous)
|
||||
move(pos);
|
||||
}
|
||||
|
||||
//! [implicit tr context]
|
||||
void MainWindow::createActions()
|
||||
{
|
||||
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
|
||||
//! [implicit tr context]
|
||||
QToolBar *fileToolBar = addToolBar(tr("File"));
|
||||
|
||||
const QIcon newIcon = QIcon::fromTheme("document-new", QIcon(":/images/new.png"));
|
||||
|
@ -2382,7 +2382,7 @@ void QObject::deleteLater()
|
||||
translated string is available.
|
||||
|
||||
Example:
|
||||
\snippet ../widgets/mainwindows/sdi/mainwindow.cpp implicit tr context
|
||||
\snippet ../widgets/itemviews/spreadsheet/spreadsheet.cpp implicit tr context
|
||||
\dots
|
||||
|
||||
If the same \a sourceText is used in different roles within the
|
||||
|
Loading…
Reference in New Issue
Block a user