Skip to content

Commit 7f4f12f

Browse files
authored
Merge pull request #240 from atsju/JST/removeQT5
remove qt5core dependency
2 parents 65382d2 + b6c31f3 commit 7f4f12f

File tree

5 files changed

+35
-21
lines changed

5 files changed

+35
-21
lines changed

.github/workflows/build-linux-clazy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20-
- run: sudo apt update
21-
- run: sudo apt install -y clazy apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libqt6core5compat6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev
20+
- run: sudo apt update
21+
- run: sudo apt install -y clazy apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev
2222
- run: wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber
2323
- run: 7z x qwt-${{env.QWT_version}}.zip
2424
- run: cd qwt-${{env.QWT_version}} ; /usr/lib/qt6/bin/qmake

.github/workflows/build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020
steps:
2121
- uses: actions/checkout@v4
22-
- run: sudo apt update
23-
- run: sudo apt install -y apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libqt6core5compat6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev
22+
- run: sudo apt update
23+
- run: sudo apt install -y apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev
2424
- run: wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber
2525
- run: 7z x qwt-${{env.QWT_version}}.zip
2626
- run: cd qwt-${{env.QWT_version}} ; /usr/lib/qt6/bin/qmake

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
run: pip install aqtinstall
9393
- name: install QT
9494
if: steps.cache-openCV-QT.outputs.cache-hit != 'true'
95-
run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw -m qtcharts qtdatavis3d qt5compat
95+
run: aqt install-qt windows desktop ${{env.QT_version}} win64_mingw -m qtcharts qtdatavis3d
9696
- uses: actions/checkout@v4
9797
if: steps.cache-openCV-QT.outputs.cache-hit != 'true'
9898
with:

DFTFringe.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DEFINES += QAPPLICATION_CLASS=QApplication
1414

1515
TEMPLATE = app
1616

17-
QT += charts concurrent core core5compat datavisualization gui network opengl widgets xml
17+
QT += charts concurrent core datavisualization gui network opengl widgets xml
1818

1919
qtHaveModule(printsupport): QT += printsupport
2020

standastigwizard.cpp

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <QDebug>
2323
#include <counterrotationdlg.h>
2424
#include <QString>
25-
#include <QRegExp>
25+
#include <QRegularExpression>
2626
#include "surfacemanager.h"
2727

2828
QString AstigReportTitle = "";
@@ -304,22 +304,36 @@ void define_input::compute(){
304304
emit computeStandAstig( this, rotationList);
305305
}
306306

307-
QString getNumberFromQString(const QString &xString)
308-
{
309307

310-
QStringList l = xString.split("/");
311-
QString fn = l[l.size()-1];
312-
QRegExp xRegExp("(\\d+([\\.p]\\d+)?)");
313-
xRegExp.indexIn(fn);
314-
QString c = xRegExp.cap();
315-
c.replace("p",".");
316-
if (c == ""){
317-
xRegExp.indexIn(l[l.size()-2]);
318-
c = xRegExp.cap();
319-
c.replace("p",".");
320-
}
321-
return c;
308+
/**
309+
* @brief Extracts a numeric value from a given QString, replacing 'p' with '.' for decimal representation.
310+
*
311+
* This function splits the input string by '/' and attempts to find a number (integer or decimal)
312+
* in the last segment. If not found, it checks the second-to-last segment. The number can contain
313+
* digits and may use 'p' as a decimal separator, which will be replaced by '.' in the output.
314+
*
315+
* @param xString The input QString from which to extract the number.
316+
* @return QString The extracted number as a string, or an empty string if no number is found.
317+
*/
318+
QString getNumberFromQString(const QString &xString) {
319+
QStringList l = xString.split("/");
320+
QString fn = l[l.size()-1];
321+
static const QRegularExpression xRegExp("(\\d+(?:[\\.p]\\d+)?)");
322+
QRegularExpressionMatch match = xRegExp.match(fn);
323+
QString c;
324+
if(match.hasMatch()) {
325+
c = match.captured(1).replace("p",".");
326+
} else {
327+
match = xRegExp.match(l[l.size()-2]);
328+
if(match.hasMatch()) {
329+
c = match.captured(1).replace("p",".");
330+
} else {
331+
c = "";
332+
}
333+
}
334+
return c;
322335
}
336+
323337
void define_input::browse(){
324338

325339
QStringList fileNames = QFileDialog::getOpenFileNames(this,

0 commit comments

Comments
 (0)