Commit 3332d423 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Qmt: Fix lupdate errors

* Exception subclasses don't declare tr
* lupdate is confused by class keyword in template

Change-Id: Ic89caea3bd918a1ae5dc010238503d239e293098
Reviewed-by: default avatarJochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent e440e344
......@@ -33,7 +33,7 @@ Exception::Exception(const QString &errorMessage)
}
NullPointerException::NullPointerException()
: Exception(tr("Unacceptable null object."))
: Exception(Exception::tr("Unacceptable null object."))
{
}
......
......@@ -34,7 +34,7 @@ namespace qmt {
class QMT_EXPORT Exception
{
Q_DECLARE_TR_FUNCTIONS(Exception)
Q_DECLARE_TR_FUNCTIONS(qmt::Exception)
public:
explicit Exception(const QString &errorMessage);
......
......@@ -41,32 +41,33 @@ FileIOException::FileIOException(const QString &errorMsg, const QString &fileNam
}
FileNotFoundException::FileNotFoundException(const QString &fileName)
: FileIOException(tr("File not found."), fileName)
: FileIOException(Exception::tr("File not found."), fileName)
{
}
FileCreationException::FileCreationException(const QString &fileName)
: FileIOException(tr("Unable to create file."), fileName)
: FileIOException(Exception::tr("Unable to create file."), fileName)
{
}
FileWriteError::FileWriteError(const QString &fileName, int lineNumber)
: FileIOException(tr("Writing to file failed."), fileName, lineNumber)
: FileIOException(Exception::tr("Writing to file failed."), fileName, lineNumber)
{
}
FileReadError::FileReadError(const QString &fileName, int lineNumber)
: FileIOException(tr("Reading from file failed."), fileName, lineNumber)
: FileIOException(Exception::tr("Reading from file failed."), fileName, lineNumber)
{
}
IllegalXmlFile::IllegalXmlFile(const QString &fileName, int lineNumber)
: FileIOException(tr("Illegal XML file."), fileName, lineNumber)
: FileIOException(Exception::tr("Illegal XML file."), fileName, lineNumber)
{
}
UnknownFileVersion::UnknownFileVersion(int version, const QString &fileName, int lineNumber)
: FileIOException(tr("Unable to handle file version %1.").arg(version), fileName, lineNumber)
: FileIOException(Exception::tr("Unable to handle file version %1.")
.arg(version), fileName, lineNumber)
{
}
......
......@@ -1353,7 +1353,7 @@ void PropertiesView::MView::insertRow(const char *before_id, QWidget *widget, co
addRow(widget, id);
}
template<class T, class V>
template<typename T, typename V>
void PropertiesView::MView::setTitle(const QList<V *> &elements,
const QString &singularTitle, const QString &pluralTitle)
{
......@@ -1368,7 +1368,7 @@ void PropertiesView::MView::setTitle(const QList<V *> &elements,
}
}
template<class T, class V>
template<typename T, typename V>
void PropertiesView::MView::setTitle(const MItem *item, const QList<V *> &elements,
const QString &singularTitle, const QString &pluralTitle)
{
......
......@@ -135,10 +135,10 @@ protected:
void insertRow(const char *before_id, const QString &label, QLayout *layout, const char *id);
void insertRow(const char *before_id, const QString &label, QWidget *widget, const char *id);
void insertRow(const char *before_id, QWidget *widget, const char *id);
template<class T, class V>
template<typename T, typename V>
void setTitle(const QList<V *> &elements, const QString &singularTitle,
const QString &pluralTitle);
template<class T, class V>
template<typename T, typename V>
void setTitle(const MItem *item, const QList<V *> &elements,
const QString &singularTitle, const QString &pluralTitle);
void setStereotypeIconElement(StereotypeIcon::Element stereotypeElement);
......
Markdown is supported
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