GUI: Fixed compiler warnings
This commit is contained in:
parent
57e9954390
commit
ca3c19c63d
|
@ -159,7 +159,7 @@ win32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
contains(QMAKE_CC, gcc) {
|
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 {
|
macx {
|
||||||
|
|
|
@ -613,6 +613,12 @@ bool MainWindow::TryLoadLibrary(Library *library, QString filename)
|
||||||
case Library::ErrorCode::PLATFORM_TYPE_REDEFINED:
|
case Library::ErrorCode::PLATFORM_TYPE_REDEFINED:
|
||||||
errmsg = tr("Platform type redefined");
|
errmsg = tr("Platform type redefined");
|
||||||
break;
|
break;
|
||||||
|
case Library::ErrorCode::UNKNOWN_ELEMENT:
|
||||||
|
errmsg = tr("Unknown element");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
errmsg = tr("Unknown issue");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!error.reason.empty())
|
if (!error.reason.empty())
|
||||||
errmsg += " '" + QString::fromStdString(error.reason) + "'";
|
errmsg += " '" + QString::fromStdString(error.reason) + "'";
|
||||||
|
|
|
@ -25,19 +25,21 @@
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include "translationhandler.h"
|
#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"
|
// 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()
|
static void unused()
|
||||||
{
|
{
|
||||||
// Qt4
|
// Qt4
|
||||||
QT_TRANSLATE_NOOP("QDialogButtonBox", "OK");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "OK"));
|
||||||
QT_TRANSLATE_NOOP("QDialogButtonBox", "Cancel");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "Cancel"));
|
||||||
QT_TRANSLATE_NOOP("QDialogButtonBox", "Close");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "Close"));
|
||||||
QT_TRANSLATE_NOOP("QDialogButtonBox", "Save");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QDialogButtonBox", "Save"));
|
||||||
// Qt5
|
// Qt5
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "OK");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "OK"));
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel"));
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Close");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "Close"));
|
||||||
QT_TRANSLATE_NOOP("QPlatformTheme", "Save");
|
Q_UNUSED(QT_TRANSLATE_NOOP("QPlatformTheme", "Save"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TranslationHandler::TranslationHandler(QObject *parent) :
|
TranslationHandler::TranslationHandler(QObject *parent) :
|
||||||
|
|
|
@ -23,7 +23,9 @@
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#ifndef __GNUC__
|
||||||
|
#define __attribute__(A)
|
||||||
|
#endif
|
||||||
/// @addtogroup GUI
|
/// @addtogroup GUI
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
# include <crtdbg.h>
|
# include <crtdbg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
|
#define __attribute__(A)
|
||||||
|
#endif
|
||||||
#include <string>
|
#include <string>
|
||||||
static const std::string emptyString;
|
static const std::string emptyString;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue