summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-11-28 12:20:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-03 12:19:58 +0100
commit0e8596d7271fc0bfbcd33a26cf0f187157c3997a (patch)
tree7c24f94be54d9ce4760bd55c29f39ca75e0168ab
parentf7f37e7fa2d98f777cc7b6035bb6ff924c75e1fa (diff)
disabuse translation system
the apparently attempted context renaming cannot work this way - while the code would see the renamed context, lupdate would be oblivious of that, and consequently the translations would not fit. additionally, lupdate won't recognize the TR() alias at all any more. Change-Id: I47baeb55a85a59b3c261153ed0c1e17726ffd284 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
-rw-r--r--src/assistant/assistant/bookmarkmanagerwidget.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/assistant/assistant/bookmarkmanagerwidget.cpp b/src/assistant/assistant/bookmarkmanagerwidget.cpp
index c489e9306..93d6dc19b 100644
--- a/src/assistant/assistant/bookmarkmanagerwidget.cpp
+++ b/src/assistant/assistant/bookmarkmanagerwidget.cpp
@@ -56,10 +56,6 @@
QT_BEGIN_NAMESPACE
-namespace {
- #define TR(x) QCoreApplication::translate("BookmarkManager", x)
-}
-
BookmarkManagerWidget::BookmarkManagerWidget(BookmarkModel *sourceModel,
QWidget *parent)
: QWidget(parent)
@@ -196,8 +192,8 @@ void BookmarkManagerWidget::findPrevious()
void BookmarkManagerWidget::importBookmarks()
{
TRACE_OBJ
- const QString &fileName = QFileDialog::getOpenFileName(0, TR("Open File"),
- QDir::currentPath(), TR("Files (*.xbel)"));
+ const QString &fileName = QFileDialog::getOpenFileName(0, tr("Open File"),
+ QDir::currentPath(), tr("Files (*.xbel)"));
if (fileName.isEmpty())
return;
@@ -212,8 +208,8 @@ void BookmarkManagerWidget::importBookmarks()
void BookmarkManagerWidget::exportBookmarks()
{
TRACE_OBJ
- QString fileName = QFileDialog::getSaveFileName(0, TR("Save File"),
- QLatin1String("untitled.xbel"), TR("Files (*.xbel)"));
+ QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
+ QLatin1String("untitled.xbel"), tr("Files (*.xbel)"));
const QLatin1String suffix(".xbel");
if (!fileName.endsWith(suffix))
@@ -224,8 +220,8 @@ void BookmarkManagerWidget::exportBookmarks()
XbelWriter writer(bookmarkModel);
writer.writeToFile(&file);
} else {
- QMessageBox::information(this, TR("Qt Assistant"),
- TR("Unable to save bookmarks."), TR("OK"));
+ QMessageBox::information(this, tr("Qt Assistant"),
+ tr("Unable to save bookmarks."), tr("OK"));
}
}
@@ -255,7 +251,7 @@ void BookmarkManagerWidget::removeItem(const QModelIndex &index)
return; // check if we should delete the "Bookmarks Menu", bail
if (bookmarkModel->hasChildren(current)) {
- int value = QMessageBox::question(this, TR("Remove"), TR("You are going"
+ int value = QMessageBox::question(this, tr("Remove"), tr("You are going"
"to delete a Folder, this will also<br> remove it's content. Are "
"you sure to continue?"),
QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
@@ -283,14 +279,14 @@ void BookmarkManagerWidget::customContextMenuRequested(const QPoint &point)
QMenu menu(QLatin1String(""));
if (bookmarkModel->data(index, UserRoleFolder).toBool()) {
- remove = menu.addAction(TR("Delete Folder"));
- rename = menu.addAction(TR("Rename Folder"));
+ remove = menu.addAction(tr("Delete Folder"));
+ rename = menu.addAction(tr("Rename Folder"));
} else {
- showItem = menu.addAction(TR("Show Bookmark"));
- showItemInNewTab = menu.addAction(TR("Show Bookmark in New Tab"));
+ showItem = menu.addAction(tr("Show Bookmark"));
+ showItemInNewTab = menu.addAction(tr("Show Bookmark in New Tab"));
menu.addSeparator();
- remove = menu.addAction(TR("Delete Bookmark"));
- rename = menu.addAction(TR("Rename Bookmark"));
+ remove = menu.addAction(tr("Delete Bookmark"));
+ rename = menu.addAction(tr("Rename Bookmark"));
}
QAction *pickedAction = menu.exec(ui.treeView->mapToGlobal(point));