Workaround lupdate issue

This commit is contained in:
Martchus 2019-07-07 12:00:16 +02:00
parent 72d31c568e
commit ce0c0c9e19
11 changed files with 28 additions and 27 deletions

View File

@ -12,11 +12,6 @@ using namespace QtUtilities;
namespace Settings { namespace Settings {
/*
TRANSLATOR Settings::KnownFieldModel
Necessary for lupdate.
*/
const char *KnownFieldModel::fieldName(KnownField field) const char *KnownFieldModel::fieldName(KnownField field)
{ {
switch (field) { switch (field) {

View File

@ -10,9 +10,11 @@
#define Q_OBJECT #define Q_OBJECT
#endif #endif
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
enum class KnownField : unsigned int; TAGEDITOR_ENUM_CLASS KnownField : unsigned int;
} }
#undef TAGEDITOR_ENUM_CLASS
namespace Settings { namespace Settings {

View File

@ -7,11 +7,6 @@ using namespace TagParser;
namespace Settings { namespace Settings {
/*
TRANSLATOR Settings::TargetLevelModel
Necessary for lupdate.
*/
const char *TargetLevelModel::fieldName(TagTargetLevel targetLevel) const char *TargetLevelModel::fieldName(TagTargetLevel targetLevel)
{ {
switch (targetLevel) { switch (targetLevel) {

View File

@ -6,9 +6,11 @@
#include <QAbstractListModel> #include <QAbstractListModel>
#include <QList> #include <QList>
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
enum class TagTargetLevel : unsigned char; TAGEDITOR_ENUM_CLASS TagTargetLevel : unsigned char;
} }
#undef TAGEDITOR_ENUM_CLASS
namespace Settings { namespace Settings {

View File

@ -12,10 +12,12 @@
QT_FORWARD_DECLARE_CLASS(QNetworkReply) QT_FORWARD_DECLARE_CLASS(QNetworkReply)
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
class TagValue; class TagValue;
enum class KnownField : unsigned int; TAGEDITOR_ENUM_CLASS KnownField : unsigned int;
} // namespace TagParser } // namespace TagParser
#undef TAGEDITOR_ENUM_CLASS
namespace QtGui { namespace QtGui {

View File

@ -13,9 +13,11 @@
QT_FORWARD_DECLARE_CLASS(QFileSystemModel) QT_FORWARD_DECLARE_CLASS(QFileSystemModel)
QT_FORWARD_DECLARE_CLASS(QItemSelectionModel) QT_FORWARD_DECLARE_CLASS(QItemSelectionModel)
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
enum class TagType : unsigned int; TAGEDITOR_ENUM_CLASS TagType : unsigned int;
} } // namespace TagParser
#undef TAGEDITOR_ENUM_CLASS
namespace QtUtilities { namespace QtUtilities {
class AboutDialog; class AboutDialog;

View File

@ -16,15 +16,17 @@ QT_FORWARD_DECLARE_CLASS(QGraphicsTextItem)
QT_FORWARD_DECLARE_CLASS(QGraphicsPixmapItem) QT_FORWARD_DECLARE_CLASS(QGraphicsPixmapItem)
QT_FORWARD_DECLARE_CLASS(QGraphicsRectItem) QT_FORWARD_DECLARE_CLASS(QGraphicsRectItem)
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
class Tag; class Tag;
class TagValue; class TagValue;
enum class KnownField : unsigned int; TAGEDITOR_ENUM_CLASS KnownField : unsigned int;
} // namespace TagParser } // namespace TagParser
namespace QtGui { namespace QtGui {
enum class PreviousValueHandling : int; TAGEDITOR_ENUM_CLASS PreviousValueHandling : int;
#undef TAGEDITOR_ENUM_CLASS
namespace Ui { namespace Ui {
class PicturePreviewSelection; class PicturePreviewSelection;

View File

@ -633,11 +633,6 @@ QWidget *FileLayoutPage::setupWidget()
return widget; return widget;
} }
/*
TRANSLATOR QtGui::SettingsDialog
Necessary for lupdate.
*/
SettingsDialog::SettingsDialog(QWidget *parent) SettingsDialog::SettingsDialog(QWidget *parent)
: QtUtilities::SettingsDialog(parent) : QtUtilities::SettingsDialog(parent)
{ {

View File

@ -14,11 +14,13 @@
QT_FORWARD_DECLARE_CLASS(QFormLayout) QT_FORWARD_DECLARE_CLASS(QFormLayout)
QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
class Tag; class Tag;
class TagValue; class TagValue;
enum class KnownField : unsigned int; TAGEDITOR_ENUM_CLASS KnownField : unsigned int;
} // namespace TagParser } // namespace TagParser
#undef TAGEDITOR_ENUM_CLASS
namespace QtGui { namespace QtGui {

View File

@ -19,9 +19,11 @@ QT_FORWARD_DECLARE_CLASS(QTreeView)
QT_FORWARD_DECLARE_CLASS(QFile) QT_FORWARD_DECLARE_CLASS(QFile)
QT_FORWARD_DECLARE_CLASS(QTemporaryFile) QT_FORWARD_DECLARE_CLASS(QTemporaryFile)
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
enum class TagType : unsigned int; TAGEDITOR_ENUM_CLASS TagType : unsigned int;
} }
#undef TAGEDITOR_ENUM_CLASS
namespace QtGui { namespace QtGui {

View File

@ -11,13 +11,15 @@
QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
QT_FORWARD_DECLARE_CLASS(QLabel) QT_FORWARD_DECLARE_CLASS(QLabel)
#define TAGEDITOR_ENUM_CLASS enum class
namespace TagParser { namespace TagParser {
class TagValue; class TagValue;
class Tag; class Tag;
enum class KnownField : unsigned int; TAGEDITOR_ENUM_CLASS KnownField : unsigned int;
enum class TagDataType : unsigned int; TAGEDITOR_ENUM_CLASS TagDataType : unsigned int;
enum class TagTextEncoding : unsigned int; TAGEDITOR_ENUM_CLASS TagTextEncoding : unsigned int;
} // namespace TagParser } // namespace TagParser
#undef TAGEDITOR_ENUM_CLASS
namespace QtUtilities { namespace QtUtilities {
class ButtonOverlay; class ButtonOverlay;