Linux / Qt 5.2 fixes
This commit is contained in:
parent
d1e9d357b9
commit
68ef30d3af
8 changed files with 20 additions and 13 deletions
|
@ -117,10 +117,10 @@ if (HAVE_QT)
|
||||||
QtFileDialog.hxx
|
QtFileDialog.hxx
|
||||||
InstallSceneryDialog.hxx
|
InstallSceneryDialog.hxx
|
||||||
InstallSceneryDialog.cxx
|
InstallSceneryDialog.cxx
|
||||||
previewwindow.cpp
|
PreviewWindow.cxx
|
||||||
previewwindow.h
|
PreviewWindow.hxx
|
||||||
SettingsSection.cpp
|
SettingsSection.cxx
|
||||||
SettingsSection.h
|
SettingsSection.hxx
|
||||||
SettingsSectionQML.cxx
|
SettingsSectionQML.cxx
|
||||||
SettingsSectionQML.hxx
|
SettingsSectionQML.hxx
|
||||||
AdvancedSettingsButton.h
|
AdvancedSettingsButton.h
|
||||||
|
@ -144,6 +144,15 @@ if (HAVE_QT)
|
||||||
${uic_sources}
|
${uic_sources}
|
||||||
${qrc_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)
|
set_property(TARGET fglauncher PROPERTY AUTOMOC ON)
|
||||||
target_link_libraries(fglauncher Qt5::Core Qt5::Widgets Qt5::Network Qt5::Qml SimGearCore)
|
target_link_libraries(fglauncher Qt5::Core Qt5::Widgets Qt5::Network Qt5::Qml SimGearCore)
|
||||||
target_include_directories(fglauncher PRIVATE ${PROJECT_BINARY_DIR}/src/GUI)
|
target_include_directories(fglauncher PRIVATE ${PROJECT_BINARY_DIR}/src/GUI)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef EXTRASETTINGSSECTION_HXX
|
#ifndef EXTRASETTINGSSECTION_HXX
|
||||||
#define EXTRASETTINGSSECTION_HXX
|
#define EXTRASETTINGSSECTION_HXX
|
||||||
|
|
||||||
#include "settingssection.h"
|
#include "SettingsSection.hxx"
|
||||||
|
|
||||||
class QTextEdit;
|
class QTextEdit;
|
||||||
class LaunchConfig;
|
class LaunchConfig;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "AircraftSearchFilterModel.hxx"
|
#include "AircraftSearchFilterModel.hxx"
|
||||||
#include "DefaultAircraftLocator.hxx"
|
#include "DefaultAircraftLocator.hxx"
|
||||||
#include "SettingsWidgets.hxx"
|
#include "SettingsWidgets.hxx"
|
||||||
#include "previewwindow.h"
|
#include "PreviewWindow.hxx"
|
||||||
#include "LaunchConfig.hxx"
|
#include "LaunchConfig.hxx"
|
||||||
#include "SettingsSectionQML.hxx"
|
#include "SettingsSectionQML.hxx"
|
||||||
#include "ExtraSettingsSection.hxx"
|
#include "ExtraSettingsSection.hxx"
|
||||||
|
@ -98,7 +98,6 @@ QQmlPrivate::AutoParentResult launcher_autoParent(QObject* thing, QObject* paren
|
||||||
SettingsSection* ss = qobject_cast<SettingsSection*>(parent);
|
SettingsSection* ss = qobject_cast<SettingsSection*>(parent);
|
||||||
SettingsControl* sc = qobject_cast<SettingsControl*>(thing);
|
SettingsControl* sc = qobject_cast<SettingsControl*>(thing);
|
||||||
if (ss && sc) {
|
if (ss && sc) {
|
||||||
qInfo() << "let's do this!" << ss << sc;
|
|
||||||
sc->setParent(ss);
|
sc->setParent(ss);
|
||||||
return QQmlPrivate::Parented;
|
return QQmlPrivate::Parented;
|
||||||
}
|
}
|
||||||
|
@ -503,7 +502,7 @@ void LauncherMainWindow::onRun()
|
||||||
flightgear::Options* opt = flightgear::Options::sharedInstance();
|
flightgear::Options* opt = flightgear::Options::sharedInstance();
|
||||||
m_config->reset();
|
m_config->reset();
|
||||||
m_config->collect();
|
m_config->collect();
|
||||||
|
|
||||||
// aircraft
|
// aircraft
|
||||||
if (!m_selectedAircraft.isEmpty()) {
|
if (!m_selectedAircraft.isEmpty()) {
|
||||||
// manage aircraft history
|
// manage aircraft history
|
||||||
|
@ -1095,4 +1094,3 @@ void LauncherMainWindow::onSettingsSearchChanged()
|
||||||
ss->setSearchTerm(m_ui->settingsSearchEdit->text());
|
ss->setSearchTerm(m_ui->settingsSearchEdit->text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "previewwindow.h"
|
#include "PreviewWindow.hxx"
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
|
@ -1,4 +1,4 @@
|
||||||
#include "settingssection.h"
|
#include "SettingsSection.hxx"
|
||||||
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef SETTINGSSECTIONQML_HXX
|
#ifndef SETTINGSSECTIONQML_HXX
|
||||||
#define SETTINGSSECTIONQML_HXX
|
#define SETTINGSSECTIONQML_HXX
|
||||||
|
|
||||||
#include "settingssection.h"
|
#include "SettingsSection.hxx"
|
||||||
|
|
||||||
#include <QQmlListProperty>
|
#include <QQmlListProperty>
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class SettingsSectionQML : public SettingsSection
|
||||||
|
|
||||||
Q_PROPERTY(QQmlListProperty<QObject> controls READ qmlControls)
|
Q_PROPERTY(QQmlListProperty<QObject> controls READ qmlControls)
|
||||||
Q_PROPERTY(QString summary READ summary WRITE setSummary NOTIFY qmlSummaryChanged)
|
Q_PROPERTY(QString summary READ summary WRITE setSummary NOTIFY qmlSummaryChanged)
|
||||||
|
|
||||||
Q_CLASSINFO("DefaultProperty", "controls")
|
Q_CLASSINFO("DefaultProperty", "controls")
|
||||||
public:
|
public:
|
||||||
SettingsSectionQML();
|
SettingsSectionQML();
|
||||||
|
|
Loading…
Reference in a new issue