`tr` evaluates at the early start even before `QCoreApplication` is instantiated and appropriate translators are set
related with commit a92fc9b
This commit is contained in:
a1ext 2018-11-21 09:42:37 +03:00 committed by xarkes
parent 350375afce
commit 3fb67c9eac
5 changed files with 4 additions and 7 deletions

View File

@ -1,7 +1,6 @@
#include "MainWindow.h"
#include "CutterSeekableWidget.h"
const QString CutterSeekableWidget::UNSYNCED_TEXT = tr(" (unsynced)");
CutterSeekableWidget::CutterSeekableWidget(QObject *parent)
:

View File

@ -20,8 +20,6 @@ public:
void setIndependentOffset(RVA addr);
void onSeekChanged(RVA addr);
static const QString UNSYNCED_TEXT;
private:
RVA independentOffset = RVA_INVALID;
RVA prevIdenpendentOffset = RVA_INVALID;

View File

@ -144,7 +144,7 @@ void DisassemblerGraphView::toggleSync()
if (seekable->getSyncWithCore()) {
parentWidget()->setWindowTitle(windowTitle);
} else {
parentWidget()->setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
parentWidget()->setWindowTitle(windowTitle + CutterSeekableWidget::tr(" (unsynced)"));
seekable->setIndependentOffset(Core()->getOffset());
}
}
@ -210,7 +210,7 @@ void DisassemblerGraphView::loadCurrentGraph()
windowTitle += " (" + funcName + ")";
}
if (!seekable->getSyncWithCore()) {
parentWidget()->setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
parentWidget()->setWindowTitle(windowTitle + CutterSeekableWidget::tr(" (unsynced)"));
} else {
parentWidget()->setWindowTitle(windowTitle);
}

View File

@ -184,7 +184,7 @@ void DisassemblyWidget::toggleSync()
if (seekable->getSyncWithCore()) {
setWindowTitle(windowTitle);
} else {
setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
setWindowTitle(windowTitle + CutterSeekableWidget::tr(" (unsynced)"));
seekable->setIndependentOffset(Core()->getOffset());
}
}

View File

@ -643,7 +643,7 @@ void HexdumpWidget::toggleSync()
if (seekable->getSyncWithCore()) {
setWindowTitle(windowTitle);
} else {
setWindowTitle(windowTitle + CutterSeekableWidget::UNSYNCED_TEXT);
setWindowTitle(windowTitle + CutterSeekableWidget::tr(" (unsynced)"));
seekable->setIndependentOffset(Core()->getOffset());
}
}