diff --git a/.github/workflows/app_build.yml b/.github/workflows/app_build.yml index 6dfea7798..44e6e36d9 100644 --- a/.github/workflows/app_build.yml +++ b/.github/workflows/app_build.yml @@ -16,7 +16,7 @@ env: BUILD_TESTING: ON BUILD_BENCHMARK: ON BUILD_PACKAGE: ON - QT_VERSION: 6.5.2 + QT_VERSION: 6.11.0 QT_DEBUG_PLUGINS: 1 jobs: @@ -42,7 +42,7 @@ jobs: BINARY_PKG_PATH: _CPack_Packages/Linux/DEB COMPRESSED_PKG_PATH: _CPack_Packages/Linux/TGZ QT_OS_NAME: linux - QT_ARCH: gcc_64 + QT_ARCH: linux_gcc_64 arch: x86_64 - os: ubuntu-24.04 SELF_HOSTED: false @@ -52,7 +52,7 @@ jobs: BINARY_PKG_PATH: _CPack_Packages/Linux/DEB COMPRESSED_PKG_PATH: _CPack_Packages/Linux/TGZ QT_OS_NAME: linux - QT_ARCH: gcc_64 + QT_ARCH: linux_gcc_64 arch: x86_64 - os: windows-2022 SELF_HOSTED: false @@ -62,7 +62,7 @@ jobs: BINARY_PKG_PATH: _CPack_Packages/win64/IFW COMPRESSED_PKG_PATH: _CPack_Packages/win64/ZIP QT_OS_NAME: windows - QT_ARCH: win64_msvc2019_64 + QT_ARCH: win64_msvc2022_64 arch: x86_64 - os: macos-15-intel SELF_HOSTED: false @@ -418,12 +418,12 @@ jobs: cmake -E make_directory ./build if [ "$RUNNER_OS" == "Windows" ]; then - # QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/msvc2019_64" - QT_INSTALL_DIR="$(cmd.exe //c cd)\build\Qt-install\${{ env.QT_VERSION }}\msvc2019_64" + # QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/msvc2022_64" + QT_INSTALL_DIR="$(cmd.exe //c cd)\build\Qt-install\${{ env.QT_VERSION }}\msvc2022_64" elif [ "$RUNNER_OS" == "macOS" ]; then QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/macos" else - QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/${{ matrix.QT_ARCH }}" + QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/gcc_64" fi if [ -d "$QT_INSTALL_DIR" ]; then @@ -432,7 +432,11 @@ jobs: echo "Install aqtinstall, then install Qt $QT_VERSION for ${{ matrix.QT_OS_NAME }} ${{ matrix.QT_ARCH }}" pip show setuptools || true pip install setuptools --upgrade - pip3 install aqtinstall + # TODO: temporary, pending a new release after 3.3.0, need to download a fix, download.qt.io changed the directory structure for Qt 6.11.0 on windows: + # * Issue: https://github.com/miurahr/aqtinstall/issues/1007 + # * Fixed via https://github.com/miurahr/aqtinstall/pull/1000 + # pip install aqtinstall + pip install git+https://github.com/miurahr/aqtinstall.git@master aqt list-qt ${{ matrix.QT_OS_NAME }} desktop --arch $QT_VERSION aqt list-qt ${{ matrix.QT_OS_NAME }} desktop --modules $QT_VERSION ${{ matrix.QT_ARCH }} aqt install-qt --outputdir ./build/Qt-install/ ${{ matrix.QT_OS_NAME }} desktop $QT_VERSION ${{ matrix.QT_ARCH }} -m qtwebchannel qtwebengine qtwebview qtpositioning qtcharts diff --git a/CMakeLists.txt b/CMakeLists.txt index c5ba09cbd..d34f5b643 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -522,9 +522,9 @@ if(UNIX) endif() # Qt -# e.g. QT_INSTALL_DIR = C:/Qt/6.5.2/msvc2019_64 +# e.g. QT_INSTALL_DIR = C:/Qt/6.11.0/msvc2019_64 set(QT_INSTALL_DIR "" CACHE PATH "Path to Qt Install") -set(QT_VERSION "6.5.2" CACHE STRING "Qt target version, defaults to 6.5.2") +set(QT_VERSION "6.11.0" CACHE STRING "Qt target version, defaults to 6.11.0") # For AboutBox, but also validates that the version is valid string(TIMESTAMP CURRENT_YEAR "%Y") @@ -558,7 +558,7 @@ find_file(qweb_resources NAMES qtwebengine_resources.pak PATHS "${QT_INSTALL_DIR find_file(qweb_resources_devtools NAMES qtwebengine_devtools_resources.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH) find_file(qweb_resources_100 NAMES qtwebengine_resources_100p.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH) find_file(qweb_resources_200 NAMES qtwebengine_resources_200p.pak PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH) -#find_file(qweb_resources_v8_context_snapshot NAMES v8_context_snapshot.bin PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH) +find_file(qweb_resources_v8_context_snapshot NAMES v8_context_snapshot.bin PATHS "${QT_INSTALL_DIR}/resources/" "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Resources" NO_DEFAULT_PATH) # QT_WEB_LIBS are linked by OS App and openstudio_lib but not by openstudio_modeleditor.so or openstudio_modeleditor list(APPEND QT_WEB_LIBS Qt6::WebEngineCore) @@ -581,6 +581,17 @@ if(NOT APPLE) find_package(Qt6QmlModels ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH) list(APPEND QT_WEB_LIBS Qt6::QmlModels) + # Qt 6.11+ splits QmlMeta and QmlWorkerScript into their own libraries (required by QtWebEngineProcess) + find_package(Qt6QmlMeta ${QT_VERSION} QUIET PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH) + if(Qt6QmlMeta_FOUND) + list(APPEND QT_WEB_LIBS Qt6::QmlMeta) + endif() + + find_package(Qt6QmlWorkerScript ${QT_VERSION} QUIET PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH) + if(Qt6QmlWorkerScript_FOUND) + list(APPEND QT_WEB_LIBS Qt6::QmlWorkerScript) + endif() + find_package(Qt6Positioning ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH) list(APPEND QT_WEB_LIBS Qt6::Positioning) @@ -590,14 +601,19 @@ if(NOT APPLE) find_library(QT_QXCBQPA NAMES libQt6XcbQpa.so.${QT_VERSION} PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH) - find_library(QT_ICU icui18n REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH) - find_library(QT_ICUDATA icudata REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH) - find_library(QT_ICUUC icuuc REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH) set(QT_ICU_LIBS - ${QT_ICU} - ${QT_ICUDATA} - ${QT_ICUUC} - ) + "${QT_INSTALL_DIR}/lib/libicui18n.so.73.2" + "${QT_INSTALL_DIR}/lib/libicuuc.so.73.2" + "${QT_INSTALL_DIR}/lib/libicudata.so.73.2" + ) + # Ensure each ICU library exists + foreach(lib IN LISTS QT_ICU_LIBS) + if(NOT EXISTS "${lib}") + message(FATAL_ERROR "Qt ICU library not found: ${lib}") + elseif(IS_SYMLINK "${lib}") + message(FATAL_ERROR "Qt ICU library is a symlink, expected a real file: ${lib}") + endif() + endforeach() list(APPEND QT_EXTRA_LIBS ${QT_QXCBQPA} ${QT_ICU_LIBS}) endif() diff --git a/src/openstudio_app/CMakeLists.txt b/src/openstudio_app/CMakeLists.txt index c347cf674..b2620d38d 100644 --- a/src/openstudio_app/CMakeLists.txt +++ b/src/openstudio_app/CMakeLists.txt @@ -229,7 +229,7 @@ elseif( UNIX ) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_devtools} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_100} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_200} $/resources/ - #COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_v8_context_snapshot} $/resources/ + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_v8_context_snapshot} $/resources/ ) # Note: JM: Qt 6.3.0, I can no longer access $ diff --git a/src/openstudio_app/OpenStudioApp.cpp b/src/openstudio_app/OpenStudioApp.cpp index 6b8e813bb..6d4c54d4e 100644 --- a/src/openstudio_app/OpenStudioApp.cpp +++ b/src/openstudio_app/OpenStudioApp.cpp @@ -983,7 +983,6 @@ void OpenStudioApp::showAbout() { QMessageBox about(parent); about.setText(OPENSTUDIOAPP_ABOUTBOX); about.setDetailedText(details); - about.setStyleSheet("qproperty-alignment: AlignLeft;"); about.setWindowTitle("About " + applicationName()); about.setIconPixmap(QPixmap(":/images/os_128.png")); diff --git a/src/openstudio_lib/ConstructionsTabController.cpp b/src/openstudio_lib/ConstructionsTabController.cpp index 5a3e146c7..7d18c0152 100644 --- a/src/openstudio_lib/ConstructionsTabController.cpp +++ b/src/openstudio_lib/ConstructionsTabController.cpp @@ -39,7 +39,6 @@ void ConstructionsTabController::setSubTab(int index) { } if (m_currentController) { - m_currentController->disconnect(); delete m_currentController; } diff --git a/src/openstudio_lib/DesignDayGridView.cpp b/src/openstudio_lib/DesignDayGridView.cpp index fb5e58a87..ab0616c65 100644 --- a/src/openstudio_lib/DesignDayGridView.cpp +++ b/src/openstudio_lib/DesignDayGridView.cpp @@ -237,7 +237,7 @@ void DesignDayGridController::addColumns(const QString& /*category*/, std::vecto } else if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip(tr("Check to select all rows")); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &DesignDayGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &DesignDayGridController::onSelectAllStateChanged); connect(this, &DesignDayGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(SELECTED, false, false, checkbox), "Check to select this row"); } diff --git a/src/openstudio_lib/FacilityExteriorEquipmentGridView.cpp b/src/openstudio_lib/FacilityExteriorEquipmentGridView.cpp index 26fcd7452..fcd132df0 100644 --- a/src/openstudio_lib/FacilityExteriorEquipmentGridView.cpp +++ b/src/openstudio_lib/FacilityExteriorEquipmentGridView.cpp @@ -231,7 +231,7 @@ void FacilityExteriorEquipmentGridController::addColumns(const QString& category auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &FacilityExteriorEquipmentGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &FacilityExteriorEquipmentGridController::onSelectAllStateChanged); connect(this, &FacilityExteriorEquipmentGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); diff --git a/src/openstudio_lib/FacilityShadingGridView.cpp b/src/openstudio_lib/FacilityShadingGridView.cpp index 2c680e1f0..b925d4688 100644 --- a/src/openstudio_lib/FacilityShadingGridView.cpp +++ b/src/openstudio_lib/FacilityShadingGridView.cpp @@ -474,7 +474,7 @@ void FacilityShadingGridController::addColumns(const QString& category, std::vec if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &FacilityShadingGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &FacilityShadingGridController::onSelectAllStateChanged); connect(this, &FacilityShadingGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allShadingSurfaces, true)); } else if (field == SHADINGSURFACENAME) { diff --git a/src/openstudio_lib/FacilityStoriesGridView.cpp b/src/openstudio_lib/FacilityStoriesGridView.cpp index df7638f83..4762527d9 100644 --- a/src/openstudio_lib/FacilityStoriesGridView.cpp +++ b/src/openstudio_lib/FacilityStoriesGridView.cpp @@ -276,7 +276,7 @@ void FacilityStoriesGridController::addColumns(const QString& category, std::vec } else if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &FacilityStoriesGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &FacilityStoriesGridController::onSelectAllStateChanged); connect(this, &FacilityStoriesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); } else if (field == NOMINALZCOORDINATE) { diff --git a/src/openstudio_lib/FacilityTabController.cpp b/src/openstudio_lib/FacilityTabController.cpp index 79ffdcc90..78c90a47e 100644 --- a/src/openstudio_lib/FacilityTabController.cpp +++ b/src/openstudio_lib/FacilityTabController.cpp @@ -46,7 +46,6 @@ void FacilityTabController::setSubTab(int index) { } if (m_currentView) { - m_currentView->disconnect(); delete m_currentView; } diff --git a/src/openstudio_lib/GeometryEditorView.cpp b/src/openstudio_lib/GeometryEditorView.cpp index 48671da38..27f2a1878 100644 --- a/src/openstudio_lib/GeometryEditorView.cpp +++ b/src/openstudio_lib/GeometryEditorView.cpp @@ -1106,7 +1106,7 @@ EditorWebView::EditorWebView(bool isIP, const openstudio::model::Model& model, Q connect(m_mergeBtn, &QPushButton::clicked, this, &EditorWebView::mergeClicked); connect(m_debugBtn, &QPushButton::clicked, this, &EditorWebView::debugClicked); - auto* hLayout = new QHBoxLayout(this); + auto* hLayout = new QHBoxLayout(); mainLayout->addLayout(hLayout); auto* label = new QLabel(this); diff --git a/src/openstudio_lib/GeometryPreviewView.cpp b/src/openstudio_lib/GeometryPreviewView.cpp index 508865570..0e71d0621 100644 --- a/src/openstudio_lib/GeometryPreviewView.cpp +++ b/src/openstudio_lib/GeometryPreviewView.cpp @@ -182,7 +182,7 @@ PreviewWebView::PreviewWebView(bool isIP, const model::Model& model, QWidget* t_ connect(m_document.get(), &OSDocument::toggleUnitsClicked, this, &PreviewWebView::onUnitSystemChange); connect(m_refreshBtn, &QPushButton::clicked, this, &PreviewWebView::refreshClicked); - auto* hLayout = new QHBoxLayout(this); + auto* hLayout = new QHBoxLayout(); mainLayout->addLayout(hLayout); hLayout->addStretch(); @@ -220,7 +220,7 @@ PreviewWebView::PreviewWebView(bool isIP, const model::Model& model, QWidget* t_ m_geometryDiagnosticsBox->setToolTip( "Enables adjacency issues. Enables checks for Surface/Space Convexity, due to this the ThreeJS export is slightly slower"); connect(m_geometryDiagnosticsBox, &QCheckBox::clicked, mainWindow, &MainWindow::toggleGeometryDiagnostics); - connect(m_geometryDiagnosticsBox, &QCheckBox::stateChanged, [this](int state) { + connect(m_geometryDiagnosticsBox, &QCheckBox::checkStateChanged, [this](Qt::CheckState state) { if (state == Qt::Checked && !m_includeGeometryDiagnostics) { // Old m_json didn't contain the geometry diagnostics, so we need to include it, so we should set m_json to empty so the // ThreeJSForwardTranslator is called again diff --git a/src/openstudio_lib/GeometryTabController.cpp b/src/openstudio_lib/GeometryTabController.cpp index feb4d9a85..ba34d6949 100644 --- a/src/openstudio_lib/GeometryTabController.cpp +++ b/src/openstudio_lib/GeometryTabController.cpp @@ -44,7 +44,6 @@ void GeometryTabController::setSubTab(int index) { } if (m_currentController) { - m_currentController->disconnect(); delete m_currentController; } diff --git a/src/openstudio_lib/LocationTabController.cpp b/src/openstudio_lib/LocationTabController.cpp index 03b6241d6..83c575d1f 100644 --- a/src/openstudio_lib/LocationTabController.cpp +++ b/src/openstudio_lib/LocationTabController.cpp @@ -71,7 +71,6 @@ void LocationTabController::setSubTab(int index) { m_currentIndex = index; if (m_currentView != nullptr) { - m_currentView->disconnect(); delete m_currentView; } diff --git a/src/openstudio_lib/OSCollapsibleItemList.cpp b/src/openstudio_lib/OSCollapsibleItemList.cpp index 63b4655a5..35e66eb21 100644 --- a/src/openstudio_lib/OSCollapsibleItemList.cpp +++ b/src/openstudio_lib/OSCollapsibleItemList.cpp @@ -54,6 +54,8 @@ OSCollapsibleItemList::OSCollapsibleItemList(bool addScrollArea, QWidget* parent outerVLayout->addWidget(scrollArea); scrollArea->setWidget(outerWidget); scrollArea->setWidgetResizable(true); + scrollArea->viewport()->setAutoFillBackground(false); + outerWidget->setAutoFillBackground(false); } else { outerVLayout->addWidget(outerWidget); } diff --git a/src/openstudio_lib/OSInspectorView.cpp b/src/openstudio_lib/OSInspectorView.cpp index e58227d9d..9e80ad680 100644 --- a/src/openstudio_lib/OSInspectorView.cpp +++ b/src/openstudio_lib/OSInspectorView.cpp @@ -49,6 +49,8 @@ OSInspectorView::OSInspectorView(bool addScrollArea, QWidget* parent) : QWidget( outerVLayout->addWidget(scrollArea); scrollArea->setWidget(m_stackedWidget); scrollArea->setWidgetResizable(true); + scrollArea->viewport()->setAutoFillBackground(false); + m_stackedWidget->setAutoFillBackground(false); } else { outerVLayout->addWidget(m_stackedWidget); } diff --git a/src/openstudio_lib/OSItemList.cpp b/src/openstudio_lib/OSItemList.cpp index bb91298e3..9d9045154 100644 --- a/src/openstudio_lib/OSItemList.cpp +++ b/src/openstudio_lib/OSItemList.cpp @@ -54,6 +54,8 @@ OSItemList::OSItemList(OSVectorController* vectorController, bool addScrollArea, outerVLayout->addWidget(scrollArea); scrollArea->setWidget(outerWidget); scrollArea->setWidgetResizable(true); + scrollArea->viewport()->setAutoFillBackground(false); + outerWidget->setAutoFillBackground(false); } else { outerVLayout->addWidget(outerWidget); } diff --git a/src/openstudio_lib/RefrigerationGridView.cpp b/src/openstudio_lib/RefrigerationGridView.cpp index 280928fd0..d9861e427 100644 --- a/src/openstudio_lib/RefrigerationGridView.cpp +++ b/src/openstudio_lib/RefrigerationGridView.cpp @@ -278,7 +278,7 @@ void RefrigerationCaseGridController::addColumns(const QString& /*category*/, st } else if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &RefrigerationCaseGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &RefrigerationCaseGridController::onSelectAllStateChanged); connect(this, &RefrigerationCaseGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); } else if (field == RATEDAMBIENTRELATIVEHUMIDITY) { @@ -645,7 +645,7 @@ void RefrigerationWalkInGridController::addColumns(const QString& /*category*/, } else if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &RefrigerationWalkInGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &RefrigerationWalkInGridController::onSelectAllStateChanged); connect(this, &RefrigerationWalkInGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); } else if (field == DEFROSTCONTROLTYPE) { diff --git a/src/openstudio_lib/SimSettingsView.cpp b/src/openstudio_lib/SimSettingsView.cpp index a6727c420..6a4e9102b 100644 --- a/src/openstudio_lib/SimSettingsView.cpp +++ b/src/openstudio_lib/SimSettingsView.cpp @@ -490,27 +490,27 @@ QWidget* SimSettingsView::createRunControlWidget() { m_runSimWeatherFiles = new QCheckBox("Run Simulation for Weather File"); layout->addWidget(m_runSimWeatherFiles); - connect(m_runSimWeatherFiles, &QCheckBox::stateChanged, this, &SimSettingsView::on_runSimWeatherFiles); + connect(m_runSimWeatherFiles, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_runSimWeatherFiles); m_runSimDesignDays = new QCheckBox("Run Simulation for Design Days"); layout->addWidget(m_runSimDesignDays); - connect(m_runSimDesignDays, &QCheckBox::stateChanged, this, &SimSettingsView::on_runSimDesignDays); + connect(m_runSimDesignDays, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_runSimDesignDays); m_performZoneSizing = new QCheckBox("Perform Zone Sizing"); layout->addWidget(m_performZoneSizing); - connect(m_performZoneSizing, &QCheckBox::stateChanged, this, &SimSettingsView::on_performZoneSizing); + connect(m_performZoneSizing, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_performZoneSizing); m_performSystemSizing = new QCheckBox("Perform System Sizing"); layout->addWidget(m_performSystemSizing); - connect(m_performSystemSizing, &QCheckBox::stateChanged, this, &SimSettingsView::on_performSystemSizing); + connect(m_performSystemSizing, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_performSystemSizing); m_performPlantSizing = new QCheckBox("Perform Plant Sizing"); layout->addWidget(m_performPlantSizing); - connect(m_performPlantSizing, &QCheckBox::stateChanged, this, &SimSettingsView::on_performPlantSizing); + connect(m_performPlantSizing, &QCheckBox::checkStateChanged, this, &SimSettingsView::on_performPlantSizing); auto* widget = new QWidget(); widget->setLayout(mainLayout); @@ -2193,22 +2193,22 @@ void SimSettingsView::on_endDateChanged(const QDate& date) { m_runPeriod->setEndDayOfMonth(m_endDateEdit->date().day()); } -void SimSettingsView::on_runSimWeatherFiles(int state) { +void SimSettingsView::on_runSimWeatherFiles(Qt::CheckState state) { // TODO } -void SimSettingsView::on_runSimDesignDays(int state) { +void SimSettingsView::on_runSimDesignDays(Qt::CheckState state) { // TODO } -void SimSettingsView::on_performZoneSizing(int state) { +void SimSettingsView::on_performZoneSizing(Qt::CheckState state) { // TODO } -void SimSettingsView::on_performSystemSizing(int state) { +void SimSettingsView::on_performSystemSizing(Qt::CheckState state) { // TODO } -void SimSettingsView::on_performPlantSizing(int state) { +void SimSettingsView::on_performPlantSizing(Qt::CheckState state) { // TODO } diff --git a/src/openstudio_lib/SimSettingsView.hpp b/src/openstudio_lib/SimSettingsView.hpp index a54eb8d6b..32cfe67ea 100644 --- a/src/openstudio_lib/SimSettingsView.hpp +++ b/src/openstudio_lib/SimSettingsView.hpp @@ -291,15 +291,15 @@ class SimSettingsView void on_radianceGroupClicked(int idx); - void on_runSimWeatherFiles(int state); + void on_runSimWeatherFiles(Qt::CheckState state); - void on_runSimDesignDays(int state); + void on_runSimDesignDays(Qt::CheckState state); - void on_performZoneSizing(int state); + void on_performZoneSizing(Qt::CheckState state); - void on_performSystemSizing(int state); + void on_performSystemSizing(Qt::CheckState state); - void on_performPlantSizing(int state); + void on_performPlantSizing(Qt::CheckState state); void toggleUnits(bool displayIP); diff --git a/src/openstudio_lib/SpaceTypesGridView.cpp b/src/openstudio_lib/SpaceTypesGridView.cpp index 4d7ce8a6f..57c387d22 100644 --- a/src/openstudio_lib/SpaceTypesGridView.cpp +++ b/src/openstudio_lib/SpaceTypesGridView.cpp @@ -452,7 +452,7 @@ void SpaceTypesGridController::addColumns(const QString& category, std::vector(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged); connect(this, &SpaceTypesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); @@ -1057,7 +1057,7 @@ void SpaceTypesGridController::addColumns(const QString& category, std::vector(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpaceTypesGridController::onSelectAllStateChanged); connect(this, &SpaceTypesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allLoads, true)); } else if (field == MULTIPLIER) { diff --git a/src/openstudio_lib/SpacesDaylightingGridView.cpp b/src/openstudio_lib/SpacesDaylightingGridView.cpp index 1f5e13e71..72cecc94f 100644 --- a/src/openstudio_lib/SpacesDaylightingGridView.cpp +++ b/src/openstudio_lib/SpacesDaylightingGridView.cpp @@ -207,7 +207,7 @@ void SpacesDaylightingGridController::addColumns(const QString& category, std::v if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesDaylightingGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesDaylightingGridController::onSelectAllStateChanged); connect(this, &SpacesDaylightingGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); //addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", diff --git a/src/openstudio_lib/SpacesInteriorPartitionsGridView.cpp b/src/openstudio_lib/SpacesInteriorPartitionsGridView.cpp index 31c8e0a52..a7637bb2e 100644 --- a/src/openstudio_lib/SpacesInteriorPartitionsGridView.cpp +++ b/src/openstudio_lib/SpacesInteriorPartitionsGridView.cpp @@ -186,7 +186,7 @@ void SpacesInteriorPartitionsGridController::addColumns(const QString& category, if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesInteriorPartitionsGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesInteriorPartitionsGridController::onSelectAllStateChanged); connect(this, &SpacesInteriorPartitionsGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", diff --git a/src/openstudio_lib/SpacesLoadsGridView.cpp b/src/openstudio_lib/SpacesLoadsGridView.cpp index 6c44162eb..7f74266be 100644 --- a/src/openstudio_lib/SpacesLoadsGridView.cpp +++ b/src/openstudio_lib/SpacesLoadsGridView.cpp @@ -823,7 +823,7 @@ void SpacesLoadsGridController::addColumns(const QString& category, std::vector< } else if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesLoadsGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesLoadsGridController::onSelectAllStateChanged); connect(this, &SpacesLoadsGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allLoads, true)); } else if (field == MULTIPLIER) { diff --git a/src/openstudio_lib/SpacesShadingGridView.cpp b/src/openstudio_lib/SpacesShadingGridView.cpp index d2939cef0..be3c267a0 100644 --- a/src/openstudio_lib/SpacesShadingGridView.cpp +++ b/src/openstudio_lib/SpacesShadingGridView.cpp @@ -182,7 +182,7 @@ void SpacesShadingGridController::addColumns(const QString& category, std::vecto if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesShadingGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesShadingGridController::onSelectAllStateChanged); connect(this, &SpacesShadingGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allShadingSurfaceGroups, true)); } else if (field == SHADEDSURFACENAME) { diff --git a/src/openstudio_lib/SpacesSpacesGridView.cpp b/src/openstudio_lib/SpacesSpacesGridView.cpp index 9102f8f6c..2e9ae6ab7 100644 --- a/src/openstudio_lib/SpacesSpacesGridView.cpp +++ b/src/openstudio_lib/SpacesSpacesGridView.cpp @@ -167,7 +167,7 @@ void SpacesSpacesGridController::addColumns(const QString& category, std::vector } else if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesSpacesGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesSpacesGridController::onSelectAllStateChanged); connect(this, &SpacesSpacesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); } else if (field == STORY) { diff --git a/src/openstudio_lib/SpacesSubsurfacesGridView.cpp b/src/openstudio_lib/SpacesSubsurfacesGridView.cpp index fd9eb1d10..769578210 100644 --- a/src/openstudio_lib/SpacesSubsurfacesGridView.cpp +++ b/src/openstudio_lib/SpacesSubsurfacesGridView.cpp @@ -386,7 +386,7 @@ void SpacesSubsurfacesGridController::addColumns(const QString& category, std::v if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesSubsurfacesGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesSubsurfacesGridController::onSelectAllStateChanged); connect(this, &SpacesSubsurfacesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allSubSurfaces, true)); } diff --git a/src/openstudio_lib/SpacesSurfacesGridView.cpp b/src/openstudio_lib/SpacesSurfacesGridView.cpp index 97b9e31eb..1f6d68ddb 100644 --- a/src/openstudio_lib/SpacesSurfacesGridView.cpp +++ b/src/openstudio_lib/SpacesSurfacesGridView.cpp @@ -158,7 +158,7 @@ void SpacesSurfacesGridController::addColumns(const QString& category, std::vect if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &SpacesSurfacesGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &SpacesSurfacesGridController::onSelectAllStateChanged); connect(this, &SpacesSurfacesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row", DataSource(allSurfaces, true)); } else if (field == SURFACENAME) { diff --git a/src/openstudio_lib/SpacesTabController.cpp b/src/openstudio_lib/SpacesTabController.cpp index 2bea0514a..b675adb3d 100644 --- a/src/openstudio_lib/SpacesTabController.cpp +++ b/src/openstudio_lib/SpacesTabController.cpp @@ -45,7 +45,6 @@ void SpacesTabController::setSubTab(int index) { } if (m_currentView) { - m_currentView->disconnect(); delete m_currentView; } diff --git a/src/openstudio_lib/ThermalZonesGridView.cpp b/src/openstudio_lib/ThermalZonesGridView.cpp index 762c9c6a4..c692d3123 100644 --- a/src/openstudio_lib/ThermalZonesGridView.cpp +++ b/src/openstudio_lib/ThermalZonesGridView.cpp @@ -233,7 +233,7 @@ void ThermalZonesGridController::addColumns(const QString& /*category*/, std::ve } else if (field == SELECTED) { auto checkbox = QSharedPointer(new OSSelectAllCheckBox()); checkbox->setToolTip("Check to select all rows"); - connect(checkbox.data(), &OSSelectAllCheckBox::stateChanged, this, &ThermalZonesGridController::onSelectAllStateChanged); + connect(checkbox.data(), &OSSelectAllCheckBox::checkStateChanged, this, &ThermalZonesGridController::onSelectAllStateChanged); connect(this, &ThermalZonesGridController::gridRowSelectionChanged, checkbox.data(), &OSSelectAllCheckBox::onGridRowSelectionChanged); addSelectColumn(Heading(QString(SELECTED), false, false, checkbox), "Check to select this row"); } else if (field == RENDERINGCOLOR) { diff --git a/src/openstudio_lib/VariablesTabView.cpp b/src/openstudio_lib/VariablesTabView.cpp index 61555df56..d28e2b730 100644 --- a/src/openstudio_lib/VariablesTabView.cpp +++ b/src/openstudio_lib/VariablesTabView.cpp @@ -213,7 +213,7 @@ VariablesList::VariablesList(openstudio::model::Model t_model) : m_model(t_model m_searchUseRegex = new QCheckBox(); m_searchUseRegex->setText(tr("Use Regex")); m_searchUseRegex->setChecked(false); - connect(m_searchUseRegex, &QCheckBox::stateChanged, [this](int) { this->onSearchTextEdited(this->m_searchText); }); + connect(m_searchUseRegex, &QCheckBox::checkStateChanged, [this](Qt::CheckState) { this->onSearchTextEdited(this->m_searchText); }); displayHLayout->addWidget(m_searchUseRegex); displayHLayout->addStretch(); vbox->addLayout(displayHLayout); diff --git a/src/shared_gui_components/EditController.cpp b/src/shared_gui_components/EditController.cpp index f60dece28..b889432d7 100644 --- a/src/shared_gui_components/EditController.cpp +++ b/src/shared_gui_components/EditController.cpp @@ -98,8 +98,8 @@ void EditController::reset() { m_measureStepItem = nullptr; if (editRubyMeasureView != nullptr) { - editRubyMeasureView->nameLineEdit->disconnect(); - editRubyMeasureView->descriptionTextEdit->disconnect(); + disconnect(editRubyMeasureView->nameLineEdit, &QLineEdit::textEdited, nullptr, nullptr); + disconnect(editRubyMeasureView->descriptionTextEdit, &QTextEdit::textChanged, nullptr, nullptr); } } diff --git a/src/shared_gui_components/OSGridController.cpp b/src/shared_gui_components/OSGridController.cpp index 690d4101a..8638f9078 100644 --- a/src/shared_gui_components/OSGridController.cpp +++ b/src/shared_gui_components/OSGridController.cpp @@ -696,10 +696,10 @@ void OSGridController::processNewModelObjects() { m_newModelObjects.clear(); } -void OSGridController::onSelectAllStateChanged(const int newState) const { +void OSGridController::onSelectAllStateChanged(Qt::CheckState newState) const { LOG(Debug, "Select all state changed: " << newState); - if (newState == 0) { + if (newState == Qt::Unchecked) { m_objectSelector->clearSelection(); } else { m_objectSelector->selectAll(); diff --git a/src/shared_gui_components/OSGridController.hpp b/src/shared_gui_components/OSGridController.hpp index 96ad1ccfa..a90a6b07f 100644 --- a/src/shared_gui_components/OSGridController.hpp +++ b/src/shared_gui_components/OSGridController.hpp @@ -626,7 +626,7 @@ class OSGridController : public QObject protected slots: - void onSelectAllStateChanged(const int newState) const; + void onSelectAllStateChanged(Qt::CheckState newState) const; private slots: