|
5 | 5 | */ |
6 | 6 |
|
7 | 7 | #include "Configuration.h" |
| 8 | +#include "IBreakpoint.h" |
8 | 9 | #include "edb.h" |
9 | 10 |
|
10 | 11 | #include <QCoreApplication> |
|
20 | 21 |
|
21 | 22 | namespace { |
22 | 23 |
|
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 | | - |
34 | 24 | //------------------------------------------------------------------------------ |
35 | 25 | // Name: getDefaultPluginPath |
36 | 26 | // Desc: return default path for plugins |
@@ -81,12 +71,10 @@ void Configuration::sendChangeNotification() { |
81 | 71 | //------------------------------------------------------------------------------ |
82 | 72 | void Configuration::readSettings() { |
83 | 73 |
|
84 | | - qRegisterMetaTypeStreamOperators<IBreakpoint::TypeId>("IBreakpoint::TypeId"); |
85 | | - |
86 | 74 | #ifdef Q_OS_WIN32 |
87 | 75 | const QString default_font = QFont("Courier New", 8).toString(); |
88 | 76 | #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(); |
90 | 78 | #else |
91 | 79 | const QString default_font = QFont("Monospace", 8).toString(); |
92 | 80 | #endif |
@@ -126,7 +114,8 @@ void Configuration::readSettings() { |
126 | 114 | disableASLR = settings.value("debugger.disableASLR.enabled", false).toBool(); |
127 | 115 | disableLazyBinding = settings.value("debugger.disableLazyBinding.enabled", false).toBool(); |
128 | 116 | 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 | + |
130 | 119 | settings.endGroup(); |
131 | 120 |
|
132 | 121 | settings.beginGroup("Disassembly"); |
@@ -242,7 +231,7 @@ void Configuration::writeSettings() { |
242 | 231 | settings.setValue("debugger.disableASLR.enabled", disableASLR); |
243 | 232 | settings.setValue("debugger.disableLazyBinding.enabled", disableLazyBinding); |
244 | 233 | 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)); |
246 | 235 | settings.endGroup(); |
247 | 236 |
|
248 | 237 | settings.beginGroup("Disassembly"); |
|
0 commit comments