GUI: Fixed compiler warnings
This commit is contained in:
parent
57e9954390
commit
ca3c19c63d
|
@ -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 {
|
||||
|
|
|
@ -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) + "'";
|
||||
|
|
|
@ -25,19 +25,21 @@
|
|||
#include <QFileInfo>
|
||||
#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) :
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
#include <QTranslator>
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(A)
|
||||
#endif
|
||||
/// @addtogroup GUI
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
# include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(A)
|
||||
#endif
|
||||
#include <string>
|
||||
static const std::string emptyString;
|
||||
|
||||
|
|
Loading…
Reference in New Issue