File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ void ColorMenuItem::setImageColor( QColor c )
73
73
74
74
lastColor = c;
75
75
76
- b = parentWidget ( )->palette ().color (QPalette::WindowText);
76
+ b = qobject_cast<QWidget*>( parent () )->palette ().color (QPalette::WindowText);
77
77
78
78
i=0 ;
79
79
@@ -140,7 +140,7 @@ void ColorMenuItem::openColorPicker(void)
140
140
qs = title;
141
141
qs.replace ( " &" , " " , Qt::CaseInsensitive); // get rid of & accelerator characters
142
142
143
- picker = new ColorMenuPickerDialog_t ( colorPtr, qs.toLocal8Bit ().constData (), parentWidget ( ) );
143
+ picker = new ColorMenuPickerDialog_t ( colorPtr, qs.toLocal8Bit ().constData (), qobject_cast<QWidget*>( parent () ) );
144
144
145
145
picker->show ();
146
146
Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ bool FileScriptObject::putChar(char c)
441
441
{
442
442
auto * engine = FCEU::JSEngine::getCurrent ();
443
443
engine->throwError (QJSValue::GenericError, " file is not open " );
444
- return - 1 ;
444
+ return false ;
445
445
}
446
446
bool success = file->putChar (c);
447
447
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ typedef uint8 (*readfunc)(uint32 A);
191
191
#define __FCEU_PRINTF_ATTRIBUTE ( fmt, va )
192
192
#endif
193
193
194
+ #if defined(__cplusplus)
194
195
// Scoped pointer ensures that memory pointed to by this object gets cleaned up
195
196
// and deallocated when this object goes out of scope. Helps prevent memory leaks
196
197
// on temporary memory allocations in functions with early outs.
@@ -261,6 +262,7 @@ class fceuScopedPtr
261
262
enum fceuAllocType _allocType;
262
263
263
264
};
265
+ #endif // __cplusplus
264
266
265
267
#include " utils/endian.h"
266
268
You can’t perform that action at this time.
0 commit comments