Commit 0e8596d7 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen Committed by The Qt Project
Browse files

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: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarKarsten Heimrich <karsten.heimrich@digia.com>
parent f7f37e7f
Branches
Tags
No related merge requests found
Showing with 13 additions and 17 deletions
...@@ -56,10 +56,6 @@ ...@@ -56,10 +56,6 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace {
#define TR(x) QCoreApplication::translate("BookmarkManager", x)
}
BookmarkManagerWidget::BookmarkManagerWidget(BookmarkModel *sourceModel, BookmarkManagerWidget::BookmarkManagerWidget(BookmarkModel *sourceModel,
QWidget *parent) QWidget *parent)
: QWidget(parent) : QWidget(parent)
...@@ -196,8 +192,8 @@ void BookmarkManagerWidget::findPrevious() ...@@ -196,8 +192,8 @@ void BookmarkManagerWidget::findPrevious()
void BookmarkManagerWidget::importBookmarks() void BookmarkManagerWidget::importBookmarks()
{ {
TRACE_OBJ TRACE_OBJ
const QString &fileName = QFileDialog::getOpenFileName(0, TR("Open File"), const QString &fileName = QFileDialog::getOpenFileName(0, tr("Open File"),
QDir::currentPath(), TR("Files (*.xbel)")); QDir::currentPath(), tr("Files (*.xbel)"));
if (fileName.isEmpty()) if (fileName.isEmpty())
return; return;
...@@ -212,8 +208,8 @@ void BookmarkManagerWidget::importBookmarks() ...@@ -212,8 +208,8 @@ void BookmarkManagerWidget::importBookmarks()
void BookmarkManagerWidget::exportBookmarks() void BookmarkManagerWidget::exportBookmarks()
{ {
TRACE_OBJ TRACE_OBJ
QString fileName = QFileDialog::getSaveFileName(0, TR("Save File"), QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
QLatin1String("untitled.xbel"), TR("Files (*.xbel)")); QLatin1String("untitled.xbel"), tr("Files (*.xbel)"));
const QLatin1String suffix(".xbel"); const QLatin1String suffix(".xbel");
if (!fileName.endsWith(suffix)) if (!fileName.endsWith(suffix))
...@@ -224,8 +220,8 @@ void BookmarkManagerWidget::exportBookmarks() ...@@ -224,8 +220,8 @@ void BookmarkManagerWidget::exportBookmarks()
XbelWriter writer(bookmarkModel); XbelWriter writer(bookmarkModel);
writer.writeToFile(&file); writer.writeToFile(&file);
} else { } else {
QMessageBox::information(this, TR("Qt Assistant"), QMessageBox::information(this, tr("Qt Assistant"),
TR("Unable to save bookmarks."), TR("OK")); tr("Unable to save bookmarks."), tr("OK"));
} }
} }
...@@ -255,7 +251,7 @@ void BookmarkManagerWidget::removeItem(const QModelIndex &index) ...@@ -255,7 +251,7 @@ void BookmarkManagerWidget::removeItem(const QModelIndex &index)
return; // check if we should delete the "Bookmarks Menu", bail return; // check if we should delete the "Bookmarks Menu", bail
if (bookmarkModel->hasChildren(current)) { 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 " "to delete a Folder, this will also<br> remove it's content. Are "
"you sure to continue?"), "you sure to continue?"),
QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel); QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
...@@ -283,14 +279,14 @@ void BookmarkManagerWidget::customContextMenuRequested(const QPoint &point) ...@@ -283,14 +279,14 @@ void BookmarkManagerWidget::customContextMenuRequested(const QPoint &point)
QMenu menu(QLatin1String("")); QMenu menu(QLatin1String(""));
if (bookmarkModel->data(index, UserRoleFolder).toBool()) { if (bookmarkModel->data(index, UserRoleFolder).toBool()) {
remove = menu.addAction(TR("Delete Folder")); remove = menu.addAction(tr("Delete Folder"));
rename = menu.addAction(TR("Rename Folder")); rename = menu.addAction(tr("Rename Folder"));
} else { } else {
showItem = menu.addAction(TR("Show Bookmark")); showItem = menu.addAction(tr("Show Bookmark"));
showItemInNewTab = menu.addAction(TR("Show Bookmark in New Tab")); showItemInNewTab = menu.addAction(tr("Show Bookmark in New Tab"));
menu.addSeparator(); menu.addSeparator();
remove = menu.addAction(TR("Delete Bookmark")); remove = menu.addAction(tr("Delete Bookmark"));
rename = menu.addAction(TR("Rename Bookmark")); rename = menu.addAction(tr("Rename Bookmark"));
} }
QAction *pickedAction = menu.exec(ui.treeView->mapToGlobal(point)); QAction *pickedAction = menu.exec(ui.treeView->mapToGlobal(point));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment