diff --git a/src/GUI/CMakeLists.txt b/src/GUI/CMakeLists.txt index c56535c8e..570fe161e 100644 --- a/src/GUI/CMakeLists.txt +++ b/src/GUI/CMakeLists.txt @@ -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) diff --git a/src/GUI/ExtraSettingsSection.hxx b/src/GUI/ExtraSettingsSection.hxx index ca79fa8d3..125f2611c 100644 --- a/src/GUI/ExtraSettingsSection.hxx +++ b/src/GUI/ExtraSettingsSection.hxx @@ -1,7 +1,7 @@ #ifndef EXTRASETTINGSSECTION_HXX #define EXTRASETTINGSSECTION_HXX -#include "settingssection.h" +#include "SettingsSection.hxx" class QTextEdit; class LaunchConfig; diff --git a/src/GUI/LauncherMainWindow.cxx b/src/GUI/LauncherMainWindow.cxx index ec30f6ce1..4595c02ca 100644 --- a/src/GUI/LauncherMainWindow.cxx +++ b/src/GUI/LauncherMainWindow.cxx @@ -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(parent); SettingsControl* sc = qobject_cast(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()); } } - diff --git a/src/GUI/previewwindow.cpp b/src/GUI/PreviewWindow.cxx similarity index 99% rename from src/GUI/previewwindow.cpp rename to src/GUI/PreviewWindow.cxx index 7c4c5b694..cd564b48f 100644 --- a/src/GUI/previewwindow.cpp +++ b/src/GUI/PreviewWindow.cxx @@ -1,4 +1,4 @@ -#include "previewwindow.h" +#include "PreviewWindow.hxx" #include #include diff --git a/src/GUI/previewwindow.h b/src/GUI/PreviewWindow.hxx similarity index 100% rename from src/GUI/previewwindow.h rename to src/GUI/PreviewWindow.hxx diff --git a/src/GUI/settingssection.cpp b/src/GUI/SettingsSection.cxx similarity index 98% rename from src/GUI/settingssection.cpp rename to src/GUI/SettingsSection.cxx index f51728178..e4724629c 100644 --- a/src/GUI/settingssection.cpp +++ b/src/GUI/SettingsSection.cxx @@ -1,4 +1,4 @@ -#include "settingssection.h" +#include "SettingsSection.hxx" #include #include diff --git a/src/GUI/settingssection.h b/src/GUI/SettingsSection.hxx similarity index 100% rename from src/GUI/settingssection.h rename to src/GUI/SettingsSection.hxx diff --git a/src/GUI/SettingsSectionQML.hxx b/src/GUI/SettingsSectionQML.hxx index 900e220f6..09a00d5f6 100644 --- a/src/GUI/SettingsSectionQML.hxx +++ b/src/GUI/SettingsSectionQML.hxx @@ -1,7 +1,7 @@ #ifndef SETTINGSSECTIONQML_HXX #define SETTINGSSECTIONQML_HXX -#include "settingssection.h" +#include "SettingsSection.hxx" #include @@ -14,7 +14,7 @@ class SettingsSectionQML : public SettingsSection Q_PROPERTY(QQmlListProperty controls READ qmlControls) Q_PROPERTY(QString summary READ summary WRITE setSummary NOTIFY qmlSummaryChanged) - + Q_CLASSINFO("DefaultProperty", "controls") public: SettingsSectionQML();