1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Merged in m_thread/librepilot/thread/Qt-5.6_Support_Mac (pull request #209)

LP-208 Qt 5.6.0
This commit is contained in:
Philippe Renon 2016-03-30 23:56:46 +02:00
commit bbb93658be
12 changed files with 59 additions and 56 deletions

View File

@ -29,9 +29,9 @@ linux {
libQt5QuickParticles.so.5 \
libQt5XcbQpa.so.5 \
libQt5X11Extras.so.5 \
libicui18n.so.54 \
libicuuc.so.54 \
libicudata.so.54
libicui18n.so.56 \
libicuuc.so.56 \
libicudata.so.56
contains(QT_ARCH, x86_64) {
QT_LIBS += \
@ -47,7 +47,6 @@ linux {
imageformats/libqgif.so \
imageformats/libqico.so \
imageformats/libqjpeg.so \
imageformats/libqmng.so \
imageformats/libqsvg.so \
imageformats/libqtiff.so \
platforms/libqxcb.so \

View File

@ -236,7 +236,10 @@ win32 {
QMAKE_CXXFLAGS += -mno-ms-bitfields
}
# Stricter warnigs turned on for OS X.
# Explicit setting of C++11
CONFIG += c++11
# Stricter warnings turned on for OS X.
macx {
CONFIG += warn_on
!warn_off {

View File

@ -14,6 +14,9 @@ namespace Eigen {
namespace internal {
// Deprecated in C++11.
#define register
#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8
#endif

View File

@ -581,6 +581,7 @@ OSGViewport::OSGViewport(QQuickItem *parent) : QQuickFramebufferObject(parent),
{
qDebug() << "OSGViewport::OSGViewport";
// setClearBeforeRendering(false);
setMirrorVertically(true);
setAcceptHoverEvents(true);
setAcceptedMouseButtons(Qt::AllButtons);
}
@ -682,10 +683,6 @@ QSGNode *OSGViewport::updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNode
qDebug() << "OSGViewport::updatePaintNode - set transform";
node = QQuickFramebufferObject::updatePaintNode(node, nodeData);
QSGSimpleTextureNode *n = static_cast<QSGSimpleTextureNode *>(node);
if (n) {
// flip Y axis
n->setTextureCoordinatesTransform(QSGSimpleTextureNode::MirrorVertically);
}
return node;
}
return QQuickFramebufferObject::updatePaintNode(node, nodeData);

View File

@ -5,7 +5,11 @@ QMAKE_CXXFLAGS += -Wno-unused-parameter
#win32:CONFIG(debug, debug|release):DS = "d"
contains(QT_ARCH, x86_64) {
LIB_DIR_NAME = lib64
macx {
LIB_DIR_NAME = lib
} else {
LIB_DIR_NAME = lib64
}
} else {
LIB_DIR_NAME = lib
}

View File

@ -81,7 +81,7 @@ void FileNameValidatingLineEdit::setAllowDirectories(bool v)
#endif
static const char *notAllowedCharsSubDir = "?:&*\"|#%<> ";
static const char *notAllowedCharsNoSubDir = "?:&*\"|#%<> "SLASHES;
static const char *notAllowedCharsNoSubDir = "?:&*\"|#%<> " SLASHES;
static const char *notAllowedSubStrings[] = { ".." };

View File

@ -41,13 +41,13 @@ class ThermalCalibration {
static const int BARO_PRESSURE_POLY_DEGREE = 3;
// TODO: determine max allowable relative error
static const double BARO_PRESSURE_MAX_REL_ERROR = 1E-6f;
static const double ACCEL_X_MAX_REL_ERROR = 1E-6f;
static const double ACCEL_Y_MAX_REL_ERROR = 1E-6f;
static const double ACCEL_Z_MAX_REL_ERROR = 1E-6f;
static const double GYRO_X_MAX_REL_ERROR = 1E-6f;
static const double GYRO_Y_MAX_REL_ERROR = 1E-6f;
static const double GYRO_Z_MAX_REL_ERROR = 1E-6f;
constexpr static const double BARO_PRESSURE_MAX_REL_ERROR = 1E-6f;
constexpr static const double ACCEL_X_MAX_REL_ERROR = 1E-6f;
constexpr static const double ACCEL_Y_MAX_REL_ERROR = 1E-6f;
constexpr static const double ACCEL_Z_MAX_REL_ERROR = 1E-6f;
constexpr static const double GYRO_X_MAX_REL_ERROR = 1E-6f;
constexpr static const double GYRO_Y_MAX_REL_ERROR = 1E-6f;
constexpr static const double GYRO_Z_MAX_REL_ERROR = 1E-6f;
public:
/**

View File

@ -93,8 +93,8 @@ class ThermalCalibrationHelper : public QObject {
Q_OBJECT
public:
const static float TargetGradient = 0.20f;
const static float TargetTempDelta = 10.0f;
constexpr const static float TargetGradient = 0.20f;
constexpr const static float TargetTempDelta = 10.0f;
explicit ThermalCalibrationHelper(QObject *parent = 0);

View File

@ -63,7 +63,7 @@ private:
static const int AUTOMATIC_UPDATE_RATE = 500;
static const int EXPO_CURVE_POINTS_COUNT = 100;
static const double EXPO_CURVE_CONSTANT = 1.00695;
constexpr static const double EXPO_CURVE_CONSTANT = 1.00695;
int boardModel;
int m_stabSettingsBankCount;

View File

@ -83,8 +83,8 @@ void ImportSummaryDialog::addLine(QString uavObjectName, QString text, bool stat
ui->importSummaryList->setItem(row, 2, new QTableWidgetItem(text));
// Disable editability and selectability in table elements
ui->importSummaryList->item(row, 1)->setFlags(!Qt::ItemIsEditable);
ui->importSummaryList->item(row, 2)->setFlags(!Qt::ItemIsEditable);
ui->importSummaryList->item(row, 1)->setFlags(ui->importSummaryList->item(row, 1)->flags() &= ~Qt::ItemIsEditable);
ui->importSummaryList->item(row, 2)->setFlags(ui->importSummaryList->item(row, 2)->flags() &= ~Qt::ItemIsEditable);
if (status) {
box->setChecked(true);

View File

@ -1,10 +1,10 @@
/*
silent installer script
known not work with Qt 5.5.1 and QtIFW 2.0.2
known to work with Qt 5.6.0 and QtIFW 2.1.0
known issues:
- silent but not headless (QtIFW 2.0.3 should support installer.setSilent(true))
- silent but not headless (QtIFW 2.1.0 should support gui.setSilent(true))
- cannot disable forced components (QtCreator, ...)
- cannot disable virtual components (doc, examples, ...)
- cannot disable shortcuts creation
@ -14,11 +14,10 @@ function Controller()
{
console.log("*** Silent Installer ***");
console.log("Installing on " + installer.value("os"));
//installer.setSilent(true);
var qtInstallTargetDir = installer.environmentVariable("QT_INSTALL_TARGET_DIR");
if (qtInstallTargetDir == "") {
qtInstallTargetDir = installer.environmentVariable("PWD") + "/tools/qt-5.5.1";
qtInstallTargetDir = installer.environmentVariable("PWD") + "/tools/qt-5.6.0";
console.log("Environment variable QT_INSTALL_TARGET_DIR not set, using default " + qtInstallTargetDir);
}
installer.setValue("TargetDir", qtInstallTargetDir);
@ -97,18 +96,18 @@ Controller.prototype.ComponentSelectionPageCallback = function()
var page = gui.currentPageWidget();
page.deselectAll()
if (installer.value("os") == "win") {
selectComponent(page, "qt.55.win32_mingw492");
selectComponent(page, "qt.56.win32_mingw492");
selectComponent(page, "qt.tools.win32_mingw492");
}
else if (installer.value("os") == "x11") {
selectComponent(page, "qt.55.gcc");
selectComponent(page, "qt.55.gcc_64");
selectComponent(page, "qt.56.gcc");
selectComponent(page, "qt.56.gcc_64");
}
else if (installer.value("os") == "mac") {
selectComponent(page, "qt.55.clang_64");
selectComponent(page, "qt.56.clang_64");
}
selectComponent(page, "qt.55.qtquickcontrols");
selectComponent(page, "qt.55.qtscript");
selectComponent(page, "qt.56.qtquickcontrols");
selectComponent(page, "qt.56.qtscript");
//installer.componentByName("qt.tools.qtcreator").setValue("ForcedInstallation", "false");

View File

@ -86,36 +86,35 @@ $(TOOL_REMOVE_TARGETS):
TOOLS_URL := http://librepilot.github.io/tools
QT_SHORT_VERSION := 5.6
QT_VERSION := 5.6.0
ifeq ($(UNAME), Linux)
ifeq ($(ARCH), x86_64)
QT_SDK_ARCH := gcc_64
QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x64-5.5.1.run
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x64-5.5.1.run.md5
OSG_URL := $(TOOLS_URL)/osg-3.5.1-linux-x64-qt-5.5.1.tar.gz
OSGEARTH_URL := $(TOOLS_URL)/osgearth-2.7-linux-x64-qt-5.5.1.tar.gz
QT_SDK_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/qt-opensource-linux-x64-$(QT_VERSION).run
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/md5sums.txt
OSG_URL := $(TOOLS_URL)/osg-3.5.1-linux-x64-qt-$(QT_VERSION).tar.gz
OSGEARTH_URL := $(TOOLS_URL)/osgearth-2.7-linux-x64-qt-$(QT_VERSION).tar.gz
else
QT_SDK_ARCH := gcc
QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x86-5.5.1.run
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x86-5.5.1.run.md5
OSG_URL := $(TOOLS_URL)/osg-3.5.1-linux-x86-qt-5.5.1.tar.gz
OSGEARTH_URL := $(TOOLS_URL)/osgearth-2.7-linux-x86-qt-5.5.1.tar.gz
# x32 for linux no longer provided as pre-built binaries.
endif
UNCRUSTIFY_URL := $(TOOLS_URL)/uncrustify-0.60.tar.gz
DOXYGEN_URL := $(TOOLS_URL)/doxygen-1.8.3.1.src.tar.gz
else ifeq ($(UNAME), Darwin)
QT_SDK_ARCH := clang_64
QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-mac-x64-clang-5.5.1.dmg.md5
QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-5.5.1
QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.5.1/qt-opensource-mac-x64-clang-5.5.1.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.5.1
QT_SDK_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/qt-opensource-mac-x64-clang-$(QT_VERSION).dmg
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/md5sums.txt
QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-$(QT_VERSION)
QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-$(QT_VERSION)/qt-opensource-mac-x64-clang-$(QT_VERSION).app/Contents/MacOS/qt-opensource-mac-x64-clang-$(QT_VERSION)
UNCRUSTIFY_URL := $(TOOLS_URL)/uncrustify-0.60.tar.gz
DOXYGEN_URL := $(TOOLS_URL)/doxygen-1.8.3.1.src.tar.gz
OSG_URL := $(TOOLS_URL)/osg-3.5.1-clang_64-qt-5.5.1.tar.gz
OSGEARTH_URL := $(TOOLS_URL)/osgearth-2.7-clang_64-qt-5.5.1.tar.gz
OSG_URL := $(TOOLS_URL)/osg-3.5.1-clang_64-qt-$(QT_VERSION).tar.gz
OSGEARTH_URL := $(TOOLS_URL)/osgearth-2.7-clang_64-qt-$(QT_VERSION).tar.gz
else ifeq ($(UNAME), Windows)
QT_SDK_ARCH := mingw492_32
QT_SDK_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-mingw492-5.5.1.exe
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-windows-x86-mingw492-5.5.1.exe.md5
QT_SDK_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/qt-opensource-windows-x86-mingw492-$(QT_VERSION).exe
QT_SDK_MD5_URL := http://download.qt.io/official_releases/qt/$(QT_SHORT_VERSION)/$(QT_VERSION)/md5sums.txt
NSIS_URL := $(TOOLS_URL)/nsis-2.46-unicode.tar.bz2
MESAWIN_URL := $(TOOLS_URL)/mesawin.tar.gz
UNCRUSTIFY_URL := $(TOOLS_URL)/uncrustify-0.60-windows.tar.bz2
@ -126,7 +125,6 @@ GTEST_URL := $(TOOLS_URL)/gtest-1.7.0.zip
CCACHE_URL := http://samba.org/ftp/ccache/ccache-3.2.2.tar.bz2
CCACHE_MD5_URL := $(TOOLS_URL)/ccache-3.2.2.tar.bz2.md5
QT_VERSION := 5.5.1
QT_SDK_DIR := $(TOOLS_DIR)/qt-$(QT_VERSION)
UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60
DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1
@ -309,7 +307,7 @@ endif
##############################
define MD5_CHECK_TEMPLATE
"`test -f \"$(1)\" && $(OPENSSL) dgst -md5 \"$(1)\" | $(CUT) -f2 -d' '`" $(2) "`$(CUT) -f1 -d' ' < \"$(1).md5\"`"
"`test -f \"$(1)\" && $(OPENSSL) dgst -md5 \"$(1)\" | $(CUT) -f2 -d' '`" $(2) "`$(GREP) $(notdir $(1)) $(1).md5 | $(CUT) -f1 -d' '`"
endef
##############################
@ -513,17 +511,17 @@ endef
ifeq ($(UNAME), Windows)
QT_SDK_PREFIX := $(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)
QT_SDK_PREFIX := $(QT_SDK_DIR)/$(QT_SHORT_VERSION)/$(QT_SDK_ARCH)
$(eval $(call QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH)))
else ifeq ($(UNAME), Linux)
QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)"
QT_SDK_PREFIX := "$(QT_SDK_DIR)/$(QT_SHORT_VERSION)/$(QT_SDK_ARCH)"
$(eval $(call QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH)))
else ifeq ($(UNAME), Darwin)
QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.5/$(QT_SDK_ARCH)"
QT_SDK_PREFIX := "$(QT_SDK_DIR)/$(QT_SHORT_VERSION)/$(QT_SDK_ARCH)"
$(eval $(call MAC_QT_INSTALL_TEMPLATE,$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH)))
else
@ -533,7 +531,7 @@ QT_SDK_PREFIX := $(QT_SDK_DIR)
.PHONY: qt_sdk_install
qt_sdk_install:
@$(ECHO) $(MSG_NOTICE) --------------------------------------------------------
@$(ECHO) $(MSG_NOTICE) Please install native Qt 5.5.x SDK using package manager
@$(ECHO) $(MSG_NOTICE) Please install native Qt 5.6.x SDK using package manager
@$(ECHO) $(MSG_NOTICE) --------------------------------------------------------
.PHONY: qt_sdk_clean