Skip to content

Commit

Permalink
Ci fixes (squashed)
Browse files Browse the repository at this point in the history
Remove unneeded CMakeLists in bitmaps folder


Add qucs-s-spar-viewer.icns

This is required for the "build-mac-universal" and "build-mac-intel" jobs
Install libqt5charts5-dev dependency

I set up a fresh Lubuntu 24.04 on a VM and compiled the code from source using the instructions provided in the Qucs-S page. I found that to avoid the above error in the build, you need to install "libqt5charts5-dev" first. 

After that the compilation went fine. I'm not sure if it works with "libqt6charts6-dev". I'll check later.
Typo in CMakeLists


Remove unneeded include causing trouble in build appImage-Qt6

/home/runner/work/qucs_s/qucs_s/qucs-s-spar-viewer/main.cpp:28:10: fatal error: QDesktopWidget: No such file or directory
   28 | #include <QDesktopWidget>


Missing line in windows build


Patch provided by ra3xdh QtCharts


Update cmake.yml and deploy.yml

Added qt6-charts to Windows build and qt5charts to Qt5 build
  • Loading branch information
andresmmera committed Sep 10, 2024
1 parent f4d1c4a commit 0258a7e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: InstallQt5
run: |
sudo apt-get update
sudo apt-get install -y qtbase5-dev qttools5-dev qtscript5-dev libqt5svg5-dev flex bison
sudo apt-get install -y qtbase5-dev qttools5-dev qtscript5-dev libqt5svg5-dev flex bison libqt5charts5-dev
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y libglx-dev libgl1-mesa-dev flex bison gperf dos2unix flex bison gperf dos2unix
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12
sudo apt install libqt5charts5-dev
- name: 'Install Qt6'
uses: jurplel/install-qt-action@v4
Expand All @@ -74,6 +75,7 @@ jobs:
cache: true
arch: 'linux_gcc_64'
install-deps: 'true'
modules: 'qtcharts'

- name: 'Configure CMake'
run: |
Expand Down Expand Up @@ -146,6 +148,7 @@ jobs:
cache: true
arch: 'clang_64'
install-deps: 'true'
modules: 'qtcharts'

- name: 'Install Dependencies'
shell: bash
Expand Down Expand Up @@ -235,6 +238,7 @@ jobs:
cache: true
arch: 'clang_64'
install-deps: 'true'
modules: 'qtcharts'

- name: 'Install Dependencies'
shell: bash
Expand Down Expand Up @@ -347,6 +351,7 @@ jobs:
python:p
gperf:p
github-cli:p
qt6-charts:p
- name: Build project with CMake
run: |
Expand All @@ -371,6 +376,7 @@ jobs:
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sfilter.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-spowercombining.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-strans.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sspar-viewer.exe --no-translations
- name: Copy non-Qt DLLs to bin directory
run: |
Expand Down
2 changes: 1 addition & 1 deletion qucs-s-spar-viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ SET( spar_viewer_moc_headers qucs-s-spar-viewer.h)
SET(RESOURCES qucs-s-spar-viewer.qrc)

if(QT_VERSION_MAJOR EQUAL 6)
QT6_WRAP_CPP( spar_viewer_moc_sources ${spar_viewer_moc_headers}spar_viewerf )
QT6_WRAP_CPP( spar_viewer_moc_sources ${spar_viewer_moc_headers} )
QT6_ADD_RESOURCES(RESOURCES_SRCS ${RESOURCES})
else()
QT5_WRAP_CPP( spar_viewer_moc_sources ${spar_viewer_moc_headers} )
Expand Down
19 changes: 0 additions & 19 deletions qucs-s-spar-viewer/bitmaps/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion qucs-s-spar-viewer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <QDir>
#include <QFont>
#include <QSettings>
#include <QDesktopWidget>
#include <QScreen>
#include <QStyle>

Expand Down
8 changes: 4 additions & 4 deletions qucs-s-spar-viewer/qucs-s-spar-viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ void Qucs_S_SPAR_Viewer::addFiles(QStringList fileNames)
//qDebug() << line;

if (line.isEmpty()) continue;
if ((line.at(0).isNumber() == false) && (line.at(0) != "#")) {
if ((line.at(0).isNumber() == false) && (line.at(0) != '#')) {
if (file_data["frequency"].size() == 0){
// There's still no data
continue;
Expand All @@ -572,7 +572,7 @@ void Qucs_S_SPAR_Viewer::addFiles(QStringList fileNames)

}
// Check for the option line
if (line.at(0) == "#"){
if (line.at(0) == '#'){

QStringList info = line.split(" ");
frequency_unit = info.at(1); // Specifies the unit of frequency.
Expand Down Expand Up @@ -1443,7 +1443,7 @@ void Qucs_S_SPAR_Viewer::updateTraces()
QString data_file = trace_name_parts[0];
QString trace_file = trace_name_parts[1];

if (trace_file.at(0) == "S"){
if (trace_file.at(0) == 'S'){
trace_file = trace_file + QString("_dB");
}
if (trace_file == QString("|%1|").arg(QChar(0x0394))){
Expand Down Expand Up @@ -1643,7 +1643,7 @@ void Qucs_S_SPAR_Viewer::checkFreqSettingsLimits(QString filename, double& fmin,
void Qucs_S_SPAR_Viewer::adjust_y_axis_to_trace(QString filename, QString tracename){
qreal minX, maxX, minY, maxY;

if (tracename.at(0) == "S"){
if (tracename.at(0) == 'S'){
tracename = tracename + QString("_dB");
}
if (tracename == QString("|%1|").arg(QChar(0x0394))){
Expand Down
2 changes: 2 additions & 0 deletions qucs-s-spar-viewer/qucs-s-spar-viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#include <QtGlobal>
#include <complex>

#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
using namespace QtCharts;
#endif

class QComboBox;
class QTableWidget;
Expand Down
Binary file added qucs/bitmaps/qucs-s-spar-viewer.icns
Binary file not shown.

0 comments on commit 0258a7e

Please sign in to comment.