fix some compiler warnings

This commit is contained in:
walker0643 2018-02-13 15:14:26 -05:00
parent f07070f7f9
commit 6cf4f14dec
6 changed files with 17 additions and 13 deletions

View File

@ -945,6 +945,10 @@ void MainWindow::changeEvent(QEvent* event)
windowStateChanged(); windowStateChanged();
break; break;
} }
default:
{
break;
}
} }
} }
// all that do not return are allowing the event to propagate // all that do not return are allowing the event to propagate

View File

@ -43,14 +43,14 @@ class ScreenSetupView : public QTableView
ScreenSetupModel* model() const; ScreenSetupModel* model() const;
protected: protected:
void mouseDoubleClickEvent(QMouseEvent*); void mouseDoubleClickEvent(QMouseEvent*) override;
void setTableSize(); void setTableSize();
void resizeEvent(QResizeEvent*); void resizeEvent(QResizeEvent*) override;
void dragEnterEvent(QDragEnterEvent* event); void dragEnterEvent(QDragEnterEvent* event) override;
void dragMoveEvent(QDragMoveEvent* event); void dragMoveEvent(QDragMoveEvent* event) override;
void startDrag(Qt::DropActions supportedActions); void startDrag(Qt::DropActions supportedActions) override;
QStyleOptionViewItem viewOptions() const; QStyleOptionViewItem viewOptions() const override;
void scrollTo(const QModelIndex&, ScrollHint) {} void scrollTo(const QModelIndex&, ScrollHint) override {}
}; };
#endif #endif

View File

@ -35,7 +35,7 @@ runCocoaApp()
NSWindow* window = [[NSWindow alloc] NSWindow* window = [[NSWindow alloc]
initWithContentRect: NSMakeRect(0, 0, 3, 3) initWithContentRect: NSMakeRect(0, 0, 3, 3)
styleMask: NSBorderlessWindowMask styleMask: NSWindowStyleMaskBorderless
backing: NSBackingStoreBuffered backing: NSBackingStoreBuffered
defer: NO]; defer: NO];
[window setTitle: @""]; [window setTitle: @""];

View File

@ -71,14 +71,14 @@ bool
fakeNativeMediaKey(KeyID id) fakeNativeMediaKey(KeyID id)
{ {
NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
data2:-1]; data2:-1];
CGEventRef downEvent = [downRef CGEvent]; CGEventRef downEvent = [downRef CGEvent];
NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)

View File

@ -133,14 +133,14 @@ bool
fakeNativeMediaKey(KeyID id) fakeNativeMediaKey(KeyID id)
{ {
NSEvent* downRef = [NSEvent otherEventWithType:NSSystemDefined NSEvent* downRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xa) << 8)
data2:-1]; data2:-1];
CGEventRef downEvent = [downRef CGEvent]; CGEventRef downEvent = [downRef CGEvent];
NSEvent* upRef = [NSEvent otherEventWithType:NSSystemDefined NSEvent* upRef = [NSEvent otherEventWithType:NSEventTypeSystemDefined
location: NSMakePoint(0, 0) modifierFlags:0xa00 location: NSMakePoint(0, 0) modifierFlags:0xa00
timestamp:0 windowNumber:0 context:0 subtype:8 timestamp:0 windowNumber:0 context:0 subtype:8
data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8) data1:(convertKeyIDToNXKeyType(id) << 16) | ((0xb) << 8)

View File

@ -21,7 +21,7 @@
CFStringRef CFStringRef
getDraggedFileURL() getDraggedFileURL()
{ {
NSString* pbName = NSDragPboard; NSString* pbName = NSPasteboardNameDrag;
NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName]; NSPasteboard* pboard = [NSPasteboard pasteboardWithName:pbName];
NSMutableString* string; NSMutableString* string;