From cfb5acc8d5d2b020ac140774da84f3d6d0722e68 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 21 Jun 2020 07:59:54 +0200 Subject: [PATCH] fix tr() cannot be called without context add QObject:: qetdiagrameditor.cpp:2341: tr() cannot be called without context qetdiagrameditor.cpp:2372: tr() cannot be called without context diagramfoliolist.cpp:175: Class 'DiagramFolioList' lacks Q_OBJECT macro --- sources/diagramfoliolist.cpp | 2 +- sources/qetdiagrameditor.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/diagramfoliolist.cpp b/sources/diagramfoliolist.cpp index 1423c9713..4120fc240 100644 --- a/sources/diagramfoliolist.cpp +++ b/sources/diagramfoliolist.cpp @@ -172,7 +172,7 @@ void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, const QStri else workingFont.setPointSizeF(origFontSize); qp -> setFont(workingFont); - QString heading = tr("Titre"); + QString heading = QObject::tr("Titre"); if (title == heading) qp -> drawText(QRectF(x, y, colWidths[1]*row_rect.width(),row_rect.height()), Qt::AlignCenter, title); else diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index e679e23f0..e06ca8abd 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -2338,7 +2338,7 @@ void QETDiagramEditor::generateTerminalBlock() } #elif defined(Q_OS_MAC) QMessageBox::warning(nullptr, - tr("Error launching qet_tb_generator plugin"), + QObject::tr("Error launching qet_tb_generator plugin"), QObject::tr("To install the plugin qet_tb_generator" "
" "Visit :" @@ -2369,7 +2369,7 @@ void QETDiagramEditor::generateTerminalBlock() #else QMessageBox::warning(nullptr, - tr("Error launching qet_tb_generator plugin"), + QObject::tr("Error launching qet_tb_generator plugin"), QObject::tr("To install the plugin qet_tb_generator" "
" "Visit : "