Skip to content

Commit ac4bac0

Browse files
authored
updating workflows to be slightly more modern (#883)
* updating workflows to be slightly more modern * unused functions * trying to fix CI/CD build * is the issue the Qt version? * can i provide a slightly vague version? * simpler method of casting between breakpoint abstract type and int for settings
1 parent 41c8b51 commit ac4bac0

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ env:
1111
BUILD_TYPE: Debug
1212

1313
jobs:
14-
build_ubuntu_20:
15-
runs-on: ubuntu-20.04
14+
build_ubuntu_24:
15+
runs-on: ubuntu-24.04
16+
strategy:
17+
matrix:
18+
QT_VERSION: [5.12.8, 5.15.2]
1619
steps:
1720
- name: Install Dependencies
1821
run: sudo apt-get install -y libcapstone-dev libgraphviz-dev
@@ -22,9 +25,9 @@ jobs:
2225
submodules: true
2326

2427
- name: Install Qt
25-
uses: jurplel/install-qt-action@v3
28+
uses: jurplel/install-qt-action@v4
2629
with:
27-
version: "5.12.8"
30+
version: ${{matrix.QT_VERSION}}
2831

2932
- name: Configure CMake
3033
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
@@ -34,7 +37,6 @@ jobs:
3437
- name: Build
3538
# Build your program with the given configuration
3639
run: cmake --build ${{github.workspace}}/build --parallel 4 --config ${{env.BUILD_TYPE}}
37-
3840
# Disabled until both aqinstall and install-qt-action support the fixes…
3941
# build_windows:
4042
# runs-on: windows-latest

src/Configuration.cpp

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
#include "Configuration.h"
8+
#include "IBreakpoint.h"
89
#include "edb.h"
910

1011
#include <QCoreApplication>
@@ -20,17 +21,6 @@
2021

2122
namespace {
2223

23-
QDataStream &operator<<(QDataStream &s, const IBreakpoint::TypeId &id) {
24-
return s << static_cast<int>(id);
25-
}
26-
27-
QDataStream &operator>>(QDataStream &s, IBreakpoint::TypeId &id) {
28-
int value = 0;
29-
s >> value;
30-
id = static_cast<IBreakpoint::TypeId>(value);
31-
return s;
32-
}
33-
3424
//------------------------------------------------------------------------------
3525
// Name: getDefaultPluginPath
3626
// Desc: return default path for plugins
@@ -81,12 +71,10 @@ void Configuration::sendChangeNotification() {
8171
//------------------------------------------------------------------------------
8272
void Configuration::readSettings() {
8373

84-
qRegisterMetaTypeStreamOperators<IBreakpoint::TypeId>("IBreakpoint::TypeId");
85-
8674
#ifdef Q_OS_WIN32
8775
const QString default_font = QFont("Courier New", 8).toString();
8876
#elif defined(Q_OS_MACX)
89-
const QString default_font = QFont("Courier New", 10).toString();
77+
const QString default_font = QFont("Courier New", 10).toString();
9078
#else
9179
const QString default_font = QFont("Monospace", 8).toString();
9280
#endif
@@ -126,7 +114,8 @@ void Configuration::readSettings() {
126114
disableASLR = settings.value("debugger.disableASLR.enabled", false).toBool();
127115
disableLazyBinding = settings.value("debugger.disableLazyBinding.enabled", false).toBool();
128116
break_on_library_load = settings.value("debugger.break_on_library_load_event.enabled", false).toBool();
129-
default_breakpoint_type = settings.value("debugger.default_breakpoint_type", QVariant::fromValue(IBreakpoint::TypeId::Automatic)).value<IBreakpoint::TypeId>();
117+
default_breakpoint_type = static_cast<IBreakpoint::TypeId>(settings.value("debugger.default_breakpoint_type", static_cast<int>(IBreakpoint::TypeId::Automatic)).value<int>());
118+
130119
settings.endGroup();
131120

132121
settings.beginGroup("Disassembly");
@@ -242,7 +231,7 @@ void Configuration::writeSettings() {
242231
settings.setValue("debugger.disableASLR.enabled", disableASLR);
243232
settings.setValue("debugger.disableLazyBinding.enabled", disableLazyBinding);
244233
settings.setValue("debugger.break_on_library_load_event.enabled", break_on_library_load);
245-
settings.setValue("debugger.default_breakpoint_type", QVariant::fromValue(default_breakpoint_type));
234+
settings.setValue("debugger.default_breakpoint_type", static_cast<int>(default_breakpoint_type));
246235
settings.endGroup();
247236

248237
settings.beginGroup("Disassembly");

0 commit comments

Comments
 (0)