1
0
Fork 0

Linux / Qt 5.2 fixes

This commit is contained in:
James Turner 2017-04-10 14:37:18 +01:00
parent d1e9d357b9
commit 68ef30d3af
8 changed files with 20 additions and 13 deletions

View file

@ -117,10 +117,10 @@ if (HAVE_QT)
QtFileDialog.hxx
InstallSceneryDialog.hxx
InstallSceneryDialog.cxx
previewwindow.cpp
previewwindow.h
SettingsSection.cpp
SettingsSection.h
PreviewWindow.cxx
PreviewWindow.hxx
SettingsSection.cxx
SettingsSection.hxx
SettingsSectionQML.cxx
SettingsSectionQML.hxx
AdvancedSettingsButton.h
@ -144,6 +144,15 @@ if (HAVE_QT)
${uic_sources}
${qrc_sources})
#HACK: CMake with broken Qt5Qml_PRIVATE_INCLUDE_DIRS
# This is needed for Qt 5.2, possibly 5.3. Can be removed if we raise
# the minimum version higher.
if(NOT "${Qt5Qml_PRIVATE_INCLUDE_DIRS}" MATCHES "/QtQml/")
list(APPEND Qt5Qml_PRIVATE_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/QtCore/${Qt5Core_VERSION}/QtCore")
list(APPEND Qt5Qml_PRIVATE_INCLUDE_DIRS "${_qt5Qml_install_prefix}/include/QtQml/${Qt5Core_VERSION}/QtQml")
list(REMOVE_DUPLICATES Qt5Qml_PRIVATE_INCLUDE_DIRS)
endif()
set_property(TARGET fglauncher PROPERTY AUTOMOC ON)
target_link_libraries(fglauncher Qt5::Core Qt5::Widgets Qt5::Network Qt5::Qml SimGearCore)
target_include_directories(fglauncher PRIVATE ${PROJECT_BINARY_DIR}/src/GUI)

View file

@ -1,7 +1,7 @@
#ifndef EXTRASETTINGSSECTION_HXX
#define EXTRASETTINGSSECTION_HXX
#include "settingssection.h"
#include "SettingsSection.hxx"
class QTextEdit;
class LaunchConfig;

View file

@ -34,7 +34,7 @@
#include "AircraftSearchFilterModel.hxx"
#include "DefaultAircraftLocator.hxx"
#include "SettingsWidgets.hxx"
#include "previewwindow.h"
#include "PreviewWindow.hxx"
#include "LaunchConfig.hxx"
#include "SettingsSectionQML.hxx"
#include "ExtraSettingsSection.hxx"
@ -98,7 +98,6 @@ QQmlPrivate::AutoParentResult launcher_autoParent(QObject* thing, QObject* paren
SettingsSection* ss = qobject_cast<SettingsSection*>(parent);
SettingsControl* sc = qobject_cast<SettingsControl*>(thing);
if (ss && sc) {
qInfo() << "let's do this!" << ss << sc;
sc->setParent(ss);
return QQmlPrivate::Parented;
}
@ -503,7 +502,7 @@ void LauncherMainWindow::onRun()
flightgear::Options* opt = flightgear::Options::sharedInstance();
m_config->reset();
m_config->collect();
// aircraft
if (!m_selectedAircraft.isEmpty()) {
// manage aircraft history
@ -1095,4 +1094,3 @@ void LauncherMainWindow::onSettingsSearchChanged()
ss->setSearchTerm(m_ui->settingsSearchEdit->text());
}
}

View file

@ -1,4 +1,4 @@
#include "previewwindow.h"
#include "PreviewWindow.hxx"
#include <QPainter>
#include <QMouseEvent>

View file

@ -1,4 +1,4 @@
#include "settingssection.h"
#include "SettingsSection.hxx"
#include <QVBoxLayout>
#include <QHBoxLayout>

View file

@ -1,7 +1,7 @@
#ifndef SETTINGSSECTIONQML_HXX
#define SETTINGSSECTIONQML_HXX
#include "settingssection.h"
#include "SettingsSection.hxx"
#include <QQmlListProperty>
@ -14,7 +14,7 @@ class SettingsSectionQML : public SettingsSection
Q_PROPERTY(QQmlListProperty<QObject> controls READ qmlControls)
Q_PROPERTY(QString summary READ summary WRITE setSummary NOTIFY qmlSummaryChanged)
Q_CLASSINFO("DefaultProperty", "controls")
public:
SettingsSectionQML();