diff --git a/gui/gui.pro b/gui/gui.pro index 5661d5ac5..9d71636b4 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -159,7 +159,7 @@ win32 { } contains(QMAKE_CC, gcc) { - QMAKE_CXXFLAGS += -std=c++0x + QMAKE_CXXFLAGS += -std=c++0x -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare } macx { diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 6838921b9..dd7a6f42b 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -613,6 +613,12 @@ bool MainWindow::TryLoadLibrary(Library *library, QString filename) case Library::ErrorCode::PLATFORM_TYPE_REDEFINED: errmsg = tr("Platform type redefined"); break; + case Library::ErrorCode::UNKNOWN_ELEMENT: + errmsg = tr("Unknown element"); + break; + default: + errmsg = tr("Unknown issue"); + break; } if (!error.reason.empty()) errmsg += " '" + QString::fromStdString(error.reason) + "'"; diff --git a/gui/translationhandler.cpp b/gui/translationhandler.cpp index b7c4bd539..24ee5ec10 100644 --- a/gui/translationhandler.cpp +++ b/gui/translationhandler.cpp @@ -25,19 +25,21 @@ #include #include "translationhandler.h" + +static void unused() __attribute__ ((unused)); // Provide own translations for standard buttons. This (garbage) code is needed to enforce them to appear in .ts files even after "lupdate gui.pro" static void unused() { // Qt4 - QT_TRANSLATE_NOOP("QDialogButtonBox", "OK"); - QT_TRANSLATE_NOOP("QDialogButtonBox", "Cancel"); - QT_TRANSLATE_NOOP("QDialogButtonBox", "Close"); - QT_TRANSLATE_NOOP("QDialogButtonBox", "Save"); + Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "OK")); + Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "Cancel")); + Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "Close")); + Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "Save")); // Qt5 - QT_TRANSLATE_NOOP("QPlatformTheme", "OK"); - QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel"); - QT_TRANSLATE_NOOP("QPlatformTheme", "Close"); - QT_TRANSLATE_NOOP("QPlatformTheme", "Save"); + Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "OK")); + Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel")); + Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "Close")); + Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "Save")); } TranslationHandler::TranslationHandler(QObject *parent) : diff --git a/gui/translationhandler.h b/gui/translationhandler.h index b2f41e3c0..367ec9882 100644 --- a/gui/translationhandler.h +++ b/gui/translationhandler.h @@ -23,7 +23,9 @@ #include #include #include - +#ifndef __GNUC__ +#define __attribute__(A) +#endif /// @addtogroup GUI /// @{ diff --git a/lib/config.h b/lib/config.h index c30782c9e..05d5dab75 100644 --- a/lib/config.h +++ b/lib/config.h @@ -19,6 +19,9 @@ # include #endif +#ifndef __GNUC__ +#define __attribute__(A) +#endif #include static const std::string emptyString;